forked from alan-turing-institute/clim-recal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
64 lines (57 loc) · 1.77 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
exclude: "data"
repos:
- repo: https://github.com/psf/black
rev: "24.4.2"
hooks:
- id: black-jupyter
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pdm-project/pdm
rev: 2.17.1 # a PDM release exposing the hook
hooks:
- id: pdm-lock-check
args: [--lockfile, python/pdm.lock]
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
args: [python/, --config=python/pyproject.toml]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--settings-path", "python/pyproject.toml"]
- repo: local
hooks:
- id: sync-conda-lock
name: sync-conda-lock
language: python
verbose: true
files: ^(\.pre-commit-hooks.yaml|environment.yml|conda-lock.yml|python/pyproject.toml)$
entry: >
bash -c 'cd python &&
python -c "from clim_recal.utils.server import _pre_commit_conda_lock; _pre_commit_conda_lock(execute_all=True)"'
# Currently fails to build.
# See: https://github.com/lorenzwalthert/precommit/issues/476
# - repo: https://github.com/lorenzwalthert/precommit
# rev: v0.3.2
# hooks:
# - id: readme-rmd-rendered