Open cpauvert opened 1 year ago
This issues happened with linkml v1.5.5 and remains despite updating to 1.5.6.
Hi Charlie - thanks for the detailed issue; I’ll take a look.
@cpauvert - short answer, Biolink should be updated to use the edam.topic
prefix following the conventions in bioregistry.io. but, this does mean linkml-validate will fail as you have demonstrated. I'm working on a couple of PRs to fix this behavior (see above).
Thanks @sierra-moxon for the heads-up, let me know how and when I should try out your edits!
Describe the bug Hello! I have an issue with the prefix for the EDAM ontology when using
meaning
in anenum
. I followed the the convention in biolink withEDAM_TOPIC
but this raised issue with validation (details below)TL;DR:
EDAM_TOPIC
: linkml-lint FAIL ; linkml-validate PASSEDAM.TOPIC
: linkml-lint PASS ; linkml-validate FAILThe linter has a default configuration with regards to
prefixmaps
.Should I follow the convention in biolink with
EDAM_TOPIC
and ignore the lint? because it seems thatEDAM.TOPIC
is converted to the python:which causes a
NameError: name 'EDAM' is not defined
.Best regards,
Details:
See more with prefix `EDAM_TOPIC`: linkml-lint FAIL ; linkml-validate PASS
https://github.com/FAIR-MI/miiid-schema/blob/410aeb29afd3e81961ecc45a534f59077b651222/src/miiid_schema/schema/miiid_schema.yaml#LL17 ## Linting ```bash $ make lint poetry run linkml-lint src/miiid_schema/schema/miiid_schema.yaml /home/cpauvert/projects/linkml-projects/miiid-schema/src/miiid_schema/schema/miiid_schema.yaml warning Schema maps prefix 'EDAM_TOPIC' to namespace 'http://edamontology.org/topic_' instead of using prefix 'EDAM.TOPIC' (canonical_prefixes) ✖ Found 1 problem in 1 schema make: *** [Makefile:119: lint] Error 1 ``` ## Validation ```bash linkml-validate -s src/miiid_schema/schema/miiid_schema.yaml -C IntermicrobialInteraction \ src/data/examples/valid/IntermicrobialInteraction-pairwise.yaml # None ```See more with prefix `EDAM.TOPIC`: linkml-lint PASS ; linkml-validate FAIL
https://github.com/FAIR-MI/miiid-schema/blob/26460cd64769ddb87ac4a2f471ef7bb2c0f07fdd/src/miiid_schema/schema/miiid_schema.yaml#L17 ## Linting ```bash $ make lint poetry run linkml-lint src/miiid_schema/schema/miiid_schema.yaml ✓ No problems found ``` ## Validation ```bash linkml-validate -s src/miiid_schema/schema/miiid_schema.yaml -C IntermicrobialInteraction \ src/data/examples/valid/IntermicrobialInteraction-pairwise.yaml ``` ```python ERROR:root:Error compiling generated python code: name 'EDAM' is not defined Traceback (most recent call last): File "/home/cpauvert/.cache/pypoetry/virtualenvs/miiid-schema-6-7ZvLG3-py3.9/bin/linkml-validate", line 8, in