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-27117: Add dummy pipeline to ap_verify testing #151

Merged
merged 13 commits into from Feb 18, 2022
Merged

Conversation

kfindeisen
Copy link
Member

This PR adds a dummy pipeline that mirrors the form, configuration, and connections of ${AP_PIPE_DIR}/pipelines/ApPipe.yaml, but is specialized for ap_verify_testdata and does no processing besides dataset handling. It then rewrites the tests in test_driver.py to make use of the new pipeline.

This change pushes the total unit test run time up to a minute (30 s per individual test), but I don't see any way to reduce this time at present. Because the repository setup for ap_verify is fairly complex and doesn't allow for customization hooks, creating an in-memory repository is not practical. I did try to factor the repository setup into setUpClass, but this actually increased test run time.

In any case, 20 s of each test's 30 s run time is from running the pipeline itself; this will be addressed on DM-33734 since it has implications for Production.

Copy link
Contributor

@andy-slac andy-slac 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, few minor comments.

python/lsst/ap/verify/testPipeline.py Show resolved Hide resolved
python/lsst/ap/verify/testPipeline.py Outdated Show resolved Hide resolved
python/lsst/ap/verify/testPipeline.py Show resolved Hide resolved

def runQuantum(self, butlerQC, inputRefs, outputRefs):
inputs = butlerQC.get(inputRefs)
if 'exposureIdInfo' not in inputs.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

Double quotes for strings?

python/lsst/ap/verify/testPipeline.py Outdated Show resolved Hide resolved
python/lsst/ap/verify/testPipeline.py Outdated Show resolved Hide resolved
python/lsst/ap/verify/testPipeline.py Show resolved Hide resolved
Comment on lines +214 to +220
inputs['exposureIdInfo'] = obsBase.ExposureIdInfo.fromDataId(
butlerQC.quantum.dataId, "visit_detector")

if self.config.doAstrometry:
inputs.pop('astromRefCat')
if self.config.doPhotoCal:
inputs.pop('photoRefCat')
Copy link
Contributor

Choose a reason for hiding this comment

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

Double quotes for all string literals?

python/lsst/ap/verify/testPipeline.py Outdated Show resolved Hide resolved
@kfindeisen kfindeisen merged commit 47dec79 into main Feb 18, 2022
@kfindeisen kfindeisen deleted the tickets/DM-27117 branch February 18, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants