Skip to content

DM-55542: Fixes for dimension universe compatibility#1397

Open
timj wants to merge 4 commits into
mainfrom
tickets/DM-55542
Open

DM-55542: Fixes for dimension universe compatibility#1397
timj wants to merge 4 commits into
mainfrom
tickets/DM-55542

Conversation

@timj

@timj timj commented Jul 17, 2026

Copy link
Copy Markdown
Member

In python mode the model_dump can return set() which can then not be dumped back to json using the DimensionConfig.dump method.

Also unify DatasetType conformance across universes (needed by lsst/pipe_base#572)

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of the updated dimensions.yaml in configs/old_dimensions and update the list in doc/lsst.daf.butler/dimensions.rst

In python mode the model_dump can return set() which can then
not be dumped back to json using the DimensionConfig.dump method.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (f884090) to head (0a4cf17).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1397   +/-   ##
=======================================
  Coverage   89.84%   89.85%           
=======================================
  Files         373      373           
  Lines       50857    50945   +88     
  Branches     5924     5928    +4     
=======================================
+ Hits        45695    45777   +82     
- Misses       3772     3778    +6     
  Partials     1390     1390           

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

timj and others added 3 commits July 17, 2026 17:15
Rebuilding a dataset type or ref in a different but compatible
dimension universe was implemented independently in the transfer_from
import path and the hybrid test registry, and downstream code needs
the same operation. Consolidate it in DatasetType.conform_to and
DatasetRef.conform_to, and migrate those call sites.

The consolidated check is stricter than the import path's original:
in addition to requiring a matching namespace and identical dimension
names, the required/implied split of the conformed dimension group
must match, since the required dimensions determine data ID keys and
dataset table columns.

Co-Authored-By: Claude Fable 5 <[email protected]>
HybridButlerRegistry.registerDatasetType must only convert dataset
types from the remote butler's universe instance; other universes are
passed through unchanged so that the direct registry's strict
universe check still applies. Conforming everything broke the
registry test that verifies registration rejects mismatched
universes.

Also test conform_to against real historical universes loaded from
the old_dimensions configuration files, in both a compatible case
(universe 7) and one where the dimension group has since gained a
member (universe 2).

Co-Authored-By: Claude Fable 5 <[email protected]>
Comparing against the default universe would make the tests sensitive
to future universe versions; compare frozen universe 7 (or 2) against
frozen universe 8 instead.

Co-Authored-By: Claude Fable 5 <[email protected]>
@timj timj changed the title DM-55542: Use JSON compatible model conversion when recreating DimensionConfig DM-55542: Fixes for dimension universe compatibility Jul 18, 2026
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.

1 participant