-
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-42576: Write task to compute predicted positions for an upcoming visit #229
Conversation
It looks like something went wrong with the rebase -- AFAICT "Added logic for MPSkyEphemerisQueryTask" should be the only commit on the PR. I'll continue the review on just 9ae80ca, but you might want to re-rebase on your end in the meantime. |
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, mostly style comments. Please remember to describe the PR in the title -- people also come across PRs from the GitHub side, and most can't remember arbitrary 5-digit codes. 🙂
doc/lsst.ap.verify/request.rst
Outdated
@@ -0,0 +1,16 @@ | |||
.. py:currentmodule:: lsst.ap.verify | |||
|
|||
.. program:: ap_verify.py |
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.
The program::
directive is unnecessary -- it's used for defining :option:
links to command-line arguments.
doc/lsst.ap.verify/request.rst
Outdated
mpSkyEphemerisQueryTask | ||
======================= | ||
``ap_verify`` now runs mpSkyEphemerisQuery, which includes a request to mpSky. | ||
mpSky is not expected to host ephemerides for all test datasets, so it will | ||
often (or always) fail. When requests fail, mpSkyEphemerisQuery should return | ||
an empty DataFrame, and no detections will be associated. |
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 follow the RST style guide, in particular having a space after the header and not hard-wrapping the text. Hard-wrapping makes it hard to tell what's been edited in later changes.
doc/lsst.ap.verify/request.rst
Outdated
|
||
mpSkyEphemerisQueryTask | ||
======================= | ||
``ap_verify`` now runs mpSkyEphemerisQuery, which includes a request to mpSky. |
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.
Strictly speaking, ap_verify
is just a framework for running preconfigured pipelines on preconfigured data sets, and has nothing to do with the pipeline contents (except for the APDB, out of necessity). How about:
``ap_verify`` now runs mpSkyEphemerisQuery, which includes a request to mpSky. | |
The AP pipelines now run :py:class:`lsst.ap.association.MPSkyEphemerisQueryTask`, which includes a request to mpSky. |
An :lsst-task:
role would be more appropriate, but I'm guessing you don't want to add a task topic page to ap_association
at this point.
doc/lsst.ap.verify/request.rst
Outdated
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.
This file is not actually linked to the documentation in any way, and users won't be able to see it. Nor is "mpSkyEphemerisQueryTask external request" really an ap_verify
topic as such...
Would you be willing to expand this page into a "Known Limitations" topic, and make the MPSkyEphemerisQueryTask text a section of it?
tests/test_testPipeline.py
Outdated
# name=VISIT, instrument=INSTRUMENT, | ||
# class_name="lsst.obs.base.instrument_tests.DummyCam", | ||
# ) | ||
|
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 do not commit unused code.
tests/test_testPipeline.py
Outdated
cls.repo.registry.syncDimensionData("instrument", instrumentRecord) | ||
butlerTests.addDataIdValue(cls.repo, "physical_filter", PHYSICAL, band=BAND) | ||
butlerTests.addDataIdValue(cls.repo, "subfilter", SUB_FILTER) | ||
butlerTests.addDataIdValue(cls.repo, "exposure", VISIT) | ||
butlerTests.addDataIdValue(cls.repo, "visit", VISIT) | ||
butlerTests.addDataIdValue(cls.repo, "group", VISIT) |
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.
This is not correct; group
is always a string, not an integer. Please make a new value (currently group names are always timestamps, but this is not guaranteed so there's no need to enforce it here).
tests/test_testPipeline.py
Outdated
@@ -220,6 +232,7 @@ def testMockGetTemplateTask(self): | |||
pipelineTests.runTestQuantum(task, self.butler, quantum, mockRun=False) | |||
|
|||
def testMockAlardLuptonSubtractTask(self): | |||
|
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'm ignoring most of the gratuitous whitespace changes, but this one is actually against Python conventions. I'm surprised flake8
didn't complain.
tests/test_testPipeline.py
Outdated
@@ -351,14 +379,14 @@ def testMockDiaPipelineTask(self): | |||
pipelineTests.assertValidOutput(task, result) | |||
|
|||
self.butler.put(pandas.DataFrame(), "deepDiff_diaSrcTable", self.visitId) | |||
self.butler.put(pandas.DataFrame(), "visitSsObjects", self.visitId) | |||
self.butler.put(pandas.DataFrame(), "preloaded_ssObjects", self.groupId) |
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.
It's a bit strange that you can drop visitSsObjects
, because the default DiaPipelineConnections
still takes them as inputs. That and the fix below means this code wasn't being exercised in the first place. 😞
I'd recommend leaving this with visitSsObjects
, since what we're supposed to be testing here is whether MockDiaPipelineTask
is still representative of DiaPipelineTask
, which has not been modified to support the new group-based dataset.
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.
tests/test_testPipeline.py::MockTaskTestSuite::testMockDiaPipelineTask fails when this is left with visitSsObjects
but does not when this is left with preloaded_SsObjects
(new capitalization).
9ae80ca
to
9c53b31
Compare
7967af9
to
53360ff
Compare
Before I try to re-review this, can you please re-rebase onto |
88ac572
to
e3a5e91
Compare
Done! |
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 a few comments about the new docs.
doc/lsst.ap.verify/limitations.rst
Outdated
|
||
######################################## | ||
Known Limitations | ||
######################################## |
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.
Sphinx requires that the header symbol lines be exactly as long as the header text. Please do run package-docs build
, it will catch such things.
doc/lsst.ap.verify/limitations.rst
Outdated
mpSkyEphemerisQueryTask | ||
======================= | ||
|
||
The AP pipelines now run :py:class:`lsst.ap.association.MPSkyEphemerisQueryTask`, which includes a request to mpSky. mpSky is not expected to host ephemerides for all test datasets, so it will often (or always) fail. When requests fail, mpSkyEphemerisQuery should return an empty DataFrame, and no detections will be associated. |
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 write each sentence on a new line; this makes it easier to spot future changes (as opposed to, say, changing one word and git diff
counting it as replacing the whole paragraph).
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.
The last sentence is out of date now. 🙂
Please squash the "Formatting" commit, as it's a classic "fixup". You'll also need to rebase again; fortunately the merge conflict is easy to resolve because |
3ae9676
to
7650473
Compare
7650473
to
6e86cd2
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.