linkml / linkml-runtime

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

add method to return all_classes, all_slots in alphabetical and/or rank order. fixes #161 #159

Closed sierra-moxon closed 2 years ago

sierra-moxon commented 2 years ago

Biolink-Model has a long list of classes. I these ording methods in my jinga templates to return classes in alphabetical order (or rank order) for rendering.

codecov-commenter commented 2 years ago

Codecov Report

Merging #159 (e3832b7) into main (2661f14) will increase coverage by 0.23%. The diff coverage is 89.33%.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   63.53%   63.76%   +0.23%     
==========================================
  Files          49       49              
  Lines        5166     5210      +44     
  Branches     1450     1462      +12     
==========================================
+ Hits         3282     3322      +40     
- Misses       1518     1523       +5     
+ Partials      366      365       -1     
Impacted Files Coverage Δ
linkml_runtime/utils/context_utils.py 48.00% <0.00%> (ø)
linkml_runtime/utils/distroutils.py 72.50% <50.00%> (+0.70%) :arrow_up:
linkml_runtime/utils/schemaview.py 84.53% <91.30%> (+0.40%) :arrow_up:
linkml_runtime/dumpers/json_dumper.py 79.31% <100.00%> (ø)
linkml_runtime/utils/compile_python.py 63.33% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d89b4c8...e3832b7. Read the comment docs.

sierra-moxon commented 2 years ago

@cmungall thanks for the review! are the changes here in line with what you were thinking? so far the enumerated orderings are: lexical, rank, and preserve.

sierra-moxon commented 2 years ago

talked to Chris - this is ready to go if tests pass.