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

MAINT: in1d -> isin #4255

Merged
merged 3 commits into from
Aug 27, 2023
Merged

Conversation

tylerjereddy
Copy link
Member

@tylerjereddy tylerjereddy commented Aug 22, 2023

  • replace deprecated in1d with isin calls per API: Cleaning numpy/__init__.py and main namespace - Part 4 [NEP 52] numpy/numpy#24445, as part of effort to remain NumPy 2.0 compliant

  • the testsuite seems happy locally--if there are any cases where in1d was potentially receiving
    arrays with ndim > 1, we may want to add ravel() to the outputs in these replacements just to be safe, but I've assumed the testsuite has us covered

  • for now, I've intentionally not adjusted the docstring of our Cython _in2d, which refers
    to in1d; seems less critical for now


📚 Documentation preview 📚: https://mdanalysis--4255.org.readthedocs.build/en/4255/

* replace deprecated `in1d` with `isin` calls per
numpy/numpy#24445, as part
of effort to remain NumPy `2.0` compliant

* the testsuite seems happy locally--if there are
any cases where `in1d` was potentially receiving
arrays with `ndim > 1`, we may want to add `ravel()`
to the outputs in these replacements just to be safe,
but I've assumed the testsuite has us covered

* for now, I've intentionally not adjusted the
docstring of our Cython `_in2d`, which refers
to `in1d`; seems less critical for now
@github-actions
Copy link

github-actions bot commented Aug 22, 2023

Linter Bot Results:

Hi @tylerjereddy! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ✅ Passed

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/5979957032/job/16225123491


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (8923c4a) 93.40% compared to head (13c592c) 93.41%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4255      +/-   ##
===========================================
+ Coverage    93.40%   93.41%   +0.01%     
===========================================
  Files          169      183      +14     
  Lines        22204    23309    +1105     
  Branches      4064     4064              
===========================================
+ Hits         20740    21775    +1035     
- Misses         948     1018      +70     
  Partials       516      516              
Files Changed Coverage Δ
...DAnalysis/analysis/hydrogenbonds/hbond_analysis.py 97.22% <ø> (ø)
package/MDAnalysis/analysis/align.py 96.38% <100.00%> (ø)
package/MDAnalysis/core/groups.py 97.51% <100.00%> (ø)
package/MDAnalysis/core/selection.py 98.59% <100.00%> (ø)
package/MDAnalysis/core/topologyattrs.py 96.13% <100.00%> (ø)
package/MDAnalysis/core/topologyobjects.py 98.16% <100.00%> (ø)

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

CHANGELOG, other than that looks great.

* add an appropriate `CHANGELOG` entry
per reviewer request
@tylerjereddy
Copy link
Member Author

Ok, I added a CHANGELOG entry, hopefully that works.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

LGTM — failures are codecov and not relevant.

There's one fix to the CHANGELOG but I'll just add the suggestion.

package/CHANGELOG Outdated Show resolved Hide resolved
@orbeckst orbeckst self-assigned this Aug 25, 2023
Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

Thanks @tylerjereddy

@hmacdope hmacdope merged commit d5a30e9 into MDAnalysis:develop Aug 27, 2023
@tylerjereddy tylerjereddy deleted the treddy_in1d_isin branch August 28, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants