diff --git a/doc/version-history.rst b/doc/version-history.rst index 6222c1b4..c9ff6d63 100644 --- a/doc/version-history.rst +++ b/doc/version-history.rst @@ -10,6 +10,10 @@ Version History .. No new work should be required in order to complete this section. .. Below is an example of a version history format. +v0.19.0 +------- +* Added the ComCam/MTCamera environment-based handling. + v0.18.0 ------- * Switched to the new auxtel/latiss_acquire.py script. diff --git a/python/lsst/ts/IntegrationTests/maintel_disabled_enabled.py b/python/lsst/ts/IntegrationTests/maintel_disabled_enabled.py index 6932b61c..f22d3741 100644 --- a/python/lsst/ts/IntegrationTests/maintel_disabled_enabled.py +++ b/python/lsst/ts/IntegrationTests/maintel_disabled_enabled.py @@ -28,6 +28,7 @@ from lsst.ts.IntegrationTests import BaseScript from .configs.config_registry import registry +from .utils import get_test_env_arg class MainTelDisabledEnabled(BaseScript): @@ -61,10 +62,30 @@ def __init__(self, test_env: str) -> None: # Running on TTS or Summit with CCCamera self.big_cam = "CCCamera" self.big_cam_configs["data"][0][0] = self.big_cam + self.configs = ( + registry["maintel_disabled_enabled"], + yaml.safe_dump(self.big_cam_configs), + ) def run_maintel_disabled_enabled() -> None: - script_class = MainTelDisabledEnabled() - num_scripts = len(script_class.scripts) - print(f"\nMainTel Disabled to Enabled; running {num_scripts} scripts") + # Ensure the invocation is correct. + # If not, raise KeyError. + # If it is correct, execute the state transition. + args = get_test_env_arg() + try: + script_class = MainTelDisabledEnabled( + test_env=args.test_env, + ) + except KeyError as ke: + print(repr(ke)) + else: + num_scripts = len(script_class.scripts) + print( + f"\nMainTel Disabled to Enabled; " + f"running {num_scripts} scripts" + f"on the '{args.test_env}' environment, " + f"with this configuration: \n" + f"{script_class.configs}" + ) asyncio.run(script_class.run()) diff --git a/python/lsst/ts/IntegrationTests/maintel_standby_disabled.py b/python/lsst/ts/IntegrationTests/maintel_standby_disabled.py index 65a5eca8..e423e463 100644 --- a/python/lsst/ts/IntegrationTests/maintel_standby_disabled.py +++ b/python/lsst/ts/IntegrationTests/maintel_standby_disabled.py @@ -28,6 +28,7 @@ from lsst.ts.IntegrationTests import BaseScript from .configs.config_registry import registry +from .utils import get_test_env_arg class MainTelStandbyDisabled(BaseScript): @@ -61,10 +62,30 @@ def __init__(self, test_env: str) -> None: # Running on TTS or Summit with CCCamera self.big_cam = "CCCamera" self.big_cam_configs["data"][0][0] = self.big_cam + self.configs = ( + registry["maintel_standby_disabled"], + yaml.safe_dump(self.big_cam_configs), + ) def run_maintel_standby_disabled() -> None: - script_class = MainTelStandbyDisabled() - num_scripts = len(script_class.scripts) - print(f"\nMainTel Standby to Disabled; running {num_scripts} scripts") - asyncio.run(script_class.run()) + # Ensure the invocation is correct. + # If not, raise KeyError. + # If it is correct, execute the state transition. + args = get_test_env_arg() + try: + script_class = MainTelStandbyDisabled( + test_env=args.test_env, + ) + except KeyError as ke: + print(repr(ke)) + else: + num_scripts = len(script_class.scripts) + print( + f"\nMainTel Standby to Disabled; " + f"running {num_scripts} scripts " + f"on the '{args.test_env}' environment, " + f"with this configuration: \n" + f"{script_class.configs}" + ) + asyncio.run(script_class.run()) diff --git a/python/lsst/ts/IntegrationTests/obssys_standby_disabled.py b/python/lsst/ts/IntegrationTests/obssys_standby_disabled.py index 7ebbc72c..7e5cd643 100644 --- a/python/lsst/ts/IntegrationTests/obssys_standby_disabled.py +++ b/python/lsst/ts/IntegrationTests/obssys_standby_disabled.py @@ -75,7 +75,7 @@ def run_obssys_standby_disabled() -> None: print( f"\nObsSys Standby to Disabled; " f"running {num_scripts} scripts " - f"on the '{args.test_env}' environment. " + f"on the '{args.test_env}' environment, " f"with this configuration: \n" f"{script_class.configs}" )