Skip to content

Commit

Permalink
Convert deprecated dimension packer usage.
Browse files Browse the repository at this point in the history
This should have happened long ago, on DM-31924.  I found it here by
accidentally being overzealous about which deprecation warnings I
temporarily turned into errors in daf_butler.
  • Loading branch information
TallJimbo committed Nov 21, 2023
1 parent 327c515 commit 9452cd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def checkRepo(self, files=None):
# results consistent with what we have historically gotten (from Gen2).
for dataId in self.dataIds:
expandedDataId = butler.registry.expandDataId(dataId)
packed, bits = expandedDataId.pack("exposure_detector", returnMaxBits=True)
packer = self.instrumentClass.make_default_dimension_packer(expandedDataId, is_exposure=True)
packed, bits = packer.pack(expandedDataId, returnMaxBits=True)
self.assertEqual(packed, int(f"{dataId['exposure']}{dataId['detector']:02}"))
self.assertEqual(bits, 32)

Expand Down

0 comments on commit 9452cd5

Please sign in to comment.