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

[fmt] lib #4804

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

[fmt] lib #4804

wants to merge 21 commits into from

Conversation

RMeli
Copy link
Member

@RMeli RMeli commented Nov 26, 2024

Format MDAnalysis/lib and MDAnalysisTests/lib.

PR Checklist

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

Developers certificate of origin


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

@pep8speaks
Copy link

pep8speaks commented Nov 26, 2024

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

Line 166:56: E203 whitespace before ':'

Line 183:1: E402 module level import not at top of file

Line 399:80: E501 line too long (80 > 79 characters)
Line 434:16: E713 test for membership should be 'not in'
Line 448:80: E501 line too long (80 > 79 characters)
Line 1180:50: E203 whitespace before ':'
Line 1598:80: E501 line too long (102 > 79 characters)
Line 2285:50: E203 whitespace before ':'

Line 934:37: E203 whitespace before ':'
Line 960:37: E203 whitespace before ':'

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

Comment last updated at 2024-11-30 22:14:39 UTC

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

Some quick comments.

testsuite/MDAnalysisTests/lib/test_cutil.py Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_distances.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_pkdtree.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_pkdtree.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_util.py Show resolved Hide resolved
@RMeli RMeli requested a review from marinegor November 26, 2024 22:22
@RMeli
Copy link
Member Author

RMeli commented Nov 26, 2024

Thanks @IAlibay for the comments. In this one we indeed have a few oddities that should be discussed. Some are probably OK but I wanted a second opinion, others should stay as they were, and a few ugly things are likely caused by inconsistent use of trailing commas in multi-dimensional arrays (so should be fixable by removing the trailing comma).

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 90.06211% with 32 lines in your changes missing coverage. Please review.

Project coverage is 86.41%. Comparing base (557f27d) to head (c264f8e).

Files with missing lines Patch % Lines
package/MDAnalysis/lib/util.py 88.99% 7 Missing and 5 partials ⚠️
package/MDAnalysis/lib/distances.py 92.45% 4 Missing and 4 partials ⚠️
package/MDAnalysis/lib/pkdtree.py 79.16% 4 Missing and 1 partial ⚠️
package/MDAnalysis/lib/transformations.py 86.20% 3 Missing and 1 partial ⚠️
package/MDAnalysis/lib/_distopia.py 50.00% 2 Missing ⚠️
package/MDAnalysis/lib/picklable_file_io.py 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4804      +/-   ##
===========================================
+ Coverage    86.08%   86.41%   +0.33%     
===========================================
  Files          177      189      +12     
  Lines        21742    22808    +1066     
  Branches      3055     3055              
===========================================
+ Hits         18717    19710     +993     
- Misses        2593     2666      +73     
  Partials       432      432              

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

@RMeli RMeli changed the title Format lib [fmt] lib Nov 26, 2024
Copy link
Contributor

@marinegor marinegor left a comment

Choose a reason for hiding this comment

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

I've added suggestions removing/adding trailing commas when necessary -- it seems that all the "old is better than new" can be resolved with them (plus some extra newlines where necessary), except for one case in tests with the 3x3 matrix formatting with concrete numbers.

package/MDAnalysis/lib/transformations.py Outdated Show resolved Hide resolved
package/MDAnalysis/lib/transformations.py Show resolved Hide resolved
package/MDAnalysis/lib/transformations.py Show resolved Hide resolved
package/MDAnalysis/lib/transformations.py Show resolved Hide resolved
package/MDAnalysis/lib/transformations.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_distances.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_pkdtree.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_util.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_util.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_pkdtree.py Outdated Show resolved Hide resolved
testsuite/MDAnalysisTests/lib/test_qcprot.py Show resolved Hide resolved
@RMeli RMeli requested a review from marinegor November 30, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants