-
Notifications
You must be signed in to change notification settings - Fork 47
[IO-1496][external] Expose the name, type, and edge_ids of Stage objects #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… pulled with folders
"Merge master into branch due to divergent flow"
IO-1496 Stage is missing name, type, and edges
The Add these, as properties with loading if necessary. Acceptance criteria
|
owencjones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not approved yet, but this is good. If you DM me when you've considered all the stuff, then I'll approve.
darwin/future/meta/objects/stage.py
Outdated
| @property | ||
| def edges(self) -> List[List[UUID]]: | ||
| """Edge ID, source stage ID, target stage ID.""" | ||
| edges = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not obligatory, but you could do this with a list comprehension, which are a bit faster, and worth getting used to.
return [
[edge.id, edge.source_stage_id, edge.target_stage_id]
for edge in in self._element.edges
]Optional, but consider it, and also have a think about listcomps in general.
owencjones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after PR changes
Problem
Stageobjects currently don't expose theirname,type, oredge_idsSolution
Write
Stageclass properties to expose these fieldsChangelog
Added the ability to access the name, type, and edge_ids of a Stage object