-
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
Run pre-commit hooks after inputs redesign to use GenericDataset #143
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In the future, could we put all formatting-related changes in their own commit or even better in their own PR?
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.
What do you mean? Usually, pre-commit is turned on, so the formatting would happen for every commit. Since it was turned off as part of this development work, re-enabling it immediately ran all the hooks. And then it warned me about types, other static errors, etc., so I fixed those manually, but it wouldn't let me commit without fixing everything.
I could have let the auto-formatting run, then uninstalled pre-commit, pushed a commit with just auto-formatting, re-installed pre-commit, and made any manual changes in a separate commit if that's in line with what you're asking for. Yeah, that sounds like a good strategy if this happens again.
P.S. I agree this is suboptimal and I'd prefer to find ways to avoid disabling pre-commit and creating these kinds of PRs in the future.
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'm not sure how to achieve it, but I mean literally what I said. I had to read everything way closer because I couldn't tell if it was going to be a formatting related change or some other kind of change (e.g. using a python 3.10 feature or something).
It would be much easier to review if a single commit contained anything related to auto-formatting. Like run precommit without any feature-related changes for the first commit, then future commits are the non-formatting changes, like adding a trialing comma or whatever. That way, as the reviewer, I can skip looking at the commit/changes that auto-format, which saves mental load, and because I trust whatever auto-formatter we're using, and we have testing to make sure auto-formatting doesn't accidentally break anything.
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.
Totally fair. I had originally had it as a separate commit and will do so next time.
Just a heads up that I didn't make the aforementioned change. The trialing comma was actually pre-commit formatting. The only things I did were fixing the errors pre-commit returned, then fixing the 2-3 CLI unit tests that broke when the behavior was fixed. I think you're right though - I can run it just with auto-format and save that as a commit so that you don't need to review that commit.
Thanks again for reviewing so much with such quick turnaround, Matt!