Skip to content

Commit

Permalink
log even if result is not a datamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Sep 6, 2024
1 parent fce1b67 commit b372fed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jwst/stpipe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@ def load_as_level3_asn(self, obj):
return asn

def finalize_result(self, result, reference_files_used):
crds_context = crds_client.get_context_used('jwst')

if self.parent is None:
log.info(f"Results used CRDS context: {crds_context}")
log.info(f"Results used jwst version: {__version__}")

if isinstance(result, JwstDataModel):
result.meta.calibration_software_revision = __version_commit__ or 'RELEASE'
result.meta.calibration_software_version = __version__

crds_context = crds_client.get_context_used(result.crds_observatory)

if len(reference_files_used) > 0:
for ref_name, filename in reference_files_used:
Expand All @@ -89,11 +94,6 @@ def finalize_result(self, result, reference_files_used):
result.meta.ref_file.crds.sw_version = crds_client.get_svn_version()
result.meta.ref_file.crds.context_used = crds_context

if self.parent is None:
log.info(f"Results used CRDS context: {crds_context}")
log.info(f"Results used jwst version: {__version__}")


def remove_suffix(self, name):
return remove_suffix(name)

Expand Down

0 comments on commit b372fed

Please sign in to comment.