Skip to content

Commit dd0b2b8

Browse files
authored
simplify pre-commit and jupytext settings (#483)
* modify pre-commit and jupytext * ignore myst files when building docs
1 parent fafe18f commit dd0b2b8

File tree

106 files changed

+23
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+23
-138
lines changed

.jupytext.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
notebook_metadata_filter = "substitutions"
2-
3-
[formats]
4-
"examples/" = "ipynb"
5-
"myst_nbs/" = ".myst.md:myst"
1+
notebook_metadata_filter = "substitutions,-jupytext.text_representation.jupytext_version"
2+
formats = ["ipynb", ".myst.md:myst"]

.pre-commit-config.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
repos:
2-
- repo: https://github.com/mwouts/jupytext
3-
rev: v1.13.7
4-
hooks:
5-
- id: jupytext
6-
files: ^examples/.+\.ipynb$
7-
args: ["--sync"]
82
- repo: https://github.com/psf/black
93
rev: 22.3.0
104
hooks:
@@ -63,7 +57,7 @@ repos:
6357
name: Check no references that should be sphinx cross-references are urls
6458
description: >-
6559
'A quick check to prevent urls pointing to pymc docs or other sphinx built docs like arviz, numpy, scipy...'
66-
files: ^examples/
60+
files: ^examples/.+\.ipynb$
6761
exclude: >
6862
(?x)(index.md|
6963
404.md|
@@ -108,10 +102,4 @@ repos:
108102
hooks:
109103
- id: jupytext
110104
files: ^examples/.+\.ipynb$
111-
args: ["--sync"]
112-
- repo: https://github.com/codespell-project/codespell
113-
rev: v2.1.0
114-
hooks:
115-
- id: codespell
116-
files: myst_nbs/
117-
args: ["--write-changes", "--ignore-words-list", "hist,fpr,fro,lik", "--uri-ignore-words-list", "*"]
105+
args: [--from, ipynb, --to, ".myst.md:myst"]

myst_nbs/case_studies/BART_introduction.myst.md renamed to examples/case_studies/BART_introduction.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python 3 (ipykernel)
109
language: python

myst_nbs/case_studies/BEST.myst.md renamed to examples/case_studies/BEST.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: bayes_toolbox
109
language: python

myst_nbs/case_studies/GEV.myst.md renamed to examples/case_studies/GEV.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: pymc4-dev
109
language: python

myst_nbs/case_studies/LKJ.myst.md renamed to examples/case_studies/LKJ.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python 3 (ipykernel)
109
language: python

myst_nbs/case_studies/bayesian_ab_testing_introduction.myst.md renamed to examples/case_studies/bayesian_ab_testing_introduction.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python 3.8.10 ('pymc-examples-ipRlw-UN')
109
language: python

myst_nbs/case_studies/binning.myst.md renamed to examples/case_studies/binning.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python [conda env:pymc_env]
109
language: python

myst_nbs/case_studies/blackbox_external_likelihood.myst.md renamed to examples/case_studies/blackbox_external_likelihood.myst.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python 3 (ipykernel)
109
language: python
@@ -573,7 +572,7 @@ import warnings
573572
574573
warnings.simplefilter(
575574
action="ignore", category=FutureWarning
576-
) # suppress emcee autocorr FutureWarning
575+
) # suppress emcee autocorr FutureWarning
577576
578577
matplotlib.rcParams["font.size"] = 18
579578

myst_nbs/case_studies/blackbox_external_likelihood_numpy.myst.md renamed to examples/case_studies/blackbox_external_likelihood_numpy.myst.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.13.7
87
kernelspec:
98
display_name: Python 3 (ipykernel)
109
language: python

0 commit comments

Comments
 (0)