Metadata-Version: 2.5
Name: taskmaestro-resinsight
Version: 0.2.0
Summary: ResInsight tasks and example workflows for taskmaestro
Project-URL: Homepage, https://github.com/OPM/taskmaestro-resinsight
Project-URL: Repository, https://github.com/OPM/taskmaestro-resinsight
Project-URL: Issues, https://github.com/OPM/taskmaestro-resinsight/issues
Author-email: Ceetron Solutions <info@ceetronsolutions.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: dag,pipeline,reservoir,resinsight,taskmaestro,workflow
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: rips
Requires-Dist: taskmaestro<0.3.0,>=0.2.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.16; extra == 'dev'
Description-Content-Type: text/markdown

# taskmaestro-resinsight

taskmaestro tasks and example workflows for ResInsight.

## Installation

```bash
pip install taskmaestro-resinsight
```

`rips` must match the ResInsight build it talks to. To use the API from a local
ResInsight checkout instead of the released one on PyPI:

```bash
pip install -e /path/to/resinsight/GrpcInterface/Python
```

## Development setup

```bash
git clone https://github.com/OPM/taskmaestro-resinsight ~/src/taskmaestro-resinsight
cd ~/src/taskmaestro-resinsight

# install this repo and its test/lint tools (including Ruff 0.16+)
pip install -e ".[dev]"
```

## Discovering tasks and workflows

Installing the package registers its tasks and completions workflow through the
`taskmaestro.tasks` and `taskmaestro.workflows` entry-point groups. No source-tree scan,
`PYTHONPATH` change, or workflow-directory symlink is needed:

```python
from taskmaestro import (
    get_registered_workflow,
    registered_task_names,
    registered_workflow_names,
)

print(
    sorted(name for name in registered_task_names() if name.startswith("resinsight."))
)
# ['resinsight.add_perforation', 'resinsight.connect', ...]

print(registered_workflow_names())
# {'resinsight.completions'}

workflow = get_registered_workflow("resinsight.completions")
print(workflow.to_mermaid())
```

The example in `workflows/resinsight_completions/workflow.yaml` also uses entry-point
identifiers such as `resinsight.connect` in its `task:` and `depends_on:` fields. It can
be loaded normally after installation:

```python
from taskmaestro import load_workflow_from_yaml

loaded = load_workflow_from_yaml(
    "workflows/resinsight_completions/workflow.yaml",
    "workflows/resinsight_completions/input.yaml",
)
```

Applications can use `registered_workflows()` as their workflow catalogue and avoid the
old convention of scanning `~/.taskmaestro/workflows`.

## Running tests

```bash
RESINSIGHT_EXECUTABLE=/path/to/ResInsight pytest tests/ -v
```
