Skip to content

Commit 8c3b3d7

Browse files
authored
ci: test jupyter notebooks (#1426)
1 parent 9cd9879 commit 8c3b3d7

11 files changed

+302
-213
lines changed

.github/workflows/test-notebooks.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Test Jupyter Notebooks"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test-notebooks:
13+
strategy:
14+
matrix:
15+
python-version: ["3.10", "3.11"]
16+
os: ["ubuntu-latest"]
17+
fail-fast: false
18+
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
cache: 'pip'
27+
cache-dependency-path: |
28+
**/pyproject.toml
29+
**/constraints.txt
30+
**/requirements-dev.txt
31+
- name: Install python dependencies
32+
run: |
33+
python -m pip install -c ./constraints.txt pip setuptools wheel
34+
python -m pip install -r ./requirements-dev.txt
35+
- name: Run tox tests
36+
env:
37+
NUM_PROCESSES: auto
38+
shell: bash
39+
run: |
40+
pyversion=${{ matrix.python-version }}
41+
pyversion_no_dot=${pyversion//./}
42+
tox run -e notebooks-py${pyversion_no_dot}

.pre-commit-config.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ repos:
6262
## version = re.search('black==([0-9\.]*)', open("constraints.txt").read())[1]
6363
## print(f"rev: '{version}' # version from constraints.txt")
6464
##]]]
65-
rev: '23.11.0' # version from constraints.txt
65+
rev: '23.12.1' # version from constraints.txt
6666
##[[[end]]]
6767
hooks:
6868
- id: black
@@ -73,7 +73,7 @@ repos:
7373
## version = re.search('isort==([0-9\.]*)', open("constraints.txt").read())[1]
7474
## print(f"rev: '{version}' # version from constraints.txt")
7575
##]]]
76-
rev: '5.13.0' # version from constraints.txt
76+
rev: '5.13.2' # version from constraints.txt
7777
##[[[end]]]
7878
hooks:
7979
- id: isort
@@ -84,7 +84,7 @@ repos:
8484
## version = re.search('flake8==([0-9\.]*)', open("constraints.txt").read())[1]
8585
## print(f"rev: '{version}' # version from constraints.txt")
8686
##]]]
87-
rev: '6.1.0' # version from constraints.txt
87+
rev: '7.0.0' # version from constraints.txt
8888
##[[[end]]]
8989
hooks:
9090
- id: flake8
@@ -97,7 +97,7 @@ repos:
9797
## print(f"- {pkg}==" + str(re.search(f'\n{pkg}==([0-9\.]*)', constraints)[1]))
9898
##]]]
9999
- darglint==1.8.1
100-
- flake8-bugbear==23.12.2
100+
- flake8-bugbear==24.1.17
101101
- flake8-builtins==2.2.0
102102
- flake8-debugger==4.1.2
103103
- flake8-docstrings==1.7.0
@@ -146,9 +146,9 @@ repos:
146146
## version = re.search('mypy==([0-9\.]*)', open("constraints.txt").read())[1]
147147
## print(f"#========= FROM constraints.txt: v{version} =========")
148148
##]]]
149-
#========= FROM constraints.txt: v1.7.1 =========
149+
#========= FROM constraints.txt: v1.8.0 =========
150150
##[[[end]]]
151-
rev: v1.7.1 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date)
151+
rev: v1.8.0 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date)
152152
hooks:
153153
- id: mypy
154154
additional_dependencies: # versions from constraints.txt
@@ -161,27 +161,27 @@ repos:
161161
## print(f"- {pkg}==" + str(re.search(f'\n{pkg}==([0-9\.]*)', constraints)[1]))
162162
##]]]
163163
- astunparse==1.6.3
164-
- attrs==23.1.0
165-
- black==23.11.0
164+
- attrs==23.2.0
165+
- black==23.12.1
166166
- boltons==23.1.1
167167
- cached-property==1.5.2
168168
- click==8.1.7
169-
- cmake==3.27.9
170-
- cytoolz==0.12.2
169+
- cmake==3.28.1
170+
- cytoolz==0.12.3
171171
- deepdiff==6.7.1
172172
- devtools==0.12.2
173-
- frozendict==2.3.10
173+
- frozendict==2.4.0
174174
- gridtools-cpp==2.3.1
175175
- importlib-resources==6.1.1
176-
- jinja2==3.1.2
177-
- lark==1.1.8
178-
- mako==1.3.0
176+
- jinja2==3.1.3
177+
- lark==1.1.9
178+
- mako==1.3.1
179179
- nanobind==1.8.0
180180
- ninja==1.11.1.1
181181
- numpy==1.24.4
182182
- packaging==23.2
183183
- pybind11==2.11.1
184-
- setuptools==69.0.2
184+
- setuptools==69.0.3
185185
- tabulate==0.9.0
186186
- typing-extensions==4.5.0
187187
- xxhash==3.0.0

0 commit comments

Comments
 (0)