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-34924: Check for dataset type compatibility when creating execution butler #251

Merged
merged 1 commit into from May 27, 2022

Conversation

timj
Copy link
Member

@timj timj commented May 24, 2022

Checklist

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

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #251 (115fa21) into main (e3f43cd) will decrease coverage by 0.18%.
The diff coverage is 8.33%.

@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   72.14%   71.95%   -0.19%     
==========================================
  Files          60       60              
  Lines        6628     6651      +23     
  Branches     1250     1254       +4     
==========================================
+ Hits         4782     4786       +4     
- Misses       1621     1641      +20     
+ Partials      225      224       -1     
Impacted Files Coverage Δ
python/lsst/pipe/base/executionButlerBuilder.py 18.80% <8.33%> (-2.48%) ⬇️
tests/test_quantumGraph.py 95.58% <0.00%> (+0.73%) ⬆️

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 e3f43cd...115fa21. Read the comment docs.

@timj timj force-pushed the tickets/DM-34924 branch 5 times, most recently from 8ec15cf to f54b99b Compare May 26, 2022 20:39
Copy link

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

I'm assuming I shouldn't worry too much about Codecov having lots of comments to share? I have minor comments only, overall this looks good and fixes my problem, thank you!

# Use the first type encountered.
return prevDsType

raise ValueError(
Copy link

Choose a reason for hiding this comment

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

Suggest putting this in an explicit else clause for clarity

python/lsst/pipe/base/executionButlerBuilder.py Outdated Show resolved Hide resolved
dsType = registryDsType
else:
# Not compatible to re-raise the original exception.
raise
Copy link

Choose a reason for hiding this comment

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

Please include a helpful error message as before, e.g., "Cannot insert {dsType} into the registry because it is incompatible with {registryDsType}"

Copy link
Member Author

Choose a reason for hiding this comment

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

I am dreaming of python 3.11 exception notes. They would be perfect for this scenario. I think in this case though the exception that you are going to get is going to tell you "ConflictingDefinitionError(DatasetType A differs from Registry version B)" or something and there's not a lot I need to add.

A graph can contain dataset types that are shared with
the dataset types that are automatically defined, but use
different dataset types.
@timj timj merged commit ddcd2f7 into main May 27, 2022
@timj timj deleted the tickets/DM-34924 branch May 27, 2022 23:18
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