diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index bf00de6..552a008 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -30,13 +30,8 @@ jobs: - name: Get current month id: date run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT - - name: Cache APT Packages - # This action should only be used when you need extra system packages - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: graphviz poppler-utils - version: 1.0 - execute_install_scripts: true + - name: Install APT Packages + run: sudo apt-get install graphviz poppler-utils imagemagick - name: Cache tox and precommit environments uses: actions/cache@v4 with: diff --git a/README.rst b/README.rst index e00649d..10497cf 100644 --- a/README.rst +++ b/README.rst @@ -27,14 +27,14 @@ The usual command is the following: .. code:: - synthesis_workflow + synthesis-workflow You can get help and complete parameter description with the following commands: .. code:: - synthesis_workflow --help - synthesis_workflow --help + synthesis-workflow --help + synthesis-workflow --help You can also run a complete ``luigi`` command in order to fine-control task parameters: @@ -46,7 +46,7 @@ You can also run a complete ``luigi`` command in order to fine-control task para .. note:: - The ``synthesis_workflow`` command (or the complete ``luigi`` command) must be + The ``synthesis-workflow`` command (or the complete ``luigi`` command) must be executed from a directory containing a ``luigi.cfg`` file. A simple example of such file is given in the ``examples`` directory. @@ -57,13 +57,13 @@ The usual command is the following: .. code:: - morph_validation -t -r -o -c --bio-compare + morph-validation -t -r -o -c --bio-compare You can get help and complete parameter description with the following command: .. code:: - morph_validation --help + morph-validation --help Funding & Acknowledgment ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/requirements/test.pip b/requirements/test.pip index c851921..8326d0e 100644 --- a/requirements/test.pip +++ b/requirements/test.pip @@ -9,4 +9,5 @@ pytest-xdist>=3.0.2 # Pin versions for tests matplotlib==3.6.* +pynrrd==0.4.3 seaborn==0.12.* diff --git a/src/morphval/cli.py b/src/morphval/cli.py index 257ae7a..6f8e158 100644 --- a/src/morphval/cli.py +++ b/src/morphval/cli.py @@ -4,6 +4,7 @@ import pkg_resources +import morphval from morphval import config from morphval.validation_main import Validation @@ -11,6 +12,11 @@ def get_parser(): """Return the argument parser.""" parser = argparse.ArgumentParser() + parser.add_argument( + "--version", + action="version", + version=f"%(prog)s, version {morphval.__version__}", + ) parser.add_argument( "-t", "--test-dir", required=True, help="full path to directory with test data" ) diff --git a/tests/data/in_small_O1/out/synthesis/apical_points.yaml b/tests/data/in_small_O1/out/synthesis/apical_points.yaml index de5bbc7..f827e5f 100644 --- a/tests/data/in_small_O1/out/synthesis/apical_points.yaml +++ b/tests/data/in_small_O1/out/synthesis/apical_points.yaml @@ -2,49 +2,49 @@ 216363698b529b4a97b750923ceb3ffd: null 4462ebfc5f915ef09cfbac6e7687a66e: null 48f165d57b00c7f4781ef86f5c8cc1ab: -- -14.394819259643555 -- 194.89781188964844 -- 9.01955795288086 +- -14.394821166992188 +- 194.8978271484375 +- 9.019556999206543 4dad2986ce8349606a06e9ab85a0bcc1: -- -1.07305908203125 +- -1.0730547904968262 - 195.03805541992188 -- -7.569953918457031 +- -7.569961071014404 5bc8fbbcbde5c0994164d8399f767c45: null 6018366cf658f7a75ed34fe53a096533: null 6513270e269e0d37f2a74de452e6b438: null 72e63ac7a95383221f70d5dc2e675fc7: -- 4.626476764678955 -- 194.84230041503906 -- 20.284626007080078 +- 4.6264824867248535 +- 194.84231567382812 +- 20.28464126586914 7b89296c6dcbac5008577eb1924770d3: -- -8.819189071655273 -- 194.1275177001953 -- -14.387084007263184 +- -8.819184303283691 +- 194.12750244140625 +- -14.38708782196045 8575062102fbcd4f357fbc5af71a1bfc: -- -1.843111515045166 +- -1.8431235551834106 - 195.61419677734375 -- 12.465193748474121 +- 12.46518611907959 87751d4ca8501e2c44dcda6a797d76de: -- -3.984039545059204 +- -3.9840335845947266 - 197.0111541748047 -- -6.497995376586914 +- -6.498000144958496 b8a1abcd1a6916c74da4f9fc3c6da5d7: null c15521b1b3dca50a9daa37e51b591d75: -- -0.25705447793006897 -- 199.17787170410156 -- 11.141695022583008 +- -0.2570788562297821 +- 199.17788696289062 +- 11.141693115234375 cd613e30d8f16adf91b7584a2265b1f5: null d95bafc8f2a4d27bdcf4bb99f4bea973: null db5b5fab8f4d3e27dda1494c73cf256d: - 26.932884216308594 -- 195.74429321289062 -- -1.293025255203247 +- 195.74427795410156 +- -1.2930362224578857 e3e70682c2094cac629f6fbed82c07cd: null e539a78bc8eff3460b12ae6ead581e57: -- 9.035844802856445 -- 195.72015380859375 -- 7.5418572425842285 +- 9.035848617553711 +- 195.7201690673828 +- 7.5418620109558105 e8d79f49af6d114c4a6f188a424e617b: -- 21.528072357177734 +- 21.5280704498291 - 197.24026489257812 -- 9.389350891113281 +- 9.38935661315918 diff --git a/tests/test_O1_workflow.py b/tests/test_O1_workflow.py index 7c28b00..fdccdc0 100644 --- a/tests/test_O1_workflow.py +++ b/tests/test_O1_workflow.py @@ -50,6 +50,9 @@ def test_ValidateSynthesis(small_O1_working_directory, data_dir): "tolerance": 2e-3, "absolute_tolerance": 1e-15, }, + "synthesis/apical_points.yaml": { + "tolerance": 1e-3, + }, "validation/morphology_validation_reports/validation_results.json": { "tolerance": 2e-3, "absolute_tolerance": 1e-12, diff --git a/tests/test_cli.py b/tests/test_cli.py index f97eae6..2613bcf 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -40,9 +40,17 @@ def test_dependency_graph(self, vacuum_working_directory): assert (root_dir / "dependency_graph.png").exists() -def test_entry_point(script_runner): - """Test the entry point.""" +def test_entry_point_synthesis_workflow(script_runner): + """Test the entry point of synthesis-workflow.""" ret = script_runner.run("synthesis-workflow", "--version") assert ret.success assert ret.stdout.startswith("synthesis-workflow, version ") assert ret.stderr == "" + + +def test_entry_point_morph_validation(script_runner): + """Test the entry point of MorphVal.""" + ret = script_runner.run("morph-validation", "--version") + assert ret.success + assert ret.stdout.startswith("morph-validation, version ") + assert ret.stderr == ""