linkml / linkml-runtime

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

[schemaview][bug] Pass `imports` as kwarg to `all_slots` #317

Closed sneakers-the-rat closed 3 months ago

sneakers-the-rat commented 3 months ago

phew! +1 to the need for https://github.com/linkml/linkml-runtime/pull/316

https://github.com/linkml/linkml-runtime/pull/313 changed the if/else switch in selecting ordering to raise an exception for an unknown value rather than fall through because doing so exposes bugs like this one!

specifically, the docgen tests were all failing on a call to slot_children because they were passing imports as a positional argument rather than a kwarg. Looking for all usages between linkml_runtime and linkml for the two methods all_slots and all_classes that call ordered, and this looks like the only time that happens, everywhere else passes nothing or passes kargs

bonus! now we honor that imports param :)

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 62.70%. Comparing base (ed36311) to head (0f99716). Report is 1 commits behind head on main.

Files Patch % Lines
linkml_runtime/utils/schemaview.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #317 +/- ## ======================================= Coverage 62.70% 62.70% ======================================= Files 63 63 Lines 8580 8580 Branches 2444 2444 ======================================= Hits 5380 5380 Misses 2583 2583 Partials 617 617 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.