-
Notifications
You must be signed in to change notification settings - Fork 336
Fixed #1014 Fix max_matches=None bug #1015
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
=======================================
Coverage 97.41% 97.42%
=======================================
Files 89 89
Lines 14922 14934 +12
=======================================
+ Hits 14537 14549 +12
Misses 385 385 ☔ View full report in Codecov by Sentry. |
@ejorgensen-wl Thanks again for identifying this bug. The decision to do: was decided a long time ago and, in hindsight, that was a poor choice. Instead, I think we could've/should've been more specific and done:
What do you think about this remedy instead? Would this work? |
That's an excellent and much cleaner solution than what I was thinking, thanks! I implemented your suggestions in my latest commit. |
@ejorgensen-wl Thank you for your patience and for working through this with us! We really appreciate the PR. Once the tests all pass, I'll merge the PR (unless you had anything further to add?). |
I like it as is - thanks! |
@ejorgensen-wl Thank you again for the excellent PR! I hope you will consider contributing more! |
This fix addresses issue #1014 by not slicing the
query_matches
ifmax_matches
is set toNone
formotifs
(which in turn calls_motifs
withmax_matches=np.inf
.I made an initial effort to add testing, but I'm sure there are better ways to do so.
Pull Request Checklist
black
(i.e.,python -m pip install black
orconda install -c conda-forge black
)flake8
(i.e.,python -m pip install flake8
orconda install -c conda-forge flake8
)pytest-cov
(i.e.,python -m pip install pytest-cov
orconda install -c conda-forge pytest-cov
)black .
in the root stumpy directoryflake8 .
in the root stumpy directory./setup.sh && ./test.sh
in the root stumpy directory