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-33155: Also allow storage class conversion on butler.put #626

Merged
merged 5 commits into from Jan 11, 2022

Conversation

timj
Copy link
Member

@timj timj commented Jan 7, 2022

The infrastructure already existed to support it and there
is no particular reason why get should convert but put
should not. Doing this provides a way for newer classes
to be used in code but whilst still supporting old
dataset type definitions.

Checklist

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

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #626 (de65dbb) into main (32b36ee) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head de65dbb differs from pull request most recent head d781e5d. Consider uploading reports for the commit d781e5d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #626      +/-   ##
==========================================
+ Coverage   84.10%   84.11%   +0.01%     
==========================================
  Files         237      237              
  Lines       30035    30050      +15     
  Branches     4990     4990              
==========================================
+ Hits        25260    25277      +17     
+ Misses       3638     3635       -3     
- Partials     1137     1138       +1     
Impacted Files Coverage Δ
python/lsst/daf/butler/datastores/fileDatastore.py 80.33% <100.00%> (+0.02%) ⬆️
tests/test_butler.py 97.67% <100.00%> (+0.02%) ⬆️
...ython/lsst/daf/butler/tests/_examplePythonTypes.py 90.10% <0.00%> (+2.19%) ⬆️

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 32b36ee...d781e5d. Read the comment docs.

tests/test_butler.py Outdated Show resolved Hide resolved
The infrastructure already existed to support it and there
is no particular reason why get should convert but put
should not. Doing this provides a way for newer classes
to be used in code but whilst still supporting old
dataset type definitions.
We run runPutGetTest a lot and sometimes we run it just to
get a configured butler with some dimensions and a dataset type
defined. Move the set up code into a different method and now
the put coercion test can use it and so be a little bit faster.
pydantic was missing from setup.cfg and psutil was still
there for utils but utils should bring it in now.
@timj timj merged commit 313a0bf into main Jan 11, 2022
@timj timj deleted the tickets/DM-33155 branch January 11, 2022 17:29
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