Knowledge-Graph-Hub / kg-phenio

A Graph for experiments doing ML on ontologies.
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Unexpected OMIT prefix breaks infores maps #106

Closed caufieldjh closed 12 months ago

caufieldjh commented 12 months ago

On the most recent build (62):

11:21:09  Adding node sources using kg_phenio/transform_utils/phenio/phenio_node_sources.yaml
11:21:09  [2023-07-11 08:21:02][INFO   ][koza.app] Transforming source: phenio_node_sources
11:22:45  Traceback (most recent call last):
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/run.py", line 98, in <module>
11:22:45      cli()
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
11:22:45      return self.main(*args, **kwargs)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
11:22:45      rv = self.invoke(ctx)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
11:22:45      return _process_result(sub_ctx.command.invoke(sub_ctx))
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
11:22:45      return ctx.invoke(self.callback, **ctx.params)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
11:22:45      return __callback(*args, **kwargs)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/run.py", line 73, in transform
11:22:45      kg_transform(*args, **kwargs)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform.py", line 35, in transform
11:22:45      t.run()
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/phenio/phenio_transform.py", line 56, in run
11:22:45      self.parse(k, data_file, k)
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/phenio/phenio_transform.py", line 139, in parse
11:22:45      transform_source(
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/koza/cli_runner.py", line 84, in transform_source
11:22:45      source_koza.process_sources()
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/koza/app.py", line 108, in process_sources
11:22:45      importlib.reload(transform_module)
11:22:45    File "/usr/lib/python3.9/importlib/__init__.py", line 169, in reload
11:22:45      _bootstrap._exec(spec, module)
11:22:45    File "<frozen importlib._bootstrap>", line 613, in _exec
11:22:45    File "<frozen importlib._bootstrap_external>", line 855, in exec_module
11:22:45    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
11:22:45    File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/phenio/phenio_node_sources.py", line 126, in <module>
11:22:45      infores = infores_sources[node_curie_prefix]
11:22:45  KeyError: 'OMIT'

This essentially means we don't have a corresponding infores for the OMIT ontology. Fix is to add it to infores_sources.

caufieldjh commented 12 months ago

Oops, it's missing SNOMED too.