From 1a905718c3e950e24249e12fcd65b73306f59bf5 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Tue, 17 Sep 2024 14:56:23 -0700 Subject: [PATCH] Update pipeline tests for IsrTaskLSST pipelines. --- tests/test_pipelines.py | 57 +++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/tests/test_pipelines.py b/tests/test_pipelines.py index 6ab7ca37..f8dba239 100644 --- a/tests/test_pipelines.py +++ b/tests/test_pipelines.py @@ -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: @@ -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): @@ -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)) @@ -141,7 +158,10 @@ 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)) @@ -149,7 +169,11 @@ def test_lsstcam_imsim_pipelines(self): 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)) @@ -158,7 +182,11 @@ 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)) @@ -166,7 +194,10 @@ def test_lsstcomcamsim_pipelines(self): 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)) @@ -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)) @@ -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))