Skip to content

Commit

Permalink
Make ontology trickle down
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Feb 4, 2025
1 parent a793297 commit adf0a87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyiron_ontology/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def _translate_has_value(
value=getattr(value, k, None),
dtype=v,
parent=tag_uri,
ontology=ontology,
)
for k, v in dtype.__annotations__.items():
metadata = meta_to_dict(v)
Expand All @@ -119,6 +120,7 @@ def _translate_has_value(
dtype=metadata["dtype"],
units=metadata.get("units", None),
parent=tag_uri,
ontology=ontology,
)
else:
if parent is not None:
Expand Down Expand Up @@ -217,6 +219,7 @@ def get_triples(
value=d.get("value", None),
dtype=d.get("dtype", None),
units=d.get("units", None),
ontology=ontology,
)
for t in _get_triples_from_restrictions(d):
graph.add(_parse_triple(t, ns=node_label, label=channel_label))
Expand Down Expand Up @@ -390,7 +393,8 @@ def parse_workflow(
graph += get_triples(
data=data,
workflow_namespace=workflow.label,
ontology=ontology,
)
if inherit_properties:
_inherit_properties(graph)
_inherit_properties(graph, ontology=ontology)
return graph

0 comments on commit adf0a87

Please sign in to comment.