-
Notifications
You must be signed in to change notification settings - Fork 667
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] Add CI step for black (and remove darker) #4725
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4725 +/- ##
===========================================
- Coverage 93.60% 93.58% -0.03%
===========================================
Files 173 185 +12
Lines 21463 22530 +1067
Branches 2993 2993
===========================================
+ Hits 20090 21084 +994
- Misses 929 1002 +73
Partials 444 444 ☔ View full report in Codecov by Sentry. |
Hello @RMeli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-10-14 19:23:05 UTC |
Z2SYMB = {1: 'H', 2: 'He', | ||
3: 'Li', 4: 'Be', 5: 'B', 6: 'C', 7: 'N', 8: 'O', 9: 'F', 10: 'Ne', | ||
11: 'Na', 12: 'Mg', 13: 'Al', 14: 'Si', 15: 'P', 16: 'S', 17: 'Cl', 18: 'Ar', | ||
19: 'K', 20: 'Ca', 21: 'Sc', 22: 'Ti', 23: 'V', 24: 'Cr', 25: 'Mn', 26: 'Fe', | ||
27: 'Co', 28: 'Ni', 29: 'Cu', 30: 'Zn', 31: 'Ga', 32: 'Ge', 33: 'As', 34: 'Se', | ||
35: 'Br', 36: 'Kr', 37: 'Rb', 38: 'Sr', 39: 'Y', 40: 'Zr', 41: 'Nb', 42: 'Mo', | ||
43: 'Tc', 44: 'Ru', 45: 'Rh', 46: 'Pd', 47: 'Ag', 48: 'Cd', 49: 'In', 50: 'Sn', | ||
51: 'Sb', 52: 'Te', 53: 'I', 54: 'Xe', 55: 'Cs', 56: 'Ba', 57: 'La', 58: 'Ce', | ||
59: 'Pr', 60: 'Nd', 61: 'Pm', 62: 'Sm', 63: 'Eu', 64: 'Gd', 65: 'Tb', 66: 'Dy', | ||
67: 'Ho', 68: 'Er', 69: 'Tm', 70: 'Yb', 71: 'Lu', 72: 'Hf', 73: 'Ta', 74: 'W', | ||
75: 'Re', 76: 'Os', 77: 'Ir', 78: 'Pt', 79: 'Au', 80: 'Hg', 81: 'Tl', 82: 'Pb', | ||
83: 'Bi', 84: 'Po', 85: 'At', 86: 'Rn', 87: 'Fr', 88: 'Ra', 89: 'Ac', 90: 'Th', | ||
91: 'Pa', 92: 'U', 93: 'Np', 94: 'Pu', 95: 'Am', 96: 'Cm', 97: 'Bk', 98: 'Cf', | ||
99: 'Es', 100: 'Fm', 101: 'Md', 102: 'No', 103: 'Lr', 104: 'Rf', 105: 'Db', | ||
106: 'Sg', 107: 'Bh', 108: 'Hs', 109: 'Mt', 110: 'Ds', 111: 'Rg', 112: 'Cn', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the automated formatting is off, but I manually removed trailing whitespaces (hence the diff).
include = ''' | ||
( | ||
tables\.py | ||
| due\.py | ||
) | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start simple, with only two files. Other files or matching regexp can be added with the |
operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
This PR now contains only 3 commits, and should not be squash-merged:
The latter is the reason why the PR should not be squash-merged. |
@IAlibay can you please shepherd the PR as you're a reviewer and it changes the CI? |
@RMeli can you please resolve conflicts? |
@orbeckst I don't see the conflicts, two are files being deleted... I think GitHub might have been confused by my mess with my rebasing + cherry piking commits + force pushing. |
Yes, it looks the same for me, but locally I was unable to see any conflict. I think I also rebased develop, but I'll try again later. Worst case I'll close this PR and open a new one with the commits cherry picked. |
I really don't know what is going on here... I just created a new branch from If I rebase develop, it says this is up to date. Same with merge. |
@RMeli I fixed the merge conflict, but that added two commits - can you check if the commit history needs cleaning up or if it's still good to non-squash merge? |
Thanks @IAlibay. I see a merge commit from develop (strange, for me it did not work…), which would be better not to have in the develop branch. I’m try to squash a few commits. |
I mean for the odd occasion I think we can live with it. |
@IAlibay I rebased on |
The ignored commit was wrong, I fixed that and squashed down to two commits. |
This workflow is not great IMO, it requires a lot of git-foo. I suggest that going forward I take note of the different |
If we agree to use a common title for black-only commits or add a magic comment then we could (semi)automate adding to the exclusion file. |
Excellent suggestion @orbeckst. I suggest we use |
Add
black
(version24
) to CI, and start formatting two files:tables.py
anddue.py
. This showcases hot to incrementally add files to theblack
configuration, and how to turn off automated formatting in some portions oftables.py
.This PR also removes
darken
.Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4725.org.readthedocs.build/en/4725/