Skip to content

Commit 1a4cc45

Browse files
authored
Merge pull request #583 from thewtex/ci-install
BUG: Install all package dependencies in CI
2 parents e4b2213 + b592fa7 commit 1a4cc45

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/notebook-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
python-version: ['3.7', '3.8', '3.9', '3.10']
1212
steps:
1313
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
1416

1517
- name: Set up Python ${{ matrix.python-version }}
1618
uses: actions/setup-python@v3
@@ -25,7 +27,7 @@ jobs:
2527
- name: Install test dependencies
2628
run: |
2729
python3 -m pip install --upgrade pip
28-
python3 -m pip install -e ".[test]"
30+
python3 -m pip install -e ".[test,all]"
2931
python3 -m pip install pyimagej
3032
python3 -c "import imagej; ij = imagej.init('2.5.0'); print(ij.getVersion())"
3133
python3 -m pip install --upgrade --pre itk

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
1416
- name: Install build dependencies
1517
run: python -m pip install --upgrade hatch
1618
- name: Build

itkwidgets/integrations/environment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from enum import Enum
22
from importlib import import_module
3+
import sys
34

45

56
class Env(Enum):
@@ -37,7 +38,7 @@ def find_env():
3738
ENVIRONMENT = find_env()
3839

3940
if ENVIRONMENT is not Env.COLAB:
40-
if ENVIRONMENT is Env.JUPYTER_NOTEBOOK:
41+
if ENVIRONMENT is Env.JUPYTER_NOTEBOOK and sys.version_info.minor > 7:
4142
try:
4243
import imjoy_jupyter_extension
4344
except:
@@ -47,15 +48,14 @@ def find_env():
4748
import_module("imjoy-jupyterlab-extension")
4849
except:
4950
if ENVIRONMENT is Env.JUPYTERLITE:
50-
print('imjoy-jupyterlab-extension is required')
5151
raise RuntimeError('imjoy-jupyterlab-extension is required. Install the package and refresh page.')
52-
else:
52+
elif sys.version_info.minor > 7:
5353
raise RuntimeError('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.')
5454

5555
try:
5656
import imjoy_elfinder
5757
except:
5858
if ENVIRONMENT is Env.JUPYTERLITE:
5959
raise RuntimeError('imjoy-elfinder is required. Install the package and refresh page.')
60-
else:
60+
elif sys.version_info.minor > 7:
6161
raise RuntimeError('imjoy-elfinder is required. `pip install imjoy-elfinder` and refresh page.')

0 commit comments

Comments
 (0)