-
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
.pre-commit-config.yaml
104 lines (103 loc) · 3.29 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
ci:
autofix_prs: false
exclude: ^(docs/logos|pymc/tests/data)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: requirements-txt-fixer
exclude: ^requirements-dev\.txt$
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
# - id: python-no-eval # gets confused with all the `.eval()`
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/citation-file-format/cffconvert
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
args: ["."]
- repo: https://github.com/lucianopaz/head_of_apache
rev: "0.0.3"
hooks:
- id: head_of_apache
args:
- --author=The PyMC Developers
- --exclude=docs/
- --exclude=scripts/
- --exclude=binder/
- --exclude=versioneer.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format
- repo: local
hooks:
- id: check-no-tests-are-ignored
additional_dependencies: [pandas,pyyaml]
entry: python scripts/check_all_tests_are_covered.py
files: ^.github/workflows/tests.yml$
language: python
name: Check no tests are ignored
pass_filenames: false
- id: pip-from-conda
additional_dependencies: [pyyaml]
entry: python scripts/generate_pip_deps_from_conda.py
files: ^conda-envs/environment-dev.yml$
language: python
name: Generate pip dependency from conda
- id: no-internal-links
name: Check no links that should be cross-references are in the docs
description: >-
'A quick check for the links in the intersphinx '
'mapping inside `docs/source/`'
'See docs/source/conf.py for more information.'
files: ^docs/source/
# Files that should be ignored:
# - index.md
# - 404.md
# - contributing/release_checklist.md
# The other files are under development and should be
# removed from the list once they are revised.
exclude: >
(?x)(index.md|
404.md|
contributing/release_checklist.md|
contributing/versioning_schemes_explanation.md|
learn/examples.md)
entry: >
(?x)(arviz-devs.github.io|
python.arviz.org|
pytensor.readthedocs.io|
pymc-experimental.readthedocs.io|
docs.pymc.io|
www.pymc.io|
numpy.org/doc|
pymc-examples.readthedocs.io|
myst-parser.readthedocs.io|
myst-nb.readthedocs.io|
docs.python.org|
xarray.pydata.org)
language: pygrep
types_or: [markdown, rst, jupyter]