semvec/pypi-packages huggingface dataset:
adr-viewer 1.5.0rc1
A visualisation tool for Architecture Decision Records
License: MIT

# adr-viewer

[![Latest Version](https://img.shields.io/pypi/v/adr-viewer)](https://pypi.org/project/adr-viewer/)

Show off your Architecture Decision Records with an easy-to-navigate web page, either as a local web-server or generated static content.
Include diagrams in [Mermaid](https://mermaid.js.org) format using code blocks/fences, e.g. [test ADR 5](test/adr/0005-has-mermaid.md).

## Examples

<img src="https://github.com/mrwilson/adr-viewer/raw/master/images/example.png" height="500px"/>

* Example above using Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools) project
* This project exposes its own Architecture Decision Records [here](https://mrwilson.github.io/adr-viewer/index.html)

## Installation

### From PyPI

```bash
$ pip install adr-viewer
```

### From Homebrew

```bash
$ brew install adr-viewer
```

See also the [`adr-viewer` formula page](https://formulae.brew.sh/formula/adr-viewer).

### From local build

adr-viewer requires Python 3.7 or higher (with Pip)

```bash
$ git clone https://github.com/mrwilson/adr-viewer
$ pip install -r requirements.txt
$ python setup.py install
```

## Usage

```bash
Usage: adr-viewer [OPTIONS]

Options:
  --adr-path TEXT  Directory containing ADR files.  [default: doc/adr/]
  --output TEXT    File to write output to.  [default: index.html]
  --title TEXT     The project title   [default: the basename of the current directory]
  --serve          Serve content at http://localhost:8000/
  --port INT       Custom server port [default: 8000]
  --help           Show this message and exit.
```

The default for `--adr-path` is `doc/adr/` because this is the default path generated by `adr-tools`.

## Supported Record Types

<img src="https://github.com/mrwilson/adr-viewer/raw/master/images/record_types.png"/>
goeieDAG 0.0.2
Task crunching with Ninja or Make
License: MIT
Requires Python: >=3.9
Keywords: dag, make, makefile, ninja

# goeieDAG

_/ɣu.jə.ˈdɑx/: hello, good day (Dutch greeting used during daytime)_

goeieDAG provides a unified Python API to Ninja and Make (_TODO_) build systems, aiming to
make it extremely easy to benefit from parallel processing in any graph-like workflow.


## Installation

    pip install goeieDAG==0.0.2

## Usage

```python
from pathlib import Path

import goeiedag
from goeiedag import ALL_INPUTS, INPUT, OUTPUT

workdir = Path("output")

graph = goeiedag.Graph()

# Extract OS name from /etc/os-release
graph.add(["grep", "^NAME=", INPUT, ">", OUTPUT],
          inputs=["/etc/os-release"],
          outputs=["os-name.txt"])
# Get username
graph.add(["whoami", ">", OUTPUT],
          inputs=[],
          outputs=["username.txt"])
# Glue together to produce output
graph.add(["cat", ALL_INPUTS, ">", OUTPUT.result],
          inputs=["os-name.txt", "username.txt"],
          outputs=dict(result="result.txt"))  # can also use a dictionary and refer to inputs/outputs by name

goeiedag.build_all(graph, workdir)

# Print output
print((workdir / "result.txt").read_text())
```


## Q&A

### Why use the _files and commands_ model rather than _Python objects and functions_?

- It is a tested and proven paradigm (`make` traces back to _1976_!)
- It provides an obvious way of evaluating which products need rebuilding (subject to an
  accurate dependency graph)
- It naturally isolates and parallelizes individual build tasks
- It is agnostic as to how data objects are serialized (convenient for the library author...)
- Graph edges are implicitly defined by input/output file names
- A high-quality executor (Ninja) is available and installable via a Python package

### How is this different from using the Ninja package directly?

- Simpler mental model & usage: no need to separately define build rules or think about implicit/explicit inputs and
  outputs
- API accepts Paths; no need to cast everything to `str`!
- Higher-level API in general (for example, the output directory is created automatically)


## Similar projects

- [Ninja](https://pypi.org/project/ninja/) (Python package) -- provides a lower-level API,
  used by goeieDAG as back-end
- [TaskGraph](https://github.com/natcap/taskgraph/) -- similar project, but centered around
  Python functions and in-process parallelism
- [Snakemake](https://snakemake.github.io/) -- similar goals, but a stand-alone tool rather
  than a library
- [Dask](https://dask.org/) -- different execution model; caching of intermediate results
  is left up to the user
- [doit](https://pydoit.org/)