Skip to content

Commit

Permalink
add examples with induced slots
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Nov 13, 2024
1 parent 43abfb8 commit ab44419
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_transformer/test_biolink_subsetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from linkml_runtime.utils.schemaview import SchemaView
from src.linkml_map.utils.loaders import load_specification
from linkml_runtime.utils.formatutils import camelcase
from pprint import pprint

REPO_ROOT = Path(__file__).resolve().parent.parent

Expand Down Expand Up @@ -99,6 +100,8 @@ def test_biolink_subset_auto(biolink_schema):

class_derivations = get_biolink_class_derivations(biolink_schema, SUBSET_CLASSES)

pprint(class_derivations)

ts = TransformationSpecification(class_derivations=class_derivations)

mapper = SchemaMapper()
Expand All @@ -108,11 +111,13 @@ def test_biolink_subset_auto(biolink_schema):
target_schema_id="biolink-profile",
target_schema_name="BiolinkProfile")

yaml_dumper.dump(target_schema_obj, str("biolink-profile.yaml"))
yaml_dumper.dump(target_schema_obj, str("biolink-subset.yaml"))

transformed_sv = SchemaView("biolink-profile.yaml")

for class_name in transformed_sv.all_classes():
print(class_name)
for slot_name in transformed_sv.all_slots():
print(slot_name)


0 comments on commit ab44419

Please sign in to comment.