Skip to content
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-44085: Generalize runQuantum to allow for arbitrary connections #242

Merged
merged 11 commits into from
Apr 29, 2024

Conversation

arunkannawadi
Copy link
Member

No description provided.

@arunkannawadi arunkannawadi marked this pull request as ready for review April 29, 2024 14:40
@arunkannawadi
Copy link
Member Author

I'll fix the linting errors while rebasing and reorganizing the commits.

python/lsst/analysis/tools/interfaces/_task.py Outdated Show resolved Hide resolved
plotInfo = self.parsePlotInfo(inputs, dataId)
data = self.loadData(inputs["data"])
skymap = None if "skymap" not in inputs.keys() else inputs["skymap"]
camera = None if "camera" not in inputs.keys() else inputs["camera"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if I read this correctly, we no longer need a special carve-out for camera here - is that correct? I see the base runQuantum has a carve-out for skymap, but not for camera.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this ticket, even the base class shouldn't have a special carve-out for skymap. Defining connections should be sufficient, and no specializion of the runQuantum method is required. This is the main motivation for this ticket, because it was causing much confusion among the SciUnit members.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we therefore also remove the special carve out for skymap here too?

Or is this needed elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR removes this. I made an inline comment just now.

@arunkannawadi arunkannawadi force-pushed the tickets/DM-44085 branch 2 times, most recently from 733fb97 to 5c21d4b Compare April 29, 2024 15:47
@leeskelvin
Copy link
Contributor

This looks good, and captures a number of good QoL improvement! 👍

This function is superseded by a method of the same name attached to
AnalysisPipelineTask.
The signature of the `run` method is generic enough to take arbitrary
keyword arguments, and the caller `runQuantum` should pass all the
relevant inputs without placing unnecessary restrictions.
parsePlotInfo in DiffimDetectorVisitSpatiallySampledPlotsTask. This
avoids an unnecessary override of `runQuantum` and the relevant logic is
implemented in `parsePlotInfo` instead of in `runQuantum`.
This a) sets `rcParams` once while importing `analysis_tools` and b)
enables setting it even when tasks that override the `runQuantum` method
are run.
@arunkannawadi arunkannawadi merged commit 22e735d into main Apr 29, 2024
8 checks passed
@arunkannawadi arunkannawadi deleted the tickets/DM-44085 branch April 29, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants