Skip to content

Commit debef90

Browse files
committed
fix run test-notebooks
1 parent 639d70c commit debef90

3 files changed

Lines changed: 78 additions & 37 deletions

File tree

examples/ConvertPyImageJDataset.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"source": [
1010
"import sys, os\n",
1111
"!conda install --yes --prefix {sys.prefix} -c conda-forge openjdk=8\n",
12-
"os.environ['JAVA_HOME'] = os.sep.join(sys.executable.split(os.sep)[:-2] + ['jre'])\n",
12+
"# In case of being already installed through pixi it should not be set to this path.\n",
13+
"if 'JAVA_HOME' not in os.environ:\n",
14+
" os.environ['JAVA_HOME'] = os.sep.join(sys.executable.split(os.sep)[:-2] + ['jre'])\n",
1315
"!{sys.executable} -m pip install multiscale-spatial-image matplotlib zarr pyimagej"
1416
]
1517
},

pixi.lock

Lines changed: 73 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ openjdk = "8.*"
105105
maven = ">=3.9.8,<3.10"
106106
jupyterlab = ">=4.2.4,<4.3"
107107
python = "3.10.*"
108+
jpype1 = ">=1.4.0,<1.5.0"
108109

109110
[tool.pixi.feature.notebooks.tasks]
110-
init-imagej = { cmd = "python3 -c \"import imagej; ij = imagej.init('2.15.0'); print(ij.getVersion())\"", description = "Initialize the python imagej installation" }
111+
init-imagej = { cmd = "python -c \"import imagej; ij = imagej.init('2.15.0'); print(ij.getVersion())\"", description = "Initialize the python imagej installation" }
111112
test-notebooks = { cmd = "pytest --nbmake --nbmake-timeout=3000 examples/ConvertImageioImageResource.ipynb examples/ConvertITKImage.ipynb examples/ConvertPyImageJDataset.ipynb examples/ConvertTiffFile.ipynb examples/HelloMultiscaleSpatialImageWorld.ipynb", depends-on = ["init-imagej"], description = "Test the notebooks" }
112113
dev-notebooks = { cmd = "jupyter lab examples", description = "Start Jupyter Lab" }
113114

0 commit comments

Comments
 (0)