A package to describe workflow using semantic technologies.
This package requires Python >=3.7, simply install it with:
pip install fair-workflow
You can easily use your package from your terminal after installing fair-workflow
with pip:
fair-workflow
Get a full rundown of the available options with:
fair-workflow --help
Use this package in python scripts:
import fair_workflow
# TODO: add example to use your package
The final section of the README is for if you want to run the package in development, and get involved by making a code contribution.
Clone the repository:
git clone https://github.com/MaastrichtU-IDS/fair-workflow
cd fair-workflow
Install Hatch, this will automatically handle virtual environments and make sure all dependencies are installed when you run a script in the project:
pip install --upgrade hatch
Install the dependencies in a local virtual environment:
hatch -v env create
Make sure the existing tests still work by running pytest
. Note that any pull requests to the fairworkflows repository on github will automatically trigger running of the test suite;
hatch run test
To display all print()
:
hatch run test -s
The code will be automatically formatted when you commit your changes using pre-commit
. But you can also run the script to format the code yourself:
hatch run fmt
Check the code for errors, and if it is in accordance with the PEP8 style guide, by running flake8
and mypy
:
hatch run check
The documentation is automatically generated from the markdown files in the docs
folder and python docstring comments, and published by a GitHub Actions workflow.
Start the docs on http://localhost:8001{:target="_blank"}
hatch run docs
In case you are facing issues with dependencies not updating properly you can easily reset the virtual environment with:
hatch env prune
The deployment of new releases is done automatically by a GitHub Action workflow when a new release is created on GitHub. To release a new version:
- Make sure the
PYPI_TOKEN
secret has been defined in the GitHub repository (in Settings > Secrets > Actions). You can get an API token from PyPI at pypi.org/manage/account. - Increment the
version
number in thepyproject.toml
file in the root folder of the repository. - Create a new release on GitHub, which will automatically trigger the publish workflow, and publish the new release to PyPI.
You can also manually trigger the workflow from the Actions tab in your GitHub repository webpage.