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

Black fails on SystemTests/rxcropmaturity.py in ctsm5.1.dev131 #2112

Closed
3 tasks
ekluzek opened this issue Aug 16, 2023 · 1 comment · Fixed by #1959
Closed
3 tasks

Black fails on SystemTests/rxcropmaturity.py in ctsm5.1.dev131 #2112

ekluzek opened this issue Aug 16, 2023 · 1 comment · Fixed by #1959
Assignees
Labels
bug something is working incorrectly code health improving internal code structure to make easier to maintain (sustainability)

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Aug 16, 2023

Brief summary of bug

Running "make black" in the python directory shows one file needs to be run through black.

General bug information

CTSM version you are using: ctsm5.1.dev131 and after

Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: Not really anything just black formatting of one file

Details of bug

This wasn't caught partially because the "check black" github action wasn't checking all directories just the python directory.

Important details of your setup / configuration so we can reproduce the bug

You have to run this with the ctsm_pylib conda environment to make sure you have the standard version of black and python.

Important output or errors that show the problem

make black
black --check --config pyproject.toml . ../cime_config/SystemTests ../cime_config/buildlib ../cime_config/buildnml
would reformat ../cime_config/SystemTests/rxcropmaturity.py

Oh no! 💥 💔 💥
1 file would be reformatted, 85 files would be left unchanged.
Makefile:53: recipe for target 'black' failed
make: *** [black] Error 1

Definition of Done:

  • Run through black
  • Add commit to the git blame ignore file
  • Add the other directory to the github action as it is now
@ekluzek ekluzek added code health improving internal code structure to make easier to maintain (sustainability) bug something is working incorrectly labels Aug 16, 2023
@ekluzek ekluzek self-assigned this Aug 16, 2023
@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 16, 2023

In the longterm I want to have the github action to use the python/Makefile to make sure it works identically to the make there. I did some work on making that happen, but got stuck in finishing it. So for now I will just add the extra directory to the action. Later we'll get it working in the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is working incorrectly code health improving internal code structure to make easier to maintain (sustainability)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant