Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIXS_yaml:agriculture from microbiomedata/mixs/main/model/schema/mixs.yaml is not a valid URI or CURIE #1367

Closed
turbomam opened this issue Nov 17, 2023 · 7 comments
Assignees

Comments

@turbomam
Copy link
Member

turbomam commented Nov 17, 2023

In https://github.com/microbiomedata/nmdc-schema/tree/1364-limit-linkml-and-runtime-to-161

with linkml and linkml-runtime 1.6.1 (which is still behind 1.6.2 for both!)

poetry run do_shuttle \
	--recipient_model assets/other_mixs_yaml_files/mixs_template.yaml \
	--config_tsv local/mixs_regen/import_slots_regardless_gen.tsv \
	--yaml_output local/mixs_regen/mixs_subset.yaml

see

Traceback (most recent call last):
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/bin/do_shuttle", line 8, in
sys.exit(do_shuttle())
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/sheets_and_friends/shuttle.py", line 44, in do_shuttle
shuttle.prep_views_dict()
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/sheets_and_friends/shuttle.py", line 97, in prep_views_dict
temp = SchemaView(k)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/schemaview.py", line 138, in init
schema = load_schema_wrap(schema)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/schemaview.py", line 70, in load_schema_wrap
schema = yaml_loader.load(path, target_class=SchemaDefinition, **kwargs)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/loader_root.py", line 71, in load
results = self.load_any(*args, **kwargs)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/yaml_loader.py", line 41, in load_any
return self._construct_target_class(data_as_dict, target_class)
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/loader_root.py", line 132, in _construct_target_class
return target_class(**data_as_dict)
File "", line 66, in init
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 564, in post_init
self.imports = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.imports]
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 564, in
self.imports = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.imports]
File "/home/runner/.cache/pypoetry/virtualenvs/nmdc-schema-eC8G10po-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/metamodelcore.py", line 104, in init
raise ValueError(f"{v} is not a valid URI or CURIE")
ValueError: MIXS_yaml:agriculture is not a valid URI or CURIE
make: *** [project.Makefile:85: local/mixs_regen/mixs_subset.yaml] Error 1

@turbomam turbomam self-assigned this Nov 17, 2023
@turbomam
Copy link
Member Author

looks like it will work under 1.6.0/1.6.0

@turbomam
Copy link
Member Author

@turbomam
Copy link
Member Author

now getting

poetry run gen-project \
        --exclude excel \
        --exclude graphql \
        --exclude jsonld \
        --exclude markdown \
        --exclude proto \
        --exclude shacl \
        --exclude shex \
        --exclude sqlddl \
        --include jsonldcontext \
        --include jsonschema \
        --include owl \
        --include python \
        --include rdf \
        -d project src/schema/nmdc.yaml && mv project/*.py nmdc_schema

Traceback (most recent call last):
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/bin/gen-project", line 8, in
sys.exit(cli())
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/projectgen.py", line 253, in cli
gen.generate(yamlfile, project_config)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/projectgen.py", line 153, in generate
gen_dump = gen.serialize(**serialize_args)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 192, in serialize
self.as_graph()
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 178, in as_graph
self.add_class(cls)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 314, in add_class
superclass_expr = self.transform_class_expression(cls)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 372, in transform_class_expression
x = self.transform_class_slot_expression(cls, slot, slot)
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 480, in transform_class_slot_expression
owl_exprs.append(self._class_uri(ClassDefinitionName(range)))
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml/generators/owlgen.py", line 843, in _class_uri
return URIRef(self.schemaview.get_uri(c, expand=True, native=self.use_native_uris))
File "/home/mark/.cache/pypoetry/virtualenvs/nmdc-schema-_1824IzR-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/schemaview.py", line 916, in get_uri
e_name = e.name
AttributeError: 'NoneType' object has no attribute 'name'

@turbomam
Copy link
Member Author

turbomam commented Nov 17, 2023

rebuilding environment from main branch's poetry.lock file

-> 1.6.1/1.6.0

make squeaky-clean all test completed

@turbomam
Copy link
Member Author

[tool.poetry.dependencies]
linkml = ">=1.5.0, <1.6.2"
linkml-runtime = ">=1.5.0, <1.6.1"
poetry update linkml

Updating dependencies
Resolving dependencies... (5.1s)

No dependencies to install or update

Writing lock file

poetry update linkml-runtime

Updating dependencies
Resolving dependencies... (3.3s)

No dependencies to install or update

@turbomam
Copy link
Member Author

@turbomam turbomam changed the title MIXS_yaml:agriculture is not a valid URI or CURIE MIXS_yaml:agriculture from microbiomedata/mixs/main/model/schema/mixs.yaml is not a valid URI or CURIE Nov 17, 2023
@turbomam
Copy link
Member Author

turbomam commented Nov 17, 2023

skipping tests from tests/test_nmdc_mixs_merged_view.py

should be resolved by updating to MIxS 6.2

see also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant