Skip to content

Commit

Permalink
remove checks on CI in production code
Browse files Browse the repository at this point in the history
  • Loading branch information
stscieisenhamer committed Oct 26, 2023
1 parent 10e90bd commit dcb0ee9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions romancal/stpipe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

from ..lib.suffix import remove_suffix

if os.environ.get("CI") == "false":
from stpipe import crds_client
from stpipe import crds_client


_LOG_FORMATTER = logging.Formatter(
Expand Down Expand Up @@ -67,13 +66,11 @@ def finalize_result(self, model, reference_files_used):

# this will only run if 'parent' is none, which happens when an individual
# step is being run or if self is a RomanPipeline and not a RomanStep.

if os.environ.get("CI") == "false": # no CRDS connection, do not run
if self.parent is None:
model.meta.ref_file.crds.sw_version = crds_client.get_svn_version()
model.meta.ref_file.crds.context_used = crds_client.get_context_used(
model.crds_observatory
)
if self.parent is None:
model.meta.ref_file.crds.sw_version = crds_client.get_svn_version()
model.meta.ref_file.crds.context_used = crds_client.get_context_used(
model.crds_observatory
)

def record_step_status(self, model, step_name, success=True):
"""
Expand Down

0 comments on commit dcb0ee9

Please sign in to comment.