-
Notifications
You must be signed in to change notification settings - Fork 19
Squeeze morph warning handling #272
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
=======================================
Coverage 99.92% 99.93%
=======================================
Files 24 24
Lines 1398 1446 +48
=======================================
+ Hits 1397 1445 +48
Misses 1 1
🚀 New features to boost your workflow:
|
sbillinge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Please see comments.
I don't love the name ``--check-increases". It isn't checking anything.
How about --force-monotonic-x for example?
sbillinge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see comments
tests/test_morphsqueeze.py
Outdated
| @pytest.mark.parametrize( | ||
| "squeeze_coeffs, x_morph", | ||
| [ | ||
| # The following squeezes make the function non-monotonic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# The following squeezes make the function non-monotonic. Expect code to work but issue the correct warning.
tests/test_morphsqueeze.py
Outdated
| # call in .py | ||
| x_target = x_morph | ||
| y_target = np.sin(x_target) | ||
| coeffs = [squeeze_coeffs[f"a{i}"] for i in range(len(squeeze_coeffs))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason you don't just give as "squeeze_coeffs" inputs [-1, -1, 0, 0, 2] and remove this line? I think it would be easier to read. Less cognifive overload for the poor reviewer....
tests/test_morphsqueeze.py
Outdated
| y_morph = np.sin(x_squeezed) | ||
| morph = MorphSqueeze() | ||
| morph.squeeze = squeeze_coeffs | ||
| with pytest.warns() as w: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w -> warning?
Keeps feature of #259 we want per the discussion (see last comment).