Skip to content

DM-54976: move obs_info to VisitImage and unify formatters further#41

Merged
TallJimbo merged 6 commits into
mainfrom
tickets/DM-54976
May 20, 2026
Merged

DM-54976: move obs_info to VisitImage and unify formatters further#41
TallJimbo merged 6 commits into
mainfrom
tickets/DM-54976

Conversation

@TallJimbo
Copy link
Copy Markdown
Member

@TallJimbo TallJimbo commented May 19, 2026

Requires lsst/daf_butler#1375

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@TallJimbo TallJimbo changed the base branch from main to tickets/DM-54910 May 19, 2026 15:12
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 59.01639% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.09%. Comparing base (02fe657) to head (698f380).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/images/formatters.py 62.22% 17 Missing ⚠️
tests/test_visit_image.py 0.00% 9 Missing ⚠️
python/lsst/images/cells/_coadd.py 20.00% 8 Missing ⚠️
python/lsst/images/_visit_image.py 68.75% 5 Missing ⚠️
python/lsst/images/_image.py 42.85% 4 Missing ⚠️
python/lsst/images/_mask.py 60.00% 4 Missing ⚠️
python/lsst/images/serialization/_common.py 76.92% 3 Missing ⚠️
python/lsst/images/_masked_image.py 83.33% 2 Missing ⚠️
python/lsst/images/cells/_provenance.py 50.00% 2 Missing ⚠️
python/lsst/images/cells/_psf.py 50.00% 2 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
- Coverage   75.12%   74.09%   -1.04%     
==========================================
  Files          92       89       -3     
  Lines       10904    10514     -390     
==========================================
- Hits         8192     7790     -402     
- Misses       2712     2724      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. So the formatter tests are now all implicitly in the RoundTrip code?

yield archive, tree
case ".json":
tree_type = pytype._get_archive_tree_type(JsonRef)
tree = tree_type.model_validate_json(ResourcePath(uri).read())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how well this works with the 600MB JSON visit image I made...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"inefficiently", especially in terms of memory consumption, I imagine.

@TallJimbo TallJimbo force-pushed the tickets/DM-54910 branch 2 times, most recently from b46d392 to acb1d81 Compare May 19, 2026 22:11
@TallJimbo
Copy link
Copy Markdown
Member Author

So the formatter tests are now all implicitly in the RoundTrip code?

Yes. I can't claim we're still touching all of the combinations of things we were before, and we probably want to beef up that kind of coverage again in the future. But I think the coverage is still pretty good right now via the RoundTrip stuff.

@TallJimbo TallJimbo force-pushed the tickets/DM-54910 branch 2 times, most recently from 599e392 to dd3cf98 Compare May 19, 2026 23:32
Base automatically changed from tickets/DM-54910 to main May 19, 2026 23:34
TallJimbo added 5 commits May 19, 2026 19:36
This requires a small change to every ArchiveTree implementation, which
makes it a very broad change.

Some LLM-generated tests have been deleted because they were focused
on private interfaces that have gone away in this change.  I think the
high-level behavior is still well covered, if not necessarily the
outer product of serializable type vs. archive format.

Since the any-format, specific-serialized-type formatters haven't been
around long, I've deleted them and made the old format-specific
formatter stubs redirect straight to the new one.
The only butler datasets with the old formatters should be ExtendedPsf
things (which are experimental), and we've agreed we can just go
delete those.
This could break depending on the order in which tests were run.
@TallJimbo TallJimbo merged commit 7eaf5dc into main May 20, 2026
15 of 17 checks passed
@TallJimbo TallJimbo deleted the tickets/DM-54976 branch May 20, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants