-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update apply-formatting.yml #520
Conversation
Add badge indicating code style.
@par-hermes format |
@par-hermes format |
@par-hermes format |
@par-hermes format |
I don't think the Check C++ Formatting action is going to run for this pr because I have changed it. |
Nice! What about a command for local formatting? I.e., can we run |
Ya, I got lazy. Lol. |
I vastly prefer doing local formatting over calling |
Making me earn my pay. :) |
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.
This is a great addition and I agree that we need automated formatting for Python code. I do agree that it would be nice to have local formatting of the Python code (like make format
), although I don't consider it absolutely necessary. After all, we mostly work on the C++ code and the Python code doesn't change that often (and there isn't that much to begin with). So if it turns out be a huge pain to implement local Python formatting, I'd be ok to forgo it, provided that par-hermes
works.
One more thing, this PR changes a lot of .py
files, but it looks like just formatting. Did you make any code changes to any .py
files? If so, I think we should have separate PRs for code and infrastructure changes and then all the formatting changes in another PR. But if all the changes to the Python files in this PR are purely formatting, then I think it's ok to have them in this PR.
Co-authored-by: Jonas Lippuner <jlippuner@lanl.gov>
…henon into JoshuaSBrown/python-formatting
No I did not change any py files, changes made are only to build configuration and ci. |
You should be happy now. |
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.
Looks great. I also confirmed that make format
locally works as expected!
Pending my minor comments I'm happy to see this going in.
Also, as next step, we could also consider adding a flake8
step.
Co-authored-by: Philipp Grete <gretephi@msu.edu>
Thanks everyone for the input. |
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.
Awesome. Thanks, @JoshuaSBrown !
PR Summary
Adding formatting capability to python source files. Parthenon now makes use of several python scripts. It makes sense to expand automatic formatting to the python files. This is achieved in this pr by editing the formatting files that @AndrewGaspar implemented.
Now the ci will both look at python files and cpp files and run a pass or fail check. The par-hermes trigger can also be called as before. Which will auto format the python files in the repository.
PR Checklist