Skip to content

CI workflow broken #99

@simleo

Description

@simleo

The error is:

ImportError while importing test module '/home/runner/work/runcrate/runcrate/tests/test_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_cli.py:22: in <module>
    from runcrate.cli import cli
src/runcrate/cli.py:21: in <module>
    from .convert import ProvCrateBuilder
src/runcrate/convert.py:32: in <module>
    from cwlprov.ro import ResearchObject
.tox/test/lib/python3.12/site-packages/cwlprov/ro.py:30: in <module>
    import pkg_resources
E   ModuleNotFoundError: No module named 'pkg_resources'

due to cwlprov 0.1.1 using the deprecated (and now removed?) pkg_resources. The current development version of cwlprov does not use pkg_resources anymore, but it's not been released yet.

I tried the following changes:

diff --git a/pyproject.toml b/pyproject.toml
index 6a30a84..c8cf847 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -23,7 +23,7 @@ dependencies = [
     "bdbag>=1.4.1",
     "click~=8.1",
     "cwl-utils==0.40",
-    "cwlprov==0.1.1",
+    "cwlprov @ git+https://github.com/common-workflow-language/cwlprov-py@10b37ef05feaa1cd9fed76e67841440f2ca11463",
     "networkx==3.1",
     "prov>=1.5.1",
     "rocrate>=0.9,<1",
diff --git a/requirements.txt b/requirements.txt
index a9e6185..268b727 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
 bdbag>=1.4.1
 click~=8.1
 cwl-utils==0.40
-cwlprov==0.1.1
+cwlprov @ git+https://github.com/common-workflow-language/cwlprov-py@10b37ef05feaa1cd9fed76e67841440f2ca11463
 networkx==3.1
 prov>=1.5.1
 rocrate>=0.9,<1

which lead to the tests failing with:

ImportError while importing test module '/home/simleo/git/runcrate/tests/test_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_cli.py:22: in <module>
    from runcrate.cli import cli
src/runcrate/cli.py:21: in <module>
    from .convert import ProvCrateBuilder
src/runcrate/convert.py:31: in <module>
    from cwlprov.prov import Entity, Provenance
.tox/test/lib/python3.12/site-packages/cwlprov/prov.py:43: in <module>
    from prov.model import (
E   ImportError: cannot import name 'QualifiedNameCandidate' from 'prov.model' (/home/simleo/git/runcrate/.tox/test/lib/python3.12/site-packages/prov/model.py)

due to the fact that the test dependency cwlref-runner installs cwltool-3.1.20260108082145 which depends on prov==1.5.1, while the development version of cwlprov has prov >= 1.5.1.

@mr-c suggestions are welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions