-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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 good, just style comments.
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.
Please add MockLoadDiaCatalogsTask
to tests/MockApPipe.yaml
; otherwise there's no point in having it.
tests/test_testPipeline.py
Outdated
MockSpatiallySampledMetricsTask, MockLoadDiaCatalogsTask | ||
from lsst.daf.butler import Timespan | ||
from lsst.pipe.base.utils import RegionTimeInfo | ||
from lsst.sphgeom import UnitVector3d |
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 recommend sticking to the established (dependency) order, so that it's easier for future developers to see that the import already exists.
tests/test_testPipeline.py
Outdated
points = [UnitVector3d.Z(), UnitVector3d.X(), UnitVector3d.Y()] | ||
region = lsst.sphgeom.ConvexPolygon(points) |
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.
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.
tests/test_testPipeline.py
Outdated
@@ -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) |
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 think the DiaPipelineTask
API has gotten to the point where we should be using keywords. 😬
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.
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.)
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'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.
cc0a050
to
0033313
Compare
0033313
to
60d8a8d
Compare
{Summary of changes. Prefix PR title with JIRA issue.}
scons
and/orstack-os-matrix
)?ap_verify.py
on at least one of the standard datasets?For changes to metrics, the
print_metricvalues
script fromlsst.verify
will be useful.