Skip to content

Commit e36f013

Browse files
authored
CI simplify check-watermark (#4200)
* simplify check-watermark * Update .pre-commit-config.yaml
1 parent b32ec66 commit e36f013

File tree

4 files changed

+7
-30
lines changed

4 files changed

+7
-30
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ repos:
2222
- repo: local
2323
hooks:
2424
- id: watermark
25-
name: Check notebooks have watermark
25+
name: Check notebooks have watermark (see Jupyter style guide from PyMC3 Uncyclo)
2626
types: [jupyter]
27-
entry: python scripts/check_watermark.py
28-
language: python
27+
entry: '%load_ext watermark.*%watermark -n -u -v -iv -w'
28+
language: pygrep
29+
args: [--negate, --multiline]
30+
minimum_pre_commit_version: 2.8.0
2931
- id: check-toc
3032
name: Check all notebooks appear in table of contents
3133
types: [jupyter]

environment-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dependencies:
2121
- nose>=1.3
2222
- nose-parameterized>=0.6
2323
- numpydoc>=0.9
24+
- pre-commit>=2.8.0
2425
- pycodestyle>=2.3
2526
- pyflakes>=1.5
2627
- pylint>=1.7

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nbsphinx>=0.4.2
66
nose>=1.3.7
77
nose-parameterized==0.6.0
88
numpydoc>=0.9.1
9+
pre-commit>=2.8.0
910
pycodestyle>=2.3.1
1011
pyflakes>=1.5.0
1112
pylint>=1.7.4

scripts/check_watermark.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)