Skip to content
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-33303: Allow DatasetType to differ to registry on get/put #635

Merged
merged 6 commits into from Jan 21, 2022

Conversation

timj
Copy link
Member

@timj timj commented Jan 20, 2022

If the DatasetTypes are compatible with each other.

Checklist

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

This is mainly needed for the new tests in ctrl_mpexec
but can serve as an example of what is possible.
If an explicit DatasetType was given rather than a name
then previously this was an error. Now, if they are
compatible it will succeed. Furthermore, on get
the python type associated with the user-supplied
DatasetType will be returned.
These tests involve an explicit DatasetType in get/put.
can_convert should return False if one of the storage classes
can't be imported. This was tickled by one of the tests
using the Config storage class.
@codecov
Copy link

codecov bot commented Jan 20, 2022

Codecov Report

Merging #635 (b31a2de) into main (580e572) will increase coverage by 0.00%.
The diff coverage is 91.17%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #635   +/-   ##
=======================================
  Coverage   84.12%   84.13%           
=======================================
  Files         237      237           
  Lines       30185    30214   +29     
  Branches     5018     5022    +4     
=======================================
+ Hits        25394    25421   +27     
- Misses       3646     3648    +2     
  Partials     1145     1145           
Impacted Files Coverage Δ
python/lsst/daf/butler/formatters/file.py 74.54% <ø> (ø)
python/lsst/daf/butler/core/storageClass.py 93.45% <70.00%> (-0.48%) ⬇️
python/lsst/daf/butler/_butler.py 81.38% <100.00%> (+0.27%) ⬆️
tests/test_butler.py 97.69% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 580e572...b31a2de. Read the comment docs.

Copy link
Contributor

@andy-slac andy-slac 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.

@timj timj merged commit 9aeb7c1 into main Jan 21, 2022
@timj timj deleted the tickets/DM-33303 branch January 21, 2022 16:45
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.

None yet

2 participants