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-33049: Allow duplicate values in dataId #622

Merged
merged 6 commits into from Jan 4, 2022
Merged

DM-33049: Allow duplicate values in dataId #622

merged 6 commits into from Jan 4, 2022

Conversation

timj
Copy link
Member

@timj timj commented Dec 29, 2021

detector and raft and day_obs and exposure should be allowed so long as they are consistent.

Checklist

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

@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #622 (93f1a64) into main (9fe239b) will increase coverage by 0.04%.
The diff coverage is 96.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #622      +/-   ##
==========================================
+ Coverage   84.14%   84.18%   +0.04%     
==========================================
  Files         237      237              
  Lines       30305    30327      +22     
  Branches     5008     5015       +7     
==========================================
+ Hits        25499    25532      +33     
+ Misses       3661     3652       -9     
+ Partials     1145     1143       -2     
Impacted Files Coverage Δ
python/lsst/daf/butler/_butler.py 80.87% <95.65%> (+1.93%) ⬆️
tests/test_simpleButler.py 97.90% <100.00%> (+0.05%) ⬆️
...hon/lsst/daf/butler/registry/dimensions/caching.py 94.54% <0.00%> (+3.63%) ⬆️

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 9fe239b...93f1a64. Read the comment docs.

Previously non-dimensions were removed from kwargs and
valid dimensions were retained. None of this agreed
with the definition of "unused" in the docstring
since those now raise an exception (and were
already removed from kwargs). It's much more
consistent to transfer kwargs over to the new
dataId and empty kwargs.
We allows duplicate information in the dataId but if there
is duplicate information it should be checked for consistency.
This is better than a RuntimeError and consistent with
other cases where the dataId does not resolve.
When trying to match up record values to a specific
dimension, there are sometimes cases where the dimension
is given as well as record values. In that case we need
to also assign the records to a dimension for later
resolution. Without doing this the records look
like unrecognized keywords.
day_obs and exposure can be given and if they are consistent
this should not raise an exception.
If day_obs+seq_num have been given as well as explicit exposure
then a ValueError should also be raised during the check for
consistency if the exposure is not known at all.
Copy link
Contributor

@mfisherlevine mfisherlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@timj timj merged commit df6aacb into main Jan 4, 2022
@timj timj deleted the tickets/DM-33049 branch January 4, 2022 23:57
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