Skip to content

Commit

Permalink
Update tests to support verifyGainFromFlatPairs/verifyGain.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Sep 21, 2024
1 parent 2570bcc commit a9224b2
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def _get_pipelines(self, exclude=[]):
"verifyDefectsIndividual.yaml",
"verifyDefects.yaml",
"verifyFlat.yaml",
# Old pipeline name.
"verifyGain.yaml",
# New pipeline name.
"verifyGainFromFlatPairs.yaml",
"verifyLinearizer.yaml",
"verifyPtc.yaml",
}
Expand Down Expand Up @@ -98,7 +101,12 @@ def test_ingredients(self):
ingredients = set(
[os.path.basename(pipeline) for pipeline in glob.glob(glob_str) if "LSST.yaml" not in pipeline]
)
# The _ingredients/verifyGainFromFlatPairs.yaml becomes
# verifyGain.yaml in older pipelines for compatibility.
expected = self._get_pipelines()
# The _ingredients/verifyGainFromFlatPairs.yaml becomes
# verifyGain.yaml in older pipelines for compatibility.
expected.remove("verifyGain.yaml")
self.assertEqual(ingredients, expected)

def test_cameras(self):
Expand All @@ -122,37 +130,41 @@ def test_cameras(self):

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LATISS pipelines without obs_lsst")
def test_latiss_pipelines(self):
for pipeline in self._get_pipelines():
# TODO DM-46356: Change exclusion to verifyGain.yaml
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "LATISS", pipeline))

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LSSTCam pipelines without obs_lsst")
def test_lsstcam_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
# TODO DM-46358: Change exclusion to verifyGain.yaml
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTCam", pipeline))

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LSSTCam-imSim pipelines without obs_lsst")
def test_lsstcam_imsim_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTCam-imSim", pipeline))

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LSSTComCam pipelines without obs_lsst")
def test_lsstcomcam_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
# TODO DM-46357: Change exclusion to verifyGain.yaml
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTComCam", pipeline))

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LSSTComCamSim pipelines without obs_lsst")
def test_lsstcomcamsim_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
# TODO DM-46357: Change exclusion to verifyGain.yaml
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTComCamSim", pipeline))

@unittest.skipIf(not has_obs_decam, reason="Cannot test DECam pipelines without obs_decam")
def test_decam_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "DECam", pipeline))

@unittest.skipIf(not has_obs_subaru, reason="Cannot test HSC pipelines without obs_subaru")
def test_hsc_pipelines(self):
for pipeline in self._get_pipelines(exclude=[]):
for pipeline in self._get_pipelines(exclude=["verifyGainFromFlatPairs.yaml"]):
self._check_pipeline(os.path.join(self.pipeline_path, "HSC", pipeline))


Expand Down

0 comments on commit a9224b2

Please sign in to comment.