linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
24 stars 23 forks source link

remove check if identifier is python identifier, add tests #273

Closed sierra-moxon closed 10 months ago

sierra-moxon commented 1 year ago

see linkml issue #1512 URI contraction for enum meaning is getting hung up on the local identifier of an NCIT CURIE matching the concept of a python identifier ending up in a mis-contraction of the URI which results in a failure like this:

>   ???
E   NameError: name 'NCIT_C25300' is not defined
test:184: NameError

quite possible that I do not understand the use case for a URI contraction to something like this: xyz.a123 or xyz.123 vs. xyz:123 or xyz:a123

codecov-commenter commented 1 year ago

Codecov Report

Merging #273 (37e37e2) into main (74d699c) will increase coverage by 0.15%. Report is 50 commits behind head on main. The diff coverage is 72.22%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
+ Coverage   65.86%   66.01%   +0.15%     
==========================================
  Files          56       60       +4     
  Lines        7613     7701      +88     
  Branches     2012     2021       +9     
==========================================
+ Hits         5014     5084      +70     
- Misses       2009     2025      +16     
- Partials      590      592       +2     
Files Changed Coverage Δ
linkml_runtime/linkml_model/validation.py 0.00% <0.00%> (ø)
linkml_runtime/utils/context_utils.py 73.33% <ø> (+5.00%) :arrow_up:
linkml_runtime/utils/namespaces.py 72.51% <43.75%> (-0.86%) :arrow_down:
linkml_runtime/loaders/loader_root.py 69.84% <54.28%> (+3.17%) :arrow_up:
linkml_runtime/dumpers/rdf_dumper.py 65.90% <55.55%> (-5.89%) :arrow_down:
linkml_runtime/loaders/delimited_file_loader.py 82.85% <82.85%> (ø)
linkml_runtime/dumpers/json_dumper.py 77.77% <84.61%> (-1.54%) :arrow_down:
linkml_runtime/loaders/yaml_loader.py 92.30% <85.71%> (+1.00%) :arrow_up:
linkml_runtime/utils/schemaview.py 87.79% <88.88%> (ø)
linkml_runtime/dumpers/delimited_file_dumper.py 89.65% <89.65%> (ø)
... and 13 more