Skip to content

Commit

Permalink
Update pipeline tests for IsrTaskLSST pipelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Sep 23, 2024
1 parent 1733df8 commit 1a90571
Showing 1 changed file with 47 additions and 10 deletions.
57 changes: 47 additions & 10 deletions tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def _get_pipelines(self, exclude=[]):
"cpPlotPtc.yaml",
"cpPtc.yaml",
"cpSky.yaml",
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
}

for ex in exclude:
Expand All @@ -97,10 +100,14 @@ def _check_pipeline(self, pipeline_file):
def test_ingredients(self):
"""Check that all pipelines in pipelines/_ingredients are tested."""
glob_str = os.path.join(self.pipeline_path, "_ingredients", "*.yaml")
# The *LSST.yaml pipelines are imported by LATISS/LSSTComCam/LSSTCam
# and are not to be tested on their own.
ingredients = set(
[os.path.basename(pipeline) for pipeline in glob.glob(glob_str)]
[os.path.basename(pipeline) for pipeline in glob.glob(glob_str) if "LSST.yaml" not in pipeline]
)
expected = self._get_pipelines()
# The *Bootstrap* pipelines are used by LATISS/LSSTComCam/LSSTCam
# but are renamed on import.
expected = set([pipeline for pipeline in self._get_pipelines() if "Bootstrap" not in pipeline])
self.assertEqual(ingredients, expected)

def test_cameras(self):
Expand All @@ -125,14 +132,24 @@ 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(exclude=["cpMonochromatorScan.yaml"]):
for pipeline in self._get_pipelines(exclude=[
"cpMonochromatorScan.yaml",
# TODO DM-46356: Remove following from exclusion list.
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.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=[
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
# TODO DM-46358: Remove following from exclusion list.
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTCam", pipeline))

Expand All @@ -141,15 +158,22 @@ def test_lsstcam_imsim_pipelines(self):
for pipeline in self._get_pipelines(exclude=[
"cpDarkForDefects.yaml",
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.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=[
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
# TODO DM-46357: Remove following from exclusion list.
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTComCam", pipeline))

Expand All @@ -158,15 +182,22 @@ def test_lsstcomcamsim_pipelines(self):
for pipeline in self._get_pipelines(exclude=[
"cpDarkForDefects.yaml",
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
# TODO DM-46357: Remove following from exclusion list.
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSSTComCamSim", pipeline))

@unittest.skipIf(not has_obs_lsst, reason="Cannot test LSST-TS8 pipelines without obs_lsst")
def test_lsst_ts8_pipelines(self):
for pipeline in self._get_pipelines(exclude=[
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "LSST-TS8", pipeline))

Expand All @@ -175,7 +206,10 @@ def test_decam_pipelines(self):
for pipeline in self._get_pipelines(exclude=[
"cpDarkForDefects.yaml",
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "DECam", pipeline))

Expand All @@ -184,7 +218,10 @@ def test_hsc_pipelines(self):
for pipeline in self._get_pipelines(exclude=[
"cpDarkForDefects.yaml",
"cpFilterScan.yaml",
"cpMonochromatorScan.yaml"
"cpMonochromatorScan.yaml",
"cpBiasBootstrap.yaml",
"cpDarkBootstrap.yaml",
"cpFlatBootstrap.yaml",
]):
self._check_pipeline(os.path.join(self.pipeline_path, "HSC", pipeline))

Expand Down

0 comments on commit 1a90571

Please sign in to comment.