New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-4551: Allow override of storage class on butler.get() #737
Conversation
Codecov ReportBase: 84.70% // Head: 84.75% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #737 +/- ##
==========================================
+ Coverage 84.70% 84.75% +0.04%
==========================================
Files 254 254
Lines 32894 32946 +52
Branches 5629 5632 +3
==========================================
+ Hits 27864 27922 +58
+ Misses 3803 3801 -2
+ Partials 1227 1223 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
6722881
to
aefb1b6
Compare
This can be useful when forcing storage class type conversions.
This test was there for when registry would disassemble and give datastore individual components. We no longer do this so there is no need to test the functionality, especially since that relied on special logic where the read and write storage classes did not match. Now we have storage class conversion infrastructure that test is no longer valid and datastore can just depend on whether a component has been requested without trying to guess from the storage class discrepancy that this has been an external disassembly.
The in-memory datastore was still trying to assume that the storage classes not matching meant that a component was being requested.
This is used to override the storage class associated with the requested dataset ref.
This should lead to a very quick error message before the data are retrieved.
74096b3
to
9d0128d
Compare
It has been pointed out that a butler.get always implies reading.
Support
data = butler.getDirect(ref, readStorageClass="AstropyTable")
style overrides.Checklist
doc/changes