Skip to content

Commit

Permalink
Added funcitonality to access stage names, types, and edges
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie committed Oct 18, 2023
1 parent 23441b2 commit 08e657e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions darwin/future/meta/objects/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,25 @@ def move_attached_files_to_stage(self, new_stage_id: UUID) -> Stage:

@property
def id(self) -> UUID:
"""Stage ID."""
return self._element.id

@property
def name(self) -> str:
"""Stage name."""
return self._element.name

@property
def type(self) -> str:
"""Stage type."""
return self._element.type.value

@property
def edges(self) -> List[List[UUID]]:
"""Edge ID, source stage ID, target stage ID."""
edges = []
for edge in self._element.edges:
edges.append(
[edge.id, edge.source_stage_id, edge.target_stage_id]
)
return edges

0 comments on commit 08e657e

Please sign in to comment.