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

Merged
merged 21 commits into from
Dec 6, 2024
Merged

[fmt] lib #4804

merged 21 commits into from
Dec 6, 2024

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).
Report is 2 commits behind head on develop.

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
@RMeli RMeli requested review from IAlibay and marinegor November 28, 2024 13:31
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
@RMeli
Copy link
Member Author

RMeli commented Dec 1, 2024

CI failures are likely un-related to this PR since they showed up also on #4812.

@RMeli
Copy link
Member Author

RMeli commented Dec 6, 2024

Merging because the issues with RDKit are known and un-related to this PR.

#4813 #4824

@RMeli RMeli merged commit 25e755f into MDAnalysis:develop Dec 6, 2024
20 of 24 checks passed
@RMeli RMeli deleted the fmt/lib branch December 6, 2024 21:47
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