diff --git a/romancal/stpipe/core.py b/romancal/stpipe/core.py index 54a145677..c379b354a 100644 --- a/romancal/stpipe/core.py +++ b/romancal/stpipe/core.py @@ -2,18 +2,14 @@ Roman Calibration Pipeline base class """ import logging -import os import time import roman_datamodels as rdm from roman_datamodels.datamodels import ImageModel -from stpipe import Pipeline, Step +from stpipe import Pipeline, Step, crds_client from ..lib.suffix import remove_suffix -from stpipe import crds_client - - _LOG_FORMATTER = logging.Formatter( "%(asctime)s.%(msecs)03dZ :: %(name)s :: %(levelname)s :: %(message)s", datefmt="%Y-%m-%dT%H:%M:%S", diff --git a/romancal/stpipe/tests/test_core.py b/romancal/stpipe/tests/test_core.py index 7ba8fff71..c50301a4d 100644 --- a/romancal/stpipe/tests/test_core.py +++ b/romancal/stpipe/tests/test_core.py @@ -101,15 +101,18 @@ def process(self): ) def test_crds_meta(): """Test that context and software versions are set""" + class ReflectStep(RomanStep): def process(self, input): return input im = ImageModel(mk_level2_image(shape=(20, 20))) - im.meta.ref_file.crds.sw_version = 'junkversion' - im.meta.ref_file.crds.context_used = 'junkcontext' + im.meta.ref_file.crds.sw_version = "junkversion" + im.meta.ref_file.crds.context_used = "junkcontext" result = ReflectStep.call(im) assert result.meta.ref_file.crds.sw_version == crds_client.get_svn_version() - assert result.meta.ref_file.crds.context_used == crds_client.get_context_used(result.crds_observatory) + assert result.meta.ref_file.crds.context_used == crds_client.get_context_used( + result.crds_observatory + )