-
-
Notifications
You must be signed in to change notification settings - Fork 251
/
.pre-commit-config.yaml
106 lines (104 loc) · 4.22 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
105
106
ci:
autofix_prs: false
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black-jupyter
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-isort
additional_dependencies: [isort==5.6.4]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.7.4]
args: [--py37-plus]
- repo: https://github.com/MarcoGorelli/madforhooks
rev: 0.4.1
hooks:
- id: check-execution-order
args: [--strict]
exclude: |
(?x)^
^examples/ode_models/ODE_with_manual_gradients\.ipynb$
|examples/samplers/DEMetropolisZ_EfficiencyComparison\.ipynb$
|examples/gaussian_processes/GP-MaunaLoa2\.ipynb$
|examples/samplers/MLDA_gravity_surveying\.ipynb$
|examples/howto/sampling_callback\.ipynb$
|examples/case_studies/blackbox_external_likelihood\.ipynb$
|examples/samplers/GLM-hierarchical-jax\.ipynb$
|examples/variational_inference/convolutional_vae_keras_advi\.ipynb$
|examples/gaussian_processes/GP-TProcess\.ipynb$
|examples/mixture_models/dependent_density_regression\.ipynb$
|examples/gaussian_processes/GP-Heteroskedastic\.ipynb$
|examples/samplers/MLDA_variance_reduction_linear_regression\.ipynb$
- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.11.0
hooks:
- id: bibtex-tidy
files: examples/references.bib
args: ["--sort=key", --quiet]
- repo: local
hooks:
- id: watermark
args: [--negate, --multiline]
entry: '%load_ext watermark.*%watermark -n -u -v -iv -w'
language: pygrep
minimum_pre_commit_version: 2.8.0
name: Check notebooks have watermark (see Jupyter style guide from PyMC docs)
types: [jupyter]
- 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|
examples/case_studies/LKJ.ipynb|
examples/case_studies/LKJ.ipynb|
examples/case_studies/blackbox_external_likelihood.ipynb|
examples/case_studies/blackbox_external_likelihood_numpy.ipynb|
examples/case_studies/item_response_nba.ipynb|
examples/gaussian_processes/GP-MaunaLoa2.ipynb|
examples/generalized_linear_models/GLM-logistic.ipynb|
examples/generalized_linear_models/GLM-out-of-sample-predictions.ipynb|
examples/generalized_linear_models/GLM-poisson-regression.ipynb|
examples/generalized_linear_models/GLM-rolling-regression.ipynb|
examples/generalized_linear_models/GLM-simpsons-paradox.ipynb|
examples/howto/api_quickstart.ipynb|
examples/samplers/MLDA_gravity_surveying.ipynb|
examples/samplers/MLDA_simple_linear_regression.ipynb|
examples/samplers/SMC-ABC_Lotka-Volterra_example.ipynb|
examples/splines/spline.ipynb|
examples/survival_analysis/censored_data.ipynb|
examples/survival_analysis/weibull_aft.ipynb|
examples/howto/custom_distribution.ipynb)
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]
- repo: https://github.com/mwouts/jupytext
rev: v1.16.3
hooks:
- id: jupytext
files: ^examples/.+\.ipynb$
args: [--from, ipynb, --to, ".myst.md:myst"]