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-31833: Move LoadDiaCatalogs to standalone pipelineTask #230

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

isullivan
Copy link
Contributor

{Summary of changes. Prefix PR title with JIRA issue.}


  • [ x] Do unit tests pass (scons and/or stack-os-matrix)?
  • [ x] Did you run ap_verify.py on at least one of the standard datasets?
    For changes to metrics, the print_metricvalues script from lsst.verify will be useful.
  • [ x] Is the Sphinx documentation up-to-date?

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Looks good, just style comments.

Copy link
Member

Choose a reason for hiding this comment

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

Please add MockLoadDiaCatalogsTask to tests/MockApPipe.yaml; otherwise there's no point in having it.

MockSpatiallySampledMetricsTask, MockLoadDiaCatalogsTask
from lsst.daf.butler import Timespan
from lsst.pipe.base.utils import RegionTimeInfo
from lsst.sphgeom import UnitVector3d
Copy link
Member

Choose a reason for hiding this comment

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

I recommend sticking to the established (dependency) order, so that it's easier for future developers to see that the import already exists.

Comment on lines 161 to 162
points = [UnitVector3d.Z(), UnitVector3d.X(), UnitVector3d.Y()]
region = lsst.sphgeom.ConvexPolygon(points)
Copy link
Member

Choose a reason for hiding this comment

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

If you're making a dummy input, sphgeom.Circle has a default constructor so you don't have to import UnitVector3d. You get an empty region either way.

@@ -347,9 +380,13 @@ def testMockDiaPipelineTask(self):
task = MockDiaPipelineTask(config=config)
pipelineTests.assertValidInitOutput(task)
result = task.run(pandas.DataFrame(), pandas.DataFrame(), afwImage.ExposureF(),
afwImage.ExposureF(), afwImage.ExposureF(), 42, 'k')
afwImage.ExposureF(), afwImage.ExposureF(), pandas.DataFrame(),
pandas.DataFrame(), pandas.DataFrame(), 'k', 42)
Copy link
Member

Choose a reason for hiding this comment

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

I think the DiaPipelineTask API has gotten to the point where we should be using keywords. 😬

Copy link
Member

Choose a reason for hiding this comment

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

Same question about why this wasn't caught earlier. MockDiaPipelineTask allows idGenerator=None, but the original does not.

(And again, such a fix should have been a separate commit.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll clean up some of the mocks, but it looks like they were not updated when we removed ccdExposureIdBits. This would seem to be an argument in favor of removing test_testPipeline, since it doesn't necessarily catch changes to Task API's unless the Mocks in testPipeline.py are also updated.

@isullivan isullivan merged commit 8f5c408 into main Aug 15, 2024
2 checks passed
@isullivan isullivan deleted the tickets/DM-31833 branch August 15, 2024 05:36
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.

2 participants