Skip to content

Commit 428d125

Browse files
authored
Merge pull request #237 from interpretml/gaugup/AddPython3.10
Add tests and classifier for python 3.10
2 parents 9ea27bd + 0381d35 commit 428d125

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
python-version: [3.6, 3.7, 3.8, 3.9]
18+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
1919
os: [ubuntu-latest, macos-latest]
2020
exclude:
2121
- os: macos-latest

requirements-deeplearning.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tensorflow>=1.13.0-rc1
2-
torch
2+
torch; python_version < '3.10'

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"Programming Language :: Python :: 3.7",
3939
"Programming Language :: Python :: 3.8",
4040
"Programming Language :: Python :: 3.9",
41+
"Programming Language :: Python :: 3.10",
4142
"License :: OSI Approved :: MIT License",
4243
"Operating System :: OS Independent",
4344
],

tests/test_notebooks.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import os
66
import subprocess
7+
import sys
78
import tempfile
89

910
import nbformat
@@ -16,7 +17,11 @@
1617
"DiCE_with_advanced_options.ipynb", # requires tensorflow 1.x
1718
"DiCE_getting_started_feasible.ipynb", # needs changes after latest refactor
1819
"Benchmarking_different_CF_explanation_methods.ipynb"
19-
]
20+
]
21+
# notebooks that don't need to run on python 3.10
22+
torch_notebooks_not_3_10 = [
23+
"DiCE_getting_started.ipynb"
24+
]
2025

2126
# Adding the dice root folder to the python path so that jupyter notebooks
2227
if 'PYTHONPATH' not in os.environ:
@@ -77,6 +82,11 @@ def _notebook_run(filepath):
7782
nb,
7883
marks=[pytest.mark.skip, pytest.mark.advanced],
7984
id=nb)
85+
elif sys.version_info >= (3, 10) and nb in torch_notebooks_not_3_10:
86+
param = pytest.param(
87+
nb,
88+
marks=[pytest.mark.skip, pytest.mark.advanced],
89+
id=nb)
8090
else:
8191
param = pytest.param(nb, id=nb)
8292
parameter_list.append(param)

0 commit comments

Comments
 (0)