Skip to content

Commit

Permalink
Merge pull request #1137 from microbiomedata/issue-1127
Browse files Browse the repository at this point in the history
Report the ranges of slot `used`
  • Loading branch information
turbomam authored Oct 3, 2023
2 parents 4d8fe0c + 3c9438d commit 4af3bcf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nmdc_schema/list_used_ranges.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from linkml_runtime import SchemaView

schema_file = "../src/schema/nmdc.yaml"

schema_view = SchemaView(schema_file)

schema_classes = schema_view.all_classes()

for ck, _ in schema_classes.items():
induced_slots = schema_view.class_induced_slots(ck)
for induced_slot in induced_slots:
if induced_slot.name == 'used':
print(f"In class {ck}, slot used has range {induced_slot.range}")

0 comments on commit 4af3bcf

Please sign in to comment.