Skip to content

Commit

Permalink
Introduce a semantic path
Browse files Browse the repository at this point in the history
  • Loading branch information
liamhuber committed Jan 16, 2024
1 parent 874aaff commit 5b525f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pyiron_workflow/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class Node(HasToDict, ABC, metaclass=AbstractHasPost):
"""

package_identifier = None
_semantic_delimiter = "/"

def __init__(
self,
Expand Down Expand Up @@ -322,6 +323,15 @@ def root(self) -> Node:
"""The parent-most node in this graph."""
return self if self.parent is None else self.parent.root

@property
def semantic_path(self):
path = self.label
if self.parent is not None:
path = self.parent.semantic_path + self._semantic_delimiter + path
# else:
# path = self.semantic_root + self._semantic_delimiter + path
return path

@property
def readiness_report(self) -> str:
input_readiness = "\n".join(
Expand Down

0 comments on commit 5b525f1

Please sign in to comment.