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-32661: Optimization path should check values not keys #106

Merged
merged 3 commits into from Nov 22, 2021

Conversation

timj
Copy link
Member

@timj timj commented Nov 19, 2021

Checklist

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

@timj timj requested a review from ktlim November 19, 2021 18:15
@timj
Copy link
Member Author

timj commented Nov 19, 2021

@ktlim is this what you had in mind? I'm not sure how to test it other than seeing if we now get coverage on the line that returns True.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #106 (934302d) into master (2a5a563) will increase coverage by 0.23%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
+ Coverage   91.01%   91.24%   +0.23%     
==========================================
  Files          36       36              
  Lines        2136     2148      +12     
==========================================
+ Hits         1944     1960      +16     
+ Misses        192      188       -4     
Impacted Files Coverage Δ
python/lsst/utils/wrappers.py 91.54% <100.00%> (+2.81%) ⬆️
tests/test_wrappers.py 98.28% <100.00%> (+0.06%) ⬆️

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 2a5a563...934302d. Read the comment docs.

@timj
Copy link
Member Author

timj commented Nov 19, 2021

@ktlim and indeed the coverage has got worse because now the optimization is working and the explicit loop never triggers. I don't know enough about this code to write a test that will now trigger the fallback code.

@erykoff
Copy link
Contributor

erykoff commented Nov 19, 2021

I don't see how the fallback code could ever trigger. Isn't it just a loop over what the in is checking?

@timj
Copy link
Member Author

timj commented Nov 19, 2021

@erykoff, @TallJimbo gave me the clue about the fallback code and I've written some tests which do exercise it.

@timj timj merged commit 92fb8c8 into master Nov 22, 2021
@timj timj deleted the tickets/DM-32661 branch November 22, 2021 17:25
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

3 participants