semvec/pypi-packages huggingface dataset:
tooltree 0.1.3
functions for creating treemap data visualizations
Requires Python: >=3.9


# tooltree

functions for creating treemap data visualizations

## Installation

```bash
uv add tooltree
```

## Example Usage

The main API is just one function, `tooltree.plot_treemap()`

See `tooltree.plot_treemap()` for full list of options

#### Basic Treemap

```python
import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
)
```

#### Output as HTML

```python
import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    html_path='path/to/save/treemap.html',
)
```

#### Output as PNG

```python
import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    png_path='path/to/save/treemap.png',
)
```

#### Limit Number of Treemap Children

```python
import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    max_children=10,
    min_child_fraction=0.01,
    max_root_children=5,
    min_root_child_fraction=0.001,
)
```

#### Other Options

```python
import tooltree

tooltree.plot_treemap(
    df=dataframe,
    levels=[grandparent_column, parent_column, name_column],
    metric=metric_column,
    root='Root Node Name',
    metric_format=toolstr_kwargs,
    height=1600,
    width=1200,
)
```
faterunner 0.2.0
F.. A.. Task Execution Runner
Requires Python: >=3.11

# Faterunner

[![CI](https://github.com/sakhezech/faterunner/actions/workflows/ci.yaml/badge.svg)](https://github.com/sakhezech/faterunner/actions/workflows/ci.yaml)

The fate of a task is to be run.

Or "F.. A.. Task Execution Runner". (TODO: backronym)

## Parsers

Faterunner can support many configuration file formats.
It will try to guess the correct configuration file.

Right now Faterunner only supports `pyproject.toml` format, but you can
add your own file format support by implementing a parser and exposing it to
`faterunner.parsers` entry point

```toml
[project.entry-points.'faterunner.parsers']
my-parser = 'myproject.parser:MyParser'
```

### Pyproject

```toml
[tool.faterunner.targets]
# you can define a task as a list of commands
check = ['ruff check .', 'ruff format --check .']
format = ['ruff check --fix .', 'ruff format .']

# or you can define them as a table of {commands = ..., dependencies = ..., options = ...}
[tool.faterunner.targets.docker-build]
options = { shell = true } # inline options for the task
commands = ['docker build -t my-project:$(git rev-parse HEAD) .'] # interpolation
[tool.faterunner.targets.docker-run]
dependencies = ['docker-build'] # will run only if `docker-build` succeeded
options = { shell = true }
commands = ['docker run --rm -p 5000:5000 my-project:$(git rev-parse HEAD)']

[tool.faterunner.targets.check-and-format]
dependencies = ['check', 'format'] # task with no commands

[tool.faterunner.targets.i-have-no-mouth-and-i-must-scream]
options = { silent = true }
commands = ['echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAH"']
```

## Options

- `silent`: Suppress output. (stdout and stderr)
- `ignore_err`: Ignore any error.
- `keep_going`: Keep running tasks even if some cannot be done. (like `make -k ...`)
- `dry`: Do not execute actions.
- `shell`: Run in a shell. (for subprocess actions)