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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit config #11

Merged
merged 11 commits into from
Jul 20, 2024
Merged

Add pre-commit config #11

merged 11 commits into from
Jul 20, 2024

Conversation

C-Loftus
Copy link
Member

Adds a pre-commit config. Done in a separate PR from #9 so we don't mess up the git blame.

This is very similar to the config in the template repo. It essentially just applies ruff on every PR so we have a standard format. If we don't like this or want different styles, we can customize ruff with any of its settings listed as it describes here: https://docs.astral.sh/ruff/settings/#extend

@C-Loftus
Copy link
Member Author

C-Loftus commented Jul 19, 2024

Not really clear what is going wrong here. Pre-commit is making all the fixes but it can't push to the branch. I can't see any reason for this myself, but @webb-ben do you know if we have anything in place that would be blocking pre-commit from pushing? (Some sort of security policy/branch protection rule I can't see for any reason?) It says to make sure the branch is up to date, but it is.

(And just for context, the pre-commit message it supposed to say FAILED before it makes changes, but then it simply pushes to the branch again and fixes any failures on the hooks.

image
image

This reverts commit 0aaa502.

Update .pre-commit-config.yaml

Reapply "make file with shebang executable"

This reverts commit f58f191.
@webb-ben webb-ben self-requested a review July 19, 2024 23:23
Copy link
Member

@webb-ben webb-ben left a comment

Choose a reason for hiding this comment

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

Change prettier to single quotes?

@webb-ben webb-ben merged commit 1f7273c into cgs-earth:master Jul 20, 2024
2 checks passed
@C-Loftus
Copy link
Member Author

Thanks for fixing that. When you get a chance would you mind letting me know how you fixed this? Can't tell from git history

@C-Loftus C-Loftus deleted the pre-commit branch July 22, 2024 12:07
@webb-ben
Copy link
Member

Fixed the precommit ci?

For some reason precommit can't lint workflow files so I made sure all the files in .github/workflows/** and .pre-commit-config.yml were properly linted

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.

2 participants