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 enum slot link for slots defined in slot_usage. #222

Closed amc-corey-cox closed 1 year ago

amc-corey-cox commented 1 year ago

Sorry for the second pull request. I missed an edge case.

Closes issue https://github.com/linkml/linkml/issues/998 with the PR in that repository.

amc-corey-cox commented 1 year ago

This is needed for PR https://github.com/linkml/linkml/pull/1092 to close issue https://github.com/linkml/linkml/issues/998

codecov-commenter commented 1 year ago

Codecov Report

Merging #222 (e413bf1) into main (7a53613) will decrease coverage by 0.26%. The diff coverage is 60.88%.

@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   63.33%   63.07%   -0.27%     
==========================================
  Files          50       52       +2     
  Lines        5501     6044     +543     
  Branches     1567     1632      +65     
==========================================
+ Hits         3484     3812     +328     
- Misses       1598     1778     +180     
- Partials      419      454      +35     
Impacted Files Coverage Δ
linkml_runtime/linkml_model/annotations.py 90.38% <ø> (ø)
linkml_runtime/linkml_model/extensions.py 85.45% <ø> (ø)
linkml_runtime/linkml_model/mappings.py 0.00% <ø> (ø)
linkml_runtime/linkml_model/types.py 100.00% <ø> (ø)
linkml_runtime/linkml_model/validation.py 0.00% <0.00%> (ø)
linkml_runtime/utils/introspection.py 68.75% <37.50%> (-31.25%) :arrow_down:
linkml_runtime/utils/csvutils.py 84.61% <40.00%> (-1.50%) :arrow_down:
linkml_runtime/linkml_model/meta.py 52.79% <52.27%> (+0.04%) :arrow_up:
linkml_runtime/linkml_model/units.py 76.00% <76.00%> (ø)
linkml_runtime/utils/pattern.py 88.57% <85.18%> (+2.85%) :arrow_up:
... and 10 more

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

amc-corey-cox commented 1 year ago

The second commit solves a use-case we didn't anticipate involving slot_usages assignments after a slot is defined schema-wide and implements a test or that situation.