Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and stscieisenhamer committed Oct 26, 2023
1 parent fc4c4b8 commit 113dcd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 1 addition & 5 deletions romancal/stpipe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 6 additions & 3 deletions romancal/stpipe/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

0 comments on commit 113dcd5

Please sign in to comment.