Knowledge-Graph-Hub / kg-phenio

A graph for accessing and comparing knowledge concerning phenotypes across species and genetic backgrounds.
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Transform stage of build fails due to `ImportError` in `sssom` #126

Closed caufieldjh closed 9 months ago

caufieldjh commented 9 months ago

Build fails like this:

11:04:53  + python3.9 run.py transform
11:04:59  Traceback (most recent call last):
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/run.py", line 9, in <module>
11:04:59      from kg_phenio.normalize import normalize
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/normalize.py", line 2, in <module>
11:04:59      from universalizer.norm import clean_and_normalize_graph
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/universalizer/norm.py", line 14, in <module>
11:04:59      from universalizer.oak_utils import get_cats_from_oak
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/universalizer/oak_utils.py", line 11, in <module>
11:04:59      from oaklib.constants import OAKLIB_MODULE
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/oaklib/__init__.py", line 7, in <module>
11:04:59      from oaklib.interfaces import BasicOntologyInterface  # noqa:F401
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/oaklib/interfaces/__init__.py", line 8, in <module>
11:04:59      from oaklib.interfaces.text_annotator_interface import TextAnnotatorInterface
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/oaklib/interfaces/text_annotator_interface.py", line 22, in <module>
11:04:59      from oaklib.utilities.lexical.lexical_indexer import create_or_load_lexical_index
11:04:59    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/oaklib/utilities/lexical/lexical_indexer.py", line 21, in <module>
11:04:59      from sssom.context import ensure_converter
11:04:59  ImportError: cannot import name 'ensure_converter' from 'sssom.context' (/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/sssom/context.py)

This build is using oaklib 0.5.24, the most recent release.

Here's a clue re: sssom:

ERROR: oaklib 0.5.24 has requirement sssom<0.5.0,>=0.4.0, but you'll have sssom 0.3.41 which is incompatible.
caufieldjh commented 9 months ago

sssom-py is currently on v0.4.2

caufieldjh commented 9 months ago

The source of this error is universalizer: it pins sssom = "^0.3.32"

caufieldjh commented 9 months ago

Aha, the wrong version of sssom is coming in because koza wants sssom "^0.3.41": https://github.com/monarch-initiative/koza/blob/ba0ba45192dd23a0c8ed7bc8876856ce9c4ddbb8/pyproject.toml#L27C18-L27C18 so that won't install more recent sssom, but older versions are not compatible with current oaklib.