-
Notifications
You must be signed in to change notification settings - Fork 9
DM-47085: Refactor getTemplate run/runQuantum/getOverlappingExposures #347
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
c330797 to
335557b
Compare
335557b to
e160fba
Compare
e160fba to
9242f92
Compare
arunkannawadi
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.
Passing various inputs as keyword-only arguments is certainly much cleaner. Aside from the minor inline reviews, two larger changes requests are:
- Since
GetDcrTemplateTaskinherits fromGetTemplateTask, the API changes togetOverlappingExposuresshould be reflected in the former as well. - Although DM-CCB has approved the change, a user of this public method might get annoyed by the changing API without a deprecation warning. I'd suggest renaming the method to
getOverlappingCoaddExposuresor something, and definegetOverlappingExposures(with deprecated decorator) as something that rips out the quantities frominputsand callsgetOverlappingCoaddExposures.
| @@ -123,15 +123,24 @@ def __init__(self, *args, **kwargs): | |||
|
|
|||
| def runQuantum(self, butlerQC, inputRefs, outputRefs): | |||
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 runQuantum(self, butlerQC, inputRefs, outputRefs): | |
| def runQuantum(self, butlerQC, inputRefs, outputRefs): | |
| # Docstring inherited. |
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.
Do we really need to put this everywhere there isn't a docstring? I don't see this mentioned in the dev guide, and always figured that if there isn't a docstring it was implied.
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.
Well, it was more of a suggestion here. The lack of docstring jumps out sometimes, and seeing that comment reassures that it's not needed. This could be just me.
|
The problem with modifying |
|
Similarly, I'll change names and add a deprecated version, but I can't guarantee that it will work because it won't be tested. |
|
Following up: I'm not going to touch |
Bring `runQauntum` more in line with how we want arguments to be handled (load the inputs and pass them as named arguments). Refactor `getOverlappingExposures` so that it can be used more easily as outside of `runQuantum`. Change method name to `getExposures` allow deprecation warning on original `getOverlappingExposures`.
9242f92 to
c9ddf76
Compare
|
I've filed https://rubinobs.atlassian.net/browse/DM-49079 about the Dcr template code. I believe I've incorporated all the rest of your suggestions. |
Placeholder, including the commits from DM-47084 (will rebase onto main once that merges)- rebased to main, only the one final RFC commit.