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
DM-38952: revive pipeline mock system and move it here (from ctrl_mpexec) #339
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 82.54% 82.62% +0.07%
==========================================
Files 61 66 +5
Lines 6865 7124 +259
Branches 1363 1387 +24
==========================================
+ Hits 5667 5886 +219
- Misses 925 993 +68
+ Partials 273 245 -28
☔ View full report in Codecov by Sentry. |
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.
Looks great.
# docstring is inherited from base class | ||
return value | ||
|
||
def visitRangeLiteral(self, start: int, stop: int, stride: Optional[int], node: Node) -> Any: |
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.
def visitRangeLiteral(self, start: int, stop: int, stride: Optional[int], node: Node) -> Any: | |
def visitRangeLiteral(self, start: int, stop: int, stride: int | None, node: Node) -> Any: |
Just in case you want to take a quick modernization pass on this file -- there aren't many old-style annotations (changing to visit_range_literal
might be a step too far).
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.
Good point; I've updated the annotations. Changing the method names would require changing them in a bunch of places in daf_butler, too (though I guess they're at least internal APIs), so I agree that's a step too far.
if not isinstance(refs, list): | ||
refs = [refs] | ||
inputs_list = [] | ||
for ref in refs: |
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.
for ref in refs: | |
for ref in lsst.utils.iteration.ensure_iterable(refs): |
Then you don't need the 2 lines converting to a list above. Similarly in the outputRefs loop below.
2ee4e68
to
b1e11a1
Compare
This has bitrotted and does not work anymore, but before fixing that I wanted to get a clean transfer of what we had before with only import/formatting changes. I haven't moved the mock for ButlerQuantumContext that these classes assume, because I'll be modifying them to use the MockStorageClass and MockDataset classes instead.
This seems to have been introduced by switching derivedComponents to Mapping instead of dict, but that shouldn't have mattered.
b1e11a1
to
fee8c7b
Compare
This allows the instrument embedded in a pipeline to be passed into the graph generation algorithm even when the pipeline is converted to a sequence of TaskDef objects in advance.
42393fb
to
7dcc699
Compare
Checklist
doc/changes