Conversation
soupault
left a comment
There was a problem hiding this comment.
There are few extra places where you need to update the format of extected_warnings input argument (see CI).
|
|
||
| # SNR is improved less with 1 wavelet level than with the default. | ||
| denoised_1 = restoration.denoise_wavelet(noisy, | ||
| with expected_warnings([None]): |
There was a problem hiding this comment.
The benefit of using none is that under certain build conditions, where we don't expect warnings, None can be passed in.
What is, basically, the same thing as with expected_warnings([]): 🤔
There was a problem hiding this comment.
Sorry, this one was a rememnent of me testing my None function. I'll rebase and sqaush this.
|
|
||
| # Verify that SNR is improved with internally estimated sigma | ||
| denoised = restoration.denoise_wavelet(noisy, method=method) | ||
| # I don't know why this logic for the warnings is correct |
There was a problem hiding this comment.
🤣 This comment shouldn't be here.
There was a problem hiding this comment.
No, really, this should be removed 🙂 . Or, at least, refactored.
There was a problem hiding this comment.
@soupault I added a little more information that I could gain.
1d092da to
4211ecd
Compare
|
Just a note: scipy will likely silence the matrix 1.2.0 |
|
And tuple indexing for scipy seems to be a WIP: scipy/scipy#8944 |
849fd15 to
22b6bbb
Compare
Codecov Report
@@ Coverage Diff @@
## master #3242 +/- ##
=========================================
Coverage ? 86.76%
=========================================
Files ? 339
Lines ? 27363
Branches ? 0
=========================================
Hits ? 23741
Misses ? 3622
Partials ? 0
Continue to review full report at Codecov.
|
|
|
|
Hello @hmaarrfk! Thanks for updating the PR.
Comment last updated on August 01, 2018 at 00:14 Hours UTC |
24fdc0b to
3741ce3
Compare
|
@soupault, sorry for bundling the fix for matplotlib/PyQt5.11 incompatibility. Let me know if you disagree, I would gladly separate it as a different PR, but with the builds failing, it is really difficult to ensure correctness. |
| SCIPY_ND_INDEXING = 'non-tuple sequence for multidimensional' | ||
| else: | ||
| SCIPY_ND_INDEXING = None | ||
|
|
There was a problem hiding this comment.
|
|
||
|
|
||
| if (Version(np.__version__) >= '1.15.0' and | ||
| Version(scipy.__version__) <= '1.1.0'): |
There was a problem hiding this comment.
Please, fix the indentation here.
There was a problem hiding this comment.
How would you like it to be fixed. Pep8 doesn't specify the "correct" way
# No extra indentation.
if (this_is_one_thing and
that_is_another_thing):
do_something()
# Add a comment, which will provide some distinction in editors
# supporting syntax highlighting.
if (this_is_one_thing and
that_is_another_thing):
# Since both conditions are true, we can frobnicate.
do_something()
# Add some extra indentation on the conditional continuation line.
if (this_is_one_thing
and that_is_another_thing):
do_something()I picked the bottom one.
|
|
||
| # Verify that SNR is improved with internally estimated sigma | ||
| denoised = restoration.denoise_wavelet(noisy, method=method) | ||
| # I don't know why this logic for the warnings is correct |
There was a problem hiding this comment.
No, really, this should be removed 🙂 . Or, at least, refactored.
|
|
||
| # Verify that SNR is improved with internally estimated sigma | ||
| denoised = restoration.denoise_wavelet(noisy, method=method) | ||
| # I don't know why this logic for the warnings is correct |
|
|
||
| for convert2ycbcr in [True, False]: | ||
| for multichannel in [True, False]: | ||
| expected = (PYWAVELET_ND_INDEXING if multichannel else None) |
There was a problem hiding this comment.
I'd refrain from using name expected. Usually, it is assigned to an expected result of the function-under-test.
There was a problem hiding this comment.
I called it anticipated_warnings.
| PYAMG_SCIPY_EXPECTED = SCIPY_EXPECTED + '|' + PYAMG_EXPECTED_WARNING | ||
|
|
||
| if (Version(np.__version__) >= '1.15.0' and | ||
| Version(scipy.__version__) <= '1.1.0'): |
| # Now configure Matplotlib to use Qt5 | ||
| if [[ "${QT}" == "PyQt5" ]]; then | ||
| pip install --retries 3 -q $PIP_FLAGS pyqt5 | ||
| # Matplotlib 2.2.2 doesn't support pyqt5 5.11 until this commit |
There was a problem hiding this comment.
Could you add this to TODO as well?
There was a problem hiding this comment.
- Monitor when
matplotlibreleases a version greater than 2.2.2 and test
to see if it becomes compatible with PyQt5.11. If it is compatible,
remove the version limiting logic intools/travis/install_qt.sh.
3c73db4 to
9a3d38a
Compare
This enables us to be more explicit about which warnings we expect depending on dififerent versions.
415a996 to
c60ae9a
Compare
aedca22 to
cb74435
Compare
soupault
left a comment
There was a problem hiding this comment.
Actually, nvm about indentation :). Thanks!
| expected = ['scipy.sparse.sparsetools|%s' % PYAMG_SCIPY_EXPECTED, | ||
| NUMPY_MATRIX_EXPECTED] | ||
| with expected_warnings(expected): | ||
| anticipated_warnings = [ |
There was a problem hiding this comment.
I thought i caught that one too :/ thanks!
|
Artifact limit? |
| '`dynamic_range` has been deprecated in favor of ' | ||
| '`data_range`. The `dynamic_range` keyword argument ' | ||
| 'will be removed in v0.14'): | ||
| 'will be removed in v0.14']): |
|
Thanks @hmaarrfk! Good stuff. Personally I like |
|
@meeseeksdev backport to v0.14.x |
|
There seem to be a conflict, please backport manually |
|
@jni, that is certainly a good idea, a single string was convenient. The check could have I'm not the best at API design, but definitely good at finding places where things aren't working as intended :D |
Backport #3242: handle NumPy 1.15 warnings in dependencies
This PR splits the warning checking from #3238 to allow for a more focused discussion.
@soupault said
I replied:
For reviewers
(Don't remove the checklist below.)
later.
__init__.py.doc/release/release_dev.rst.@meeseeksdev backport to v0.14.x