diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68f76ec..2d957a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,10 @@ jobs: run: | sudo apt-get update && sudo apt-get -y install libopenmpi-dev openmpi-bin graphviz graphviz-dev pip install .[all] + + - name: Version + run: | + ceci --version - name: Tests run: | diff --git a/ceci/main.py b/ceci/main.py index b299b00..e4c95b0 100644 --- a/ceci/main.py +++ b/ceci/main.py @@ -7,6 +7,7 @@ from .pipeline import Pipeline from .sites import load, set_default_site, get_default_site from .utils import extra_paths +from ._version import __version__ import contextlib # Add the current dir to the path - often very useful @@ -35,6 +36,15 @@ help="Over-ride the main pipeline yaml file e.g. launcher.name=cwl", ) +parser.add_argument( + "-v", + "--version", + action="version", + version=__version__, + help="Print the ceci version instead of running anything", +) + + def run_pipeline(pipe_config): """Run a pipeline as defined by a particular configuration