Metadata-Version: 2.1
Name: pypushflow
Version: 0.7.0
Summary: A task scheduler for cyclic and acyclic graphs
Home-page: https://gitlab.esrf.fr/workflow/pypushflow/
Author: ESRF
Author-email: svensson@esrf.fr
License: MIT
Project-URL: Source, https://gitlab.esrf.fr/workflow/pypushflow/
Project-URL: Documentation, https://pypushflow.readthedocs.io/
Project-URL: Tracker, https://gitlab.esrf.fr/workflow/pypushflow/issues/
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
Provides-Extra: mx
Requires-Dist: pymongo>=3; extra == "mx"
Provides-Extra: test
Requires-Dist: mongita>=1; extra == "test"
Requires-Dist: mongomock; extra == "test"
Requires-Dist: mongomock<4.2.0; python_version < "3.8" and extra == "test"
Requires-Dist: numpy; extra == "test"
Requires-Dist: psutil>=5.8; extra == "test"
Requires-Dist: pytest-subtests>=0.4; extra == "test"
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: dev
Requires-Dist: black>=22; extra == "dev"
Requires-Dist: flake8>=4; extra == "dev"
Requires-Dist: mongita>=1; extra == "dev"
Requires-Dist: mongomock; extra == "dev"
Requires-Dist: mongomock<4.2.0; python_version < "3.8" and extra == "dev"
Requires-Dist: numpy; extra == "dev"
Requires-Dist: psutil>=5.8; extra == "dev"
Requires-Dist: pytest-subtests>=0.4; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Provides-Extra: doc
Requires-Dist: mongita>=1; extra == "doc"
Requires-Dist: mongomock; extra == "doc"
Requires-Dist: mongomock<4.2.0; python_version < "3.8" and extra == "doc"
Requires-Dist: numpy; extra == "doc"
Requires-Dist: psutil>=5.8; extra == "doc"
Requires-Dist: pydata-sphinx-theme<0.15; extra == "doc"
Requires-Dist: pytest-subtests>=0.4; extra == "doc"
Requires-Dist: pytest>=7; extra == "doc"
Requires-Dist: sphinx-autodoc-typehints>=1.16; extra == "doc"
Requires-Dist: sphinx>=4.5; extra == "doc"

# pypushflow

A task scheduler for cyclic and acyclic graphs

## Install

```bash
pip install pypushflow[mx]
```

Use the `mx` option for installation at MX beamlines.

## Run tests

```bash
pip install pypushflow[test]
pytest
```

## Getting started

```python
import logging
from pypushflow.Workflow import Workflow
from pypushflow.StopActor import StopActor
from pypushflow.StartActor import StartActor
from pypushflow.PythonActor import PythonActor
from pypushflow.ThreadCounter import ThreadCounter


class MyWorkflow(Workflow):
    def __init__(self, name):
        super().__init__(name, level=logging.DEBUG)
        ctr = ThreadCounter(parent=self)
        self.startActor = StartActor(parent=self, thread_counter=ctr)
        self.pythonActor = PythonActor(
            parent=self,
            script="pypushflow.tests.tasks.pythonActorTest.py",
            name="Python Actor Test",
            thread_counter=ctr,
        )
        self.stopActor = StopActor(parent=self, thread_counter=ctr)
        self.startActor.connect(self.pythonActor)
        self.pythonActor.connect(self.stopActor)


testMyWorkflow = MyWorkflow("Test workflow")
inData = {"name": "World"}
outData = testMyWorkflow.run(inData, timeout=15, pool_type="process")
assert outData["reply"] == "Hello World!"
```

## Documentation

https://pypushflow.readthedocs.io/
