-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add format suggestions to CI #2118
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. |
@ranocha What are you going to discuss here? |
Format CI failed since I added docs format check to CI but #2111 has not yet been merged. |
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.
We don't need the previous part (i.e. the check-format
job) anymore. This is also done by the new action.
With this setup the job only runs if we explicitly add the label format-suggest
. I would prefer not having to add a label to the PR for the job to run. I.e. I would delete the corresponding lines.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2118 +/- ##
==========================================
+ Coverage 95.50% 96.36% +0.86%
==========================================
Files 477 477
Lines 37752 37753 +1
==========================================
+ Hits 36052 36378 +326
+ Misses 1700 1375 -325
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.
Thanks.
Co-authored-by: Hendrik Ranocha <[email protected]>
Co-authored-by: Hendrik Ranocha <[email protected]>
Co-authored-by: Hendrik Ranocha <[email protected]>
Why do we stick to formatter 1.0.60 it already has been updated to 2.0.0 @ranocha |
We had bad experience with changes that broke some of our code. Thus, we decided to stick to a fixed version of the formatter. If everything is fine with v2, we can also update the version accordingly. If you like, please search the code/docs for it and update it acordingly. |
I would like to get feedback from @sloede. Do you have an example PR to see how the suggestions etc. look like? |
I prefer to do it in another PR.
Wait - update: if you are interested please try by yourself as I cannot show you @ranocha |
Please do not update to v2 now. This is quite new and has many problems, see https://github.com/domluna/JuliaFormatter.jl/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen. Because of that JuliaFormatter v2.0.0 has been yanked, see JuliaRegistries/General#117438. We should not use it now. If things settled and everything works, we can switch to it (v2 also solves some bugs from v1, which is nice), but now it's too early. |
I changed the format of advection 1D in example - format suggestions works but it is hard for me to read |
The suggestions will not work in this PR because it is only for PRs, which originate not from forks. This is for security reasons, see e.g. julia-actions/julia-format#34. |
If you want to see how it looks like, you can, e.g., have a look here. |
Hmm but most contributions are from forks |
In that case the situation is as before. Your job fails if the code is not formatted and you need to format it locally. |
I see - it also makes sense |
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.
Looks interesting... I think we should give it a try and see how we fare with it. Thanks!
Same as title.