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

Add functions to look up a LinkML python class by URI or CURIE #243

Closed hsolbrig closed 1 year ago

hsolbrig commented 1 year ago

Any LinkML class derived from YAMLRoot can find a descendant by URI or CURIE. If it is a URI, one can search for either a model or a class URI. This is meant to be the support needed for the polymorphic class tweak in the LinkML python generator.

codecov-commenter commented 1 year ago

Codecov Report

Merging #243 (13bda09) into main (b992fe0) will increase coverage by 0.32%. The diff coverage is 58.09%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   63.54%   63.87%   +0.32%     
==========================================
  Files          53       53              
  Lines        6117     6206      +89     
  Branches     1650     1682      +32     
==========================================
+ Hits         3887     3964      +77     
+ Misses       1774     1763      -11     
- Partials      456      479      +23     
Impacted Files Coverage Δ
linkml_runtime/dumpers/rdflib_dumper.py 94.94% <40.00%> (-2.97%) :arrow_down:
linkml_runtime/utils/schemaview.py 83.12% <43.83%> (-3.29%) :arrow_down:
linkml_runtime/utils/namespaces.py 73.05% <100.00%> (+2.16%) :arrow_up:
linkml_runtime/utils/yamlutils.py 79.44% <100.00%> (+1.29%) :arrow_up:
linkml_runtime/linkml_model/meta.py 53.93% <0.00%> (+1.14%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.