Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve precommit config to apply fixes locally #209

Merged
merged 3 commits into from Jan 14, 2022

Conversation

wjbenfold
Copy link
Contributor

馃殌 Pull Request

Description

See #205 for context. Implements something similar to SciTools/iris#4235 for cf-units

@codecov
Copy link

codecov bot commented Jan 14, 2022

Codecov Report

Merging #209 (2e69fd6) into main (63d5b2c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #209   +/-   ##
=======================================
  Coverage   91.05%   91.05%           
=======================================
  Files           6        6           
  Lines         816      816           
  Branches      121      121           
=======================================
  Hits          743      743           
  Misses         61       61           
  Partials       12       12           

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 63d5b2c...2e69fd6. Read the comment docs.

@trexfeathers
Copy link
Collaborator

trexfeathers commented Jan 14, 2022

@wjbenfold have you been able to work out that cf-units doesn't have any paths to exclude like Iris does? That was the main thing I was worried about.

#209 (comment)

@wjbenfold
Copy link
Contributor Author

I'm not confident of that, no. So far just happy that it appears to be doing the same things at the same time as I'd expect from Iris.

Are there any other things you'd like checking that I might not have thought of (by which I mean anything at all that you'd check)?

@trexfeathers
Copy link
Collaborator

Scratch what I said before! It wasn't excluded files it was excluded hooks that I was thinking of.

Are there any other things you'd like checking that I might not have thought of (by which I mean anything at all that you'd check)?

  1. Renaming stuff that says linting to pre-commit, to make it clear that it's doing whatever pre-commit is doing.
  2. Make sure the list of pre-commit hooks that get run excludes those that would be harmful/non-sensical.

Sorry I see now that I jumped the gun and hadn't realised you were still working through the PR 馃槼

@wjbenfold wjbenfold marked this pull request as draft January 14, 2022 11:42
@wjbenfold
Copy link
Contributor Author

Definitely my bad for not making it draft. I'll get on those things now

@wjbenfold
Copy link
Contributor Author

Make sure the list of pre-commit hooks that get run excludes those that would be harmful/non-sensical.

The only one that Iris skips and that thus seems necessary to skip is no-commit-to-branch. I've told the CI to do that, and in the CI pre-commit check it shows up as skipped, but the pre-commit.ci check shows is Passed rather than Skipped. Is the pre-commit stuff running twice?

I've just checked, and the same things happens in Iris' CI, so I don't think it's a bad thing here

@wjbenfold wjbenfold marked this pull request as ready for review January 14, 2022 12:27
Copy link
Collaborator

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @wjbenfold , thanks so much!

And I can confirm that this is doing what I would expect, too.

@trexfeathers trexfeathers merged commit a210133 into SciTools:main Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants