Simple and flexible workflow engine
This ivory package has been developed at the Centre for Radio Cosmology at UWC and at the Jodrell Bank Centre for Astrophysics at UoM.
It is based on the original Python 2.7 ivy package developed at ETH Zurich in the Software Lab of the Cosmology Research Group of the ETH Institute of Astronomy.
The development is coordinated on GitHub and contributions are welcome.
The project is hosted on GitHub. Get a copy by running:
pip install git+https://github.com/meerklass/ivory.gitor clone and build.
git clone https://github.com/meerklass/ivory.git
cd ivory
pip install .Ivory can be run from the command line or as a Python module.
ivory [arguments] configurationfrom ivory.workflow_manager import WorkflowManager
args = ["--size-x=100", "--size-y=100", "ufig.config.random"]
mgr = WorkflowManager(args)
mgr.launch()A configuration can range from very simple to arbitrarily complex.
In the simplest case the configuration file would look something like:
from ivory.config import base_config
plugins = [
"test.plugin.simple_plugin",
"test.plugin.simple_plugin"
]Importing basic functionality from base_config and defining a list of plugins.
A slightly more complex use case would look something like:
from ivory.config import base_config
from ivory.loop import Loop
from ivory.utils.stop_criteria import RangeStopCriteria
context_provider = "ivory.context_provider.PickleContextProvider"
ctx_file_name = "ivory_cxt.dump"
plugins = Loop(
[
"test.plugin.simple_plugin",
Loop(
[
"test.plugin.simple_plugin",
"test.plugin.simple_plugin"
],
stop=RangeStopCriteria(max_iter=5)
),
"test.plugin.simple_plugin"
],
stop=RangeStopCriteria(max_iter=2)
)
a = 1.5
b = ["omega", "lambda", "gamma"]
c = NoneThis configuration:
- Configures the
PickleContextProvideras context provider which ensures that the context is persisted to the fileivory_ctx.dumpafter every execution of a plugin - Defines a list of plugins consisting of two nested loops, each having two plugins. The inner loop will be executed 5 times and the outer loop twice
- Defines the attributes
a,bandcwhereais a float,bis a list of strings, andcis a NoneType - The type of
cwill automatically be inferred from the given value from the command line
Calling this config and overriding the attributes from the command line:
ivory --a=1.75 --b=zeta,beta,gamma --c=False package.subpackage.moduleContributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
If you are reporting a bug, please include:
- Your operating system name and version
- Any details about your local setup that might be helpful in troubleshooting
- Detailed steps to reproduce the bug
If you are proposing a feature:
- Explain in detail how it would work
- Keep the scope as narrow as possible, to make it easier to implement
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md
- The pull request should work for Python 3.10 and for PyPy. Make sure that the tests pass for all supported Python versions
- Piyanat Kittiwisit piyanat.kittiwisit@gmail.com
- Amadeus Wild amadeus.wild@manchester.ac.uk (former)
- Joel Akeret
- Lukas Gamper gamperl@gmail.com