-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
80 lines (74 loc) · 2.16 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.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
args: [--branch, main]
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py312-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/MarcoGorelli/madforhooks
rev: 0.4.1
hooks:
- id: no-print-statements
types: [python]
exclude: |
(?x)^
|gEconpy/classes/model.py
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
types: [python]
- repo: https://github.com/MarcoGorelli/madforhooks
rev: 0.4.1
hooks:
- id: check-execution-order
args: [--strict]
- repo: local
hooks:
- id: notebook_name
entry: '\(notebook_name\)='
language: pygrep
minimum_pre_commit_version: 2.8.0
name: Check notebooks do not use literally notebook_name as target
types: [jupyter]
- id: no-references-as-links
name: Check no references that should be sphinx cross-references are urls
description: >-
'A quick check to prevent urls pointing to pymc docs or other sphinx built docs like arviz, numpy, scipy...'
files: ^examples/.+\.ipynb$
exclude: >
(?x)(index.md|
404.md|
conf.py)
entry: >
(?x)(arviz-devs.github.io|
pymc-experimental.readthedocs.io|
docs.pymc.io|
numpy.org/doc|
pymc-examples.readthedocs.io|
docs.python.org|
xarray.pydata.org
python.arviz.org|
pytensor.readthedocs.io|
docs.xarray.dev|
www.pymc.io|
docs.scipy.org/doc)
language: pygrep
types_or: [markdown, rst, jupyter]