-
Notifications
You must be signed in to change notification settings - Fork 109
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
Format documentation #2111
Format documentation #2111
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Thanks for initiating this. Did you review all the changes? |
When we do this, we could also think of using https://github.com/julia-actions/julia-format. This enables automatic suggestions in PRs based on the output of the formatter. |
@ranocha Most changes are about extra spaces. If you don't want this format applied to the docs, please remove the docs path from trixi-format.jl. |
@JoshuaLampert It seems tedious to trigger a new PR each time for formatting - I prefer to manually run the formatter. |
The julia-format action does not create new PRs, but adds suggestions to already existing PRs, which do not follow the formatting rules. I.e. everything you can do without this action is the same as with the action plus you get suggestions, which you just need to accept by clicking on the corresponding button in the GitHub interface. So if you forgot to format it locally, IMO this makes it a little bit more convenient. |
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.
I am in favor of formatting docs/. Although these are mostly white space changes, I think there are some small issues that should be fixed. See some comments below.
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.
Thanks for your PR. I agree with @JoshuaLampert - the whitespace changes are fine, but the changes related to comments should be improved in some cases.
I see. Thanks for reviewing @JoshuaLampert @ranocha! I changed the comments based on your comments and also added format to CI. Please check again. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2111 +/- ##
=======================================
Coverage 96.36% 96.36%
=======================================
Files 477 477
Lines 37750 37750
=======================================
Hits 36376 36376
Misses 1374 1374
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Could you please also update the section https://trixi-framework.github.io/Trixi.jl/stable/styleguide/#automated-source-code-formatting of the docs?
What do you mean - add docs formatting section? Why? Formatting docs is the same as formatting other things. |
Review again @ranocha - I am not sure what you mean but I added docs. |
Thanks @huiyuxie. If you click on the above link, which Hendrik posted, you will see that we have a section in our docs explaining the automated formatting and how to format the code. There it says, e.g., julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])' This is outdated with the current PR because this does not format the docs folder. You could replace that by julia -e 'using JuliaFormatter; format(".")' |
Thanks @JoshuaLampert! |
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.
Thanks!
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.
Thanks a lot!
See title.