fairworkflows
A python library for constructing, modifying and publishing scientific workflows described using semantic technologies.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.9%) to scientific vocabulary
Repository
A python library for constructing, modifying and publishing scientific workflows described using semantic technologies.
Basic Info
Statistics
- Stars: 13
- Watchers: 5
- Forks: 3
- Open Issues: 13
- Releases: 17
Metadata Files
README.md
fairworkflows python library
fairworkflows is a high-level, user-friendly python library that supports the construction,
manipulation and publishing of FAIR scientific workflows using semantic technologies.
Background
fairworkflows is developed as a component of the FAIR Workbench, as part of the FAIR is FAIR project.
The focus is on description of workflows consisting of manual and computational steps using semantic technology, such as the ontology described in the publication:
Celebi, R., Moreira, J. R., Hassan, A. A., Ayyar, S., Ridder, L., Kuhn, T., & Dumontier, M. (2019). Towards FAIR protocols and workflows: The OpenPREDICT case study. arXiv:1911.09531.
The goals of the project are: 1. To facilitate the construction of RDF descriptions of a variety of scientific 'workflows', in the most general sense. This includes experimental procedures, ipython notebooks, computational analysis of results, etc. 2. To allow validation and publication of the resultant RDF (for example, by means of nanopublications). 3. Re-use of previously published steps, in new workflows. 4. FAIR data flow from end-to-end.
We seek to provide an easy-to-use python interface for achieving the above.
Documentation
Checkout the user documentation.
Installation
The most recent release can be installed from the python package index using pip:
pip install fairworkflows
To publish workflows to the nanopub server you need to setup your nanopub profile. This
allows the nanopub server to identify you. Run the following in the terminal after installation:
setup_nanopub_profile
This will add and store RSA keys to sign your nanopublications, publish a
nanopublication with your name and ORCID iD to declare that you are
using using these RSA keys, and store your ORCID iD to automatically add
as author to the provenance of any nanopublication you will publish
using this library.
Quick demo
Try out the library in this online executable notebook:
Quick Start
Import from fairworkflows library
python
from fairworkflows import is_fairworkflow, is_fairstep, FairWorkflow
Define a step for your workflow
Mark a function as a FAIR step using the is_fairstep decorator.
Use keyword arguments to semantically annotate the step.
In this example to provide a label and describe that this is a script task.
python
@is_fairstep(label='Addition', is_script_task=True)
def add(x: float, y: float) -> float:
"""Adding up numbers."""
return x + y
Define your workflow
Define your workflow by calling previously defined step functions.
Mark the function as a workflow using the is_fairworkflow decorator.
python
@is_fairworkflow(label='My Workflow')
def my_workflow(in1, in2):
"""
A simple workflow
"""
t1 = add(in1, in2)
return t1
Construct and publish a workflow
Construct a FairWorkflow object from the function defining the workflow and publish as nanopublication.
python
workflow = FairWorkflow.from_function(my_workflow)
workflow.publish_as_nanopub(use_test_server=True, publish_steps=True)
Execute the workflow
Execute the workflow and inspect the prospective provenance
python
result, prov = workflow.execute(1, 4)
print(prov)
Example notebook
- See examples/fairworkflows-quick-start.ipynb for a current example of using the fairworkflows library to build a workflow using plex rdf
How is the fairworkflows library expected to be used?
While this library could be used as a standalone tool to build/publish RDF workflows, it is intended more as a component to be used in a variety of other tools that seek to add FAIR elements to workflows. At present the library is used in the following tools:
- FAIRWorkflowsExtension: A Jupyter Lab extension that adds a widget for searching for previously published FairSteps or FairWorkflows. These can then be loaded into the notebook for modification or combination into new workflows.
It is expected that the library will soon interact with FAIR Data Points as well e.g. fairdatapoint.
Relation to existing workflow formats/engines (e.g. CWL, WDL, Snakemake etc)
This library is not intended to replace or compete with the hundreds of existing computational workflow formats, but rather to aid in RDF description and comparison of workflows in the most general sense of the term (including manual experiemental steps, notebooks, and so on). Steps in a FAIRWorkflow may very well be 'run this CWL workflow' or 'run this script', so such workflows are expected to sit more on a meta-level, describing the before-and-after of running one of these fully automated computational workflows as well.
Owner
- Name: FAIR Workflows
- Login: fair-workflows
- Kind: organization
- Website: https://fair-workflows.github.io/
- Repositories: 5
- Profile: https://github.com/fair-workflows
Citation (CITATION.cff)
# YAML 1.2
---
abstract: "The goal of the fairworkflows python library is to support the construction, manipulation and publishing of FAIR scientific workflows using semantic technologies. It is developed as a component of the FAIR Workbench, as part of the FAIR is FAIR project. The focus is on description of workflows consisting of manual and computational steps using semantic technology, such as the ontology described in the publication: Celebi, R., Moreira, J. R., Hassan, A. A., Ayyar, S., Ridder, L., Kuhn, T., & Dumontier, M. (2019). Towards FAIR protocols and workflows: The OpenPREDICT case study. arXiv:1911.09531. The goals of the project are: 1. To facilitate the construction of RDF descriptions of a variety of scientific 'workflows', in the most general sense. This includes experimental procedures, ipython notebooks, computational analysis of results, etc. 2. To allow validation and publication of the resultant RDF (for example, by means of nanopublications). 3. Re-use of previously published steps, in new workflows. 4. FAIR data flow from end-to-end.. The fairworkflows library seeks to provide an easy-to-use python interface for achieving these goals."
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Richardson
given-names: Robin
-
affiliation: "Netherlands eScience Center"
family-names: Burg
given-names: Sven
name-particle: "van der"
-
affiliation: "Netherlands eScience Center"
family-names: Smits
given-names: Djura
-
affiliation: "Maastricht University"
family-names: Celebi
given-names: Remzi
-
affiliation: "Vrije Universiteit Amsterdam"
family-names: Kuhn
given-names: Tobias
cff-version: "1.0.3"
keywords:
- "semantic"
- "RDF"
- "FAIR"
- "workflows"
- "nanopublications"
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
title: "fairworkflows: A python library for handling semantically described scientific workflows"
version: "0.3.0"
GitHub Events
Total
- Watch event: 1
- Create event: 1
Last Year
- Watch event: 1
- Create event: 1
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 813
- Total Committers: 7
- Avg Commits per committer: 116.143
- Development Distribution Score (DDS): 0.48
Top Committers
| Name | Commits | |
|---|---|---|
| Robin Richardson | r****n@g****m | 423 |
| Sven van der Burg | s****g@e****l | 231 |
| Djura Smits | d****s@g****m | 111 |
| Robin Richardson | r****1@u****m | 21 |
| Tobias Kuhn | k****s@g****m | 19 |
| Sven van der Burg | s****g@g****m | 5 |
| Remzi Celebi | r****i@g****m | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 51
- Total pull requests: 50
- Average time to close issues: 21 days
- Average time to close pull requests: 4 days
- Total issue authors: 5
- Total pull request authors: 6
- Average comments per issue: 1.49
- Average comments per pull request: 0.28
- Merged pull requests: 43
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- raar1 (26)
- svenvanderburg (19)
- rcelebi (3)
- vemonet (2)
- dsmits (1)
Pull Request Authors
- svenvanderburg (34)
- raar1 (12)
- dependabot[bot] (2)
- dsmits (1)
- vemonet (1)
- abelsiqueira (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 110 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 17
- Total maintainers: 3
pypi.org: fairworkflows
FAIRWorkflows python library
- Homepage: https://github.com/fair-workflows/fairworkflows/
- Documentation: https://fairworkflows.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.3.0
published almost 5 years ago
Rankings
Maintainers (3)
Dependencies
- Jinja2 ==2.11.3
- nanopub ==1.2.7
- networkx *
- noodles ==0.3.3
- pyshacl >=0.14.1
- pytest *
- pyyaml *
- rdflib <6.0.0,>=5.0.0
- requests *
- coveralls * development
- flaky * development
- graphviz ==0.14.1 development
- pytest * development
- pytest-cov * development
- recommonmark * development
- sphinx * development
- sphinx_rtd_theme * development
- danhellem/github-actions-issue-to-work-item 1.6 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- pypa/gh-action-pypi-publish master composite