Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ env:
UV_FROZEN: 1

jobs:
prek:
runs-on: ubuntu-24.04
env:
SKIP: 'no-commit-to-branch'

steps:
- uses: actions/checkout@v7
- uses: j178/prek-action@v2

test:
name: Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
Expand Down
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
ci:
autofix_prs: false
autoupdate_schedule: quarterly
autoupdate_commit_msg: "chore: update pre-commit hooks"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0"
hooks:
- id: no-commit-to-branch
- id: check-merge-conflict
- id: check-yaml
- id: check-added-large-files
exclude: uv.lock

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.1"
rev: "v0.16.0"
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.63
hooks:
- id: ty

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.34.1"
rev: "0.37.4"
hooks:
- id: check-github-workflows

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.15.0
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --offset, '2', --preserve-quotes]

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.4
rev: 0.11.31
hooks:
# Check and update the uv lockfile
- id: uv-lock
30 changes: 0 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ testpaths = [
"tests",
]


[tool.coverage]
run.source = ["harmonwig"]
report.exclude_also = [
Expand All @@ -64,34 +63,5 @@ report.exclude_also = [
[tool.ruff]
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"PLC0415", # `import` should be at the top-level of a file
"ISC001", # Conflicts with formatter
]

[tool.uv]
required-version = ">=0.9.0"