-
Notifications
You must be signed in to change notification settings - Fork 6
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
Re-style codebase: validphys #1737
Conversation
Co-authored-by: Roy Stegeman <roystegeman@live.nl>
@@ -123,7 +128,7 @@ def evaluate_luminosity(pdf_set: LHAPDFSet, n: int, s:float, mx: float, | |||
channel: The channel tag name from LUMI_CHANNELS. | |||
""" | |||
|
|||
|
|||
# fmt: off |
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.
why did you put this here? I would agree that I don't especially like what black does with these long lines but also don't really think it's that much of a problem.
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 didn't like the changes. Like it is right now they are ordered as
= a1*b1
+ a2*b2
which makes sense to keep imho
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.
Good enough for me
@Zaharid are you ok with merging this as is in order to minimize possible conflicts? |
Haven't gone over the changes in detail, and I won't. Ideally someone would. In terms of style changes, I am hard pressed to see anything that is an actual improvement with most of the things being churn, which is why I feel at best lukewarm about all this. I guess it's good that we don't also get churn from string quotes. With that said, I suppose now that ignore revision files are more standardized my main reason for strongly opposing this is diminished. Please do add documentation about the ignore revision file, and how to use it to run git blame locally (ideally as a part of a different PR). Relatedly, I wish various offending commits (in the photon pr) were squashed out of existence rather than added to that file. This really should be for running the formatting changes we want. So the docs should say to not do that any more. |
It's not so much a style improvement as it is an easy way to keep a consistent style among all developers. For example
I agree that this is what I would have done, but at some point I have to weight the benefits of requesting yet another change with the cost of requesting/discussing and making that change, and in this case I decided to leave it be. Similar things happen with the code styling (though I know you're less lenient about styling than I am). I think a benefit of using black is that reviewers don't have to waste time nitpicking about formatting and yet the style of the code will remain consistent. As a more practical comment: the photon PR commits are now in master and I don't think we should get in the habit of force-pushing master.
|
I did not argue that.
I dd not argue that.
I don't believe that is true. |
You don't have to take my word for it, just go to the "blame view" of any file and it shows a message that the ignore-revs file is taken into account. |
I understand it works in github, but it does not if you run |
Right that could indeed be added to the docs |
I think people using git blame from the command line know how to use man or - - help. I think the docs should just tell people to use the tools and that when many things change contain it to a single commit that can get ignored. |
Overall the problem with adding a mountain of tools for your project is that then you have to support them and document them and ideally know which ignore file gets read by which tool with which flag. |
In this PR I've run
black
andisort
against most of validphys.I've gone through all changes. I've added
fmt: off
in a couple of places where I didn't like the changes thatblack
did and fixed several strings (mostly those that ended up looking"like" "this"
).I've skipped the tests and the scripts since they are in a category of their own and I prefer to hace some pre-approval of the people involved before spending more time looking at infinite diffs.
I've done validphys first because as far as I can see there are no big PRs left touching vp (other than the commondata parser, but that's on me). We could leave out specific files (by putting
fmt: off
in) that people might want to keep unchanged because they are working on them.