Skip to content

Commit

Permalink
Guard against spurious int->float conversions in TaskMetadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jan 16, 2025
1 parent 52fe6bc commit 8d283b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/lsst/pipe/base/quantum_provenance_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,10 @@ def __add_new_graph(
):
md = butler.get(quantum_run.metadata_ref)
try:

Check warning on line 972 in python/lsst/pipe/base/quantum_provenance_graph.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/quantum_provenance_graph.py#L971-L972

Added lines #L971 - L972 were not covered by tests
quantum_run.caveats = QuantumSuccessCaveats(md["quantum"]["caveats"])
# Int conversion guards against spurious conversion to
# float that can apparently sometimes happen in
# TaskMetadata.
quantum_run.caveats = QuantumSuccessCaveats(int(md["quantum"]["caveats"]))
except LookupError:
pass

Check warning on line 978 in python/lsst/pipe/base/quantum_provenance_graph.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/quantum_provenance_graph.py#L976-L978

Added lines #L976 - L978 were not covered by tests
# missing metadata means that the task did not finish.
Expand Down

0 comments on commit 8d283b1

Please sign in to comment.