Build error: category must be supplied in UphenoMapTransform
caufieldjh opened this issue · 0 comments
caufieldjh commented
In the most recent build, the PHENIO transforms work as expected, but the UphenoMapTransform encounters this issue:
12:40:45 [2023-02-09 12:40:36][INFO ][root ] Parsing UphenoMapTransform
12:40:45 Parsing data/raw/upheno_mapping_all.csv
12:40:45 Transforming using source in kg_phenio/transform_utils/upheno/upheno_mapping_all.yaml
12:40:45 [2023-02-09 12:40:36][INFO ][koza.app] Transforming source: upheno_mapping_all
12:40:45 Traceback (most recent call last):
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/run.py", line 98, in <module>
12:40:45 cli()
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
12:40:45 return self.main(*args, **kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
12:40:45 rv = self.invoke(ctx)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
12:40:45 return _process_result(sub_ctx.command.invoke(sub_ctx))
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
12:40:45 return ctx.invoke(self.callback, **ctx.params)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
12:40:45 return __callback(*args, **kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/run.py", line 73, in transform
12:40:45 kg_transform(*args, **kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform.py", line 35, in transform
12:40:45 t.run()
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/upheno/upheno_map_transform.py", line 47, in run
12:40:45 self.parse(name, data_file, k)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/upheno/upheno_map_transform.py", line 62, in parse
12:40:45 transform_source(
12:40: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
12:40:45 source_koza.process_sources()
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/koza/app.py", line 105, in process_sources
12:40:45 transform_module = importlib.import_module(transform_code)
12:40:45 File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
12:40:45 return _bootstrap._gcd_import(name[level:], package, level)
12:40:45 File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
12:40:45 File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
12:40:45 File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
12:40:45 File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
12:40:45 File "<frozen importlib._bootstrap_external>", line 855, in exec_module
12:40:45 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/kg_phenio/transform_utils/upheno/upheno_mapping_all.py", line 16, in <module>
12:40:45 p1 = PhenotypicFeature(
12:40:45 File "<string>", line 13, in __init__
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/biolink/model.py", line 3866, in __post_init__
12:40:45 super().__post_init__(**kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/biolink/model.py", line 3815, in __post_init__
12:40:45 super().__post_init__(**kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/biolink/model.py", line 3001, in __post_init__
12:40:45 super().__post_init__(**kwargs)
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/biolink/model.py", line 1636, in __post_init__
12:40:45 self.MissingRequiredField("category")
12:40:45 File "/var/lib/jenkins/workspace/ledge-graph-hub_kg-phenio_master/gitrepo/venv/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 273, in MissingRequiredField
12:40:45 raise ValueError(f"{field_name} must be supplied")
12:40:45 ValueError: category must be supplied
The nodes still get category values by virtue of being objects of a specific class (biolink:PhenotypicFeature) but apparently category
must also be specified. Not sure why that is an issue now but it's an easy fix.