From 199df27d6d069eb4c1ef78e50f0da18b68421d16 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 02:15:31 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 2 +- src/roman_datamodels/maker_utils/__init__.py | 11 ++++------- src/roman_datamodels/maker_utils/_fps.py | 2 +- src/roman_datamodels/maker_utils/_fps_common_meta.py | 2 -- src/roman_datamodels/maker_utils/_tvac.py | 2 +- src/roman_datamodels/maker_utils/_tvac_common_meta.py | 3 +-- src/roman_datamodels/stnode/_node.py | 8 ++++---- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 750ac55f2..6829d4629 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "astropy >=5.3.0", # "rad @ git+https://github.com/spacetelescope/rad.git", # "rad >= 0.19.2", - "rad @ git+https://github.com/PaulHuwe/rad.git@RAD-165_SepTVACFPS", + "rad @ git+https://github.com/PaulHuwe/rad.git@RAD-165_SepTVACFPS", "asdf-standard >=1.0.3", ] dynamic = [ diff --git a/src/roman_datamodels/maker_utils/__init__.py b/src/roman_datamodels/maker_utils/__init__.py index 68e2f7388..452cf6d05 100644 --- a/src/roman_datamodels/maker_utils/__init__.py +++ b/src/roman_datamodels/maker_utils/__init__.py @@ -3,17 +3,14 @@ from ._basic_meta import * # noqa: F403 from ._common_meta import * # noqa: F403 from ._datamodels import * # noqa: F403 +from ._fps import * # noqa: F403 +from ._fps_basic_meta import * # noqa: F403 +from ._fps_common_meta import * # noqa: F403 from ._ref_files import * # noqa: F403 from ._tagged_nodes import * # noqa: F403 - +from ._tvac import * # noqa: F403 from ._tvac_basic_meta import * # noqa: F403 from ._tvac_common_meta import * # noqa: F403 -from ._tvac import * # noqa: F403 - -from ._fps_basic_meta import * # noqa: F403 -from ._fps_common_meta import * # noqa: F403 -from ._fps import * # noqa: F403 - # These makers have special names to reflect the nature of their use in the pipeline SPECIAL_MAKERS = { diff --git a/src/roman_datamodels/maker_utils/_fps.py b/src/roman_datamodels/maker_utils/_fps.py index 8465090c8..26f1e76f0 100644 --- a/src/roman_datamodels/maker_utils/_fps.py +++ b/src/roman_datamodels/maker_utils/_fps.py @@ -58,7 +58,7 @@ def mk_fps_common_meta(**kwargs): dict (defined by the ground_common-1.0.0 schema) """ # prevent circular import - from ._fps_common_meta import mk_fps_exposure, mk_fps_guidestar, mk_fps_cal_step, mk_fps_ref_file, mk_fps_wfi_mode + from ._fps_common_meta import mk_fps_cal_step, mk_fps_exposure, mk_fps_guidestar, mk_fps_ref_file, mk_fps_wfi_mode meta = mk_fps_basic_meta(**kwargs) meta["cal_step"] = mk_fps_cal_step(**kwargs.get("cal_step", {})) diff --git a/src/roman_datamodels/maker_utils/_fps_common_meta.py b/src/roman_datamodels/maker_utils/_fps_common_meta.py index 2d30babcd..f47f4ec29 100644 --- a/src/roman_datamodels/maker_utils/_fps_common_meta.py +++ b/src/roman_datamodels/maker_utils/_fps_common_meta.py @@ -57,7 +57,6 @@ def mk_fps_guidestar(**kwargs): return guide - def mk_fps_wfi_mode(**kwargs): """ Create a dummy WFI mode instance with valid values for attributes @@ -104,7 +103,6 @@ def mk_fps_cal_step(**kwargs): return l2calstep - def mk_fps_ref_file(**kwargs): """ Create a dummy RefFile instance with valid values for attributes diff --git a/src/roman_datamodels/maker_utils/_tvac.py b/src/roman_datamodels/maker_utils/_tvac.py index c15c74605..3426cd405 100644 --- a/src/roman_datamodels/maker_utils/_tvac.py +++ b/src/roman_datamodels/maker_utils/_tvac.py @@ -104,7 +104,7 @@ def mk_tvac_common_meta(**kwargs): dict (defined by the ground_common-1.0.0 schema) """ # prevent circular import - from ._tvac_common_meta import mk_tvac_exposure, mk_tvac_guidestar, mk_tvac_cal_step, mk_tvac_ref_file, mk_tvac_wfi_mode + from ._tvac_common_meta import mk_tvac_cal_step, mk_tvac_exposure, mk_tvac_guidestar, mk_tvac_ref_file, mk_tvac_wfi_mode meta = mk_tvac_basic_meta(**kwargs) meta["cal_step"] = mk_tvac_cal_step(**kwargs.get("cal_step", {})) diff --git a/src/roman_datamodels/maker_utils/_tvac_common_meta.py b/src/roman_datamodels/maker_utils/_tvac_common_meta.py index b47e7a07a..437dc8cbd 100644 --- a/src/roman_datamodels/maker_utils/_tvac_common_meta.py +++ b/src/roman_datamodels/maker_utils/_tvac_common_meta.py @@ -5,6 +5,7 @@ from ._base import NONUM, NOSTR + def mk_tvac_exposure(**kwargs): """ Create a dummy BaseExposure instance with valid values for attributes @@ -56,7 +57,6 @@ def mk_tvac_guidestar(**kwargs): return guide - def mk_tvac_wfi_mode(**kwargs): """ Create a dummy WFI mode instance with valid values for attributes @@ -103,7 +103,6 @@ def mk_tvac_cal_step(**kwargs): return l2calstep - def mk_tvac_ref_file(**kwargs): """ Create a dummy RefFile instance with valid values for attributes diff --git a/src/roman_datamodels/stnode/_node.py b/src/roman_datamodels/stnode/_node.py index 4cd2ff23d..147bde493 100644 --- a/src/roman_datamodels/stnode/_node.py +++ b/src/roman_datamodels/stnode/_node.py @@ -316,9 +316,9 @@ def __setitem__(self, key, value): # Convert the value to a tagged scalar if necessary if self._tag and "/tvac" in self._tag: - value = self._convert_to_scalar("tvac_"+key, value) + value = self._convert_to_scalar("tvac_" + key, value) elif self._tag and "/fps" in self._tag: - value = self._convert_to_scalar("fps_"+key, value) + value = self._convert_to_scalar("fps_" + key, value) else: value = self._convert_to_scalar(key, value) @@ -326,9 +326,9 @@ def __setitem__(self, key, value): if isinstance(value, dict): for sub_key, sub_value in value.items(): if self._tag and "/tvac" in self._tag: - value[sub_key] = self._convert_to_scalar("tvac_"+sub_key, sub_value) + value[sub_key] = self._convert_to_scalar("tvac_" + sub_key, sub_value) elif self._tag and "/fps" in self._tag: - value[sub_key] = self._convert_to_scalar("fps_"+sub_key, sub_value) + value[sub_key] = self._convert_to_scalar("fps_" + sub_key, sub_value) else: value[sub_key] = self._convert_to_scalar(sub_key, sub_value)