The template for `.pre-commit-config.yaml` has been updated
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with .pre-commit-config.yaml and compare it with the linked .github template, using the supplied diff as the initial checklist. Apply the relevant hook ordering, ruff, sort-all, and trailing-whitespace changes, then validate the pre-commit configuration and hooks; done means the repository file matches the appropriate template conventions.
Written by the indexing model from the issue text.
Description
Templating
The template for .pre-commit-config.yaml has been updated; see the diff below. Please either:
- Action this issue with a pull request applying some/all of these changes to
.pre-commit-config.yaml[^1]. - Close this issue if none of these changes are appropriate for this repo.
Also consider reviewing a full diff between the template and .pre-commit-config.yaml, in case other valuable shared conventions have previously been missed.
File Links
- The file in this repo:
.pre-commit-config.yaml - The template file in the .github repo:
templates/.pre-commit-config.yaml
Diff
diff --git a/templates/.pre-commit-config.yaml b/templates/.pre-commit-config.yaml
index 35f2ab2..2acfb31 100644
--- a/templates/.pre-commit-config.yaml
+++ b/templates/.pre-commit-config.yaml
@@ -58,7 +58,7 @@ repos:
- id: trailing-whitespace
# Hooks from all other repos
-# NOTE : keep these in hook-name (aka 'id') order
+# In terms of ordering: hooks that modify files should be placed before hooks that do not.
- repo: https://github.com/adamchainz/blacken-docs
# This template does not keep up-to-date with versions, visit the repo to see the most recent release.
@@ -67,6 +67,23 @@ repos:
- id: blacken-docs
types: [file, rst]
+- repo: https://github.com/astral-sh/ruff-pre-commit
+ # This template does not keep up-to-date with versions, visit the repo to see the most recent release.
+ rev: "v0.7.4"
+ hooks:
+ - id: ruff-check
+ types: [file, python]
+ args: [--fix, --show-fixes]
+ - id: ruff-format
+ types: [file, python]
+
+- repo: https://github.com/aio-libs/sort-all
+ # This template does not keep up-to-date with versions, visit the repo to see the most recent release.
+ rev: v1.3.0
+ hooks:
+ - id: sort-all
+ types: [file, python]
+
- repo: https://github.com/codespell-project/codespell
# This template does not keep up-to-date with versions, visit the repo to see the most recent release.
rev: "v2.3.0"
@@ -89,23 +106,6 @@ repos:
- id: numpydoc-validation
types: [file, python]
-- repo: https://github.com/astral-sh/ruff-pre-commit
- # This template does not keep up-to-date with versions, visit the repo to see the most recent release.
- rev: "v0.7.4"
- hooks:
- - id: ruff-check
- types: [file, python]
- args: [--fix, --show-fixes]
- - id: ruff-format
- types: [file, python]
-
-- repo: https://github.com/aio-libs/sort-all
- # This template does not keep up-to-date with versions, visit the repo to see the most recent release.
- rev: v1.3.0
- hooks:
- - id: sort-all
- types: [file, python]
-
- repo: https://github.com/scientific-python/cookie
# This template does not keep up-to-date with versions, visit the repo to see the most recent release.
rev: 2024.08.19
@@ -126,4 +126,3 @@ repos:
rev: v1.25.2
hooks:
- id: zizmor
-
[^1]: Include this text in the PR body to avoid any prompts about applying your changes back to the template!
@scitools-templating: please no share prompt
- Dominant language
- Python
- Stars
- 724
- Forks
- 317
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SciTools/iris
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100