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

Moves hbond_autocorrel and removes old hbond code #3258

Merged
merged 9 commits into from
May 6, 2021

Conversation

IAlibay
Copy link
Member

@IAlibay IAlibay commented May 2, 2021

Fixes #2739
Fixes #3259

Changes made in this Pull Request:

  • Removes old hbond code
  • Add warning for upcoming move of hbond_autocorrel to hydrogenbonds (for consistency).

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@pep8speaks
Copy link

pep8speaks commented May 2, 2021

Hello @IAlibay! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 23:80: E501 line too long (100 > 79 characters)
Line 62:80: E501 line too long (80 > 79 characters)
Line 67:80: E501 line too long (82 > 79 characters)

Line 24:80: E501 line too long (91 > 79 characters)
Line 49:80: E501 line too long (94 > 79 characters)
Line 78:80: E501 line too long (87 > 79 characters)
Line 225:1: E124 closing bracket does not match visual indentation
Line 306:9: E265 block comment should start with '# '
Line 306:80: E501 line too long (92 > 79 characters)
Line 395:56: E127 continuation line over-indented for visual indent
Line 396:56: E127 continuation line over-indented for visual indent
Line 397:43: E127 continuation line over-indented for visual indent
Line 431:80: E501 line too long (102 > 79 characters)
Line 435:49: E225 missing whitespace around operator
Line 440:9: E303 too many blank lines (2)
Line 449:36: E127 continuation line over-indented for visual indent
Line 572:80: E501 line too long (91 > 79 characters)
Line 581:17: E122 continuation line missing indentation or outdented

Line 24:80: E501 line too long (90 > 79 characters)

Line 39:1: E302 expected 2 blank lines, found 1
Line 43:1: E302 expected 2 blank lines, found 1
Line 68:9: E124 closing bracket does not match visual indentation
Line 73:23: E201 whitespace after '['
Line 73:33: E203 whitespace before ','
Line 87:9: E124 closing bracket does not match visual indentation
Line 92:23: E201 whitespace after '['
Line 92:33: E203 whitespace before ','
Line 98:5: E303 too many blank lines (2)
Line 105:9: E124 closing bracket does not match visual indentation
Line 110:23: E201 whitespace after '['
Line 110:33: E203 whitespace before ','
Line 116:5: E303 too many blank lines (2)
Line 124:9: E124 closing bracket does not match visual indentation
Line 129:23: E201 whitespace after '['
Line 129:33: E203 whitespace before ','
Line 143:9: E124 closing bracket does not match visual indentation
Line 148:23: E201 whitespace after '['
Line 148:33: E203 whitespace before ','
Line 162:9: E124 closing bracket does not match visual indentation
Line 187:9: E124 closing bracket does not match visual indentation
Line 196:80: E501 line too long (85 > 79 characters)
Line 218:9: E124 closing bracket does not match visual indentation
Line 232:9: E124 closing bracket does not match visual indentation
Line 244:9: E124 closing bracket does not match visual indentation
Line 253:9: E124 closing bracket does not match visual indentation
Line 258:80: E501 line too long (83 > 79 characters)
Line 269:9: E122 continuation line missing indentation or outdented
Line 278:9: E124 closing bracket does not match visual indentation
Line 284:80: E501 line too long (86 > 79 characters)
Line 297:1: E303 too many blank lines (3)
Line 319:80: E501 line too long (85 > 79 characters)
Line 331:1: W391 blank line at end of file

Comment last updated at 2021-05-06 06:54:17 UTC

@IAlibay IAlibay marked this pull request as draft May 2, 2021 20:10
@IAlibay IAlibay requested review from orbeckst and lilyminium May 2, 2021 20:29
@IAlibay IAlibay marked this pull request as ready for review May 2, 2021 20:29
@IAlibay
Copy link
Member Author

IAlibay commented May 2, 2021

I realise we usually create stubs so that folks can change workflows ahead of time, however the removal of history for hbond_autocorrel bothered me. Since all it means to users is that they have to change their import, can we just do this as a warned move without moving things ahead of time? (worst case I create a stub in hydrogenbonds that imports hbond.hbond_autocorrel, but that makes warnings messy)

Edit: please ignore me, this doesn't fix the history problem, we lose history as soon as we move the file...

@orbeckst orbeckst added this to the 2.0 milestone May 5, 2021
@orbeckst
Copy link
Member

orbeckst commented May 5, 2021

At the moment the test_api tests fail because there's nothing in hydrogenbonds. I'll push a change with the moved file and stubs in the old place. If you don't like it, revert it.

@IAlibay
Copy link
Member Author

IAlibay commented May 5, 2021

@orbeckst please go ahead, I was going to try to complete this tomorrow, but any push along is appreciated :)

orbeckst added 2 commits May 5, 2021 16:45
- deprecated hbonds.hbond_autocorrel (2.0.0) and stub will be
  removed in 3.0.0
- hbonds.hbond_autocorrel module raises a deprecation warning,
  HydrogenBondAutoCorrel and find_hydrogen_donors raise deprecation
  warnings
- tests (note: tests were copied and we run full tests on the deprecated
  and the moved code, mainly to make sure that they can be called as
  expected; deprecation warnings are also tested)
- make hydrogenbonds.hbond_autocorrel primary entry for docs
- add entry for deprecated module at bottom of Hydrogen bonding docs
- make clear in CHANGELOG that hbonds.hbond_autocorrel will be removed
  in 3.0.0
@orbeckst
Copy link
Member

orbeckst commented May 6, 2021

I am also fixing #3259 because I have to edit the docs in wbridge_analysis anyway.

@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #3258 (6a8dccd) into develop (903ae4c) will increase coverage by 0.10%.
The diff coverage is 95.20%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3258      +/-   ##
===========================================
+ Coverage    92.91%   93.02%   +0.10%     
===========================================
  Files          172      172              
  Lines        23033    22694     -339     
  Branches      3266     3193      -73     
===========================================
- Hits         21402    21110     -292     
+ Misses        1581     1534      -47     
  Partials        50       50              
Impacted Files Coverage Δ
package/MDAnalysis/analysis/hbonds/__init__.py 100.00% <ø> (ø)
...nalysis/analysis/hydrogenbonds/hbond_autocorrel.py 94.87% <94.87%> (ø)
...age/MDAnalysis/analysis/hbonds/hbond_autocorrel.py 100.00% <100.00%> (+5.12%) ⬆️
...kage/MDAnalysis/analysis/hydrogenbonds/__init__.py 100.00% <100.00%> (ø)
...nalysis/analysis/hydrogenbonds/wbridge_analysis.py 97.41% <100.00%> (ø)
package/MDAnalysis/topology/guessers.py 99.22% <0.00%> (-0.78%) ⬇️

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 903ae4c...6a8dccd. Read the comment docs.

- fix MDAnalysis#3259
  (title of Water Bridge Analysis docs is not correct)
- include the Gregoret 1991 reference (that was removed with the
  deprecated hbonds.hbond_analysis module)
- minor formatting fixes in the docs
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.

I am ok with your and my changes... if you or anyone else could have a quick look then that would be good.

@IAlibay I am leaving it to you to merge/request changes.

hbonds.find_hydrogen_donors(u.atoms)


def test_find_hydrogen_donors_deprecation_warning(u_water):
Copy link
Member Author

Choose a reason for hiding this comment

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

@orbeckst is there any point in having most of the hbond_autocorrel tests duplicated here? They are pretty expensive iirc, if you're happy with it, we can just move these two warning tests over to the other hbond_autocorrel tests?

@orbeckst
Copy link
Member

orbeckst commented May 6, 2021 via email

@IAlibay
Copy link
Member Author

IAlibay commented May 6, 2021

@orbeckst - ok that's fair. I'm happy with this (except from being sad that we will lose git history for hbond_autocorrel) so I'll squash-merge.

@IAlibay IAlibay merged commit b5bff33 into MDAnalysis:develop May 6, 2021
@IAlibay IAlibay deleted the mv-hbond branch May 6, 2021 16:04
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.

Docs for WaterBridgeAnalysis incorrectly formatted/do not show up Deprecated and slated for 2.0 removal
3 participants