Skip to content

Commit 09fa531

Browse files
authored
Merge pull request #55 from zivy/updatePythonVersions
Updates to Python.
2 parents e899b31 + 1c316c6 commit 09fa531

File tree

5 files changed

+28
-24
lines changed

5 files changed

+28
-24
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Notebook Testing
22

3+
env:
4+
PYTHON_VERSION: "3.13"
5+
36
on:
47
push:
58
branches:
@@ -27,10 +30,10 @@ jobs:
2730
runs-on: ubuntu-latest
2831
steps:
2932
- uses: actions/checkout@v5
30-
- name: Set up Python 3.9
33+
- name: Set up Python ${{ env.PYTHON_VERSION }}
3134
uses: actions/setup-python@v5
3235
with:
33-
python-version: 3.9
36+
python-version: ${{ env.PYTHON_VERSION }}
3437
- name: Install and run black for notebooks
3538
run: |
3639
python -m pip install --upgrade pip
@@ -40,8 +43,8 @@ jobs:
4043
needs: lint
4144
strategy:
4245
matrix:
43-
# not using macos-latest because pyenchant doesn't work with the new macos-14 arm64
44-
os: [ubuntu-latest, macos-13, windows-latest]
46+
# using macos-13, last available intel architecture. macos-latest is arm64 architecture.
47+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
4548
inputs: ["00_ or 01_ or 02_ or 03_ or 04_ or 05_", "06_ or 07_ or 08_ or 09_ or 10_"]
4649
runs-on: ${{ matrix.os }}
4750
steps:
@@ -54,10 +57,10 @@ jobs:
5457
key: notebook-data-${{ hashFiles('data/manifest.json') }}
5558
restore-keys: |
5659
notebook-data-${{ hashFiles('data/manifest.json') }}
57-
- name: Set up Python 3.9
60+
- name: Set up Python ${{ env.PYTHON_VERSION }}
5861
uses: actions/setup-python@v5
5962
with:
60-
python-version: 3.9
63+
python-version: ${{ env.PYTHON_VERSION }}
6164
- name: Install enchant on non windows systems
6265
shell: bash
6366
run: |
@@ -78,7 +81,11 @@ jobs:
7881
if: steps.cache.outputs.cache-hit != 'true'
7982
run: python downloaddata.py data/ data/manifest.json
8083
- name: run the test
84+
shell: bash
8185
env:
8286
SIMPLE_ITK_MEMORY_CONSTRAINED_ENVIRONMENT: 1
83-
run: |
87+
run: | # pyenchant has a problem locating libenchant on macOS-ARM64. setting this environment variable resolves the issue
88+
if [ "$RUNNER_OS" == "macOS" ] && [ "${{ matrix.os }}" != "macos-13" ]; then
89+
export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib
90+
fi
8491
pytest -v --tb=short -k "${{matrix.inputs}}" tests/test_notebooks.py::Test_notebooks::test_python_notebook

binder/runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.9
1+
python-3.13

docs/index.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@
129129

130130

131131
<p>
132-
In this tutorial we will use the Anaconda Python distribution. Please follow the
132+
In this tutorial we will use the Miniconda Python distribution. Please follow the
133133
instructions below to setup the environment. All
134134
commands below are issued on the <b>command line</b> (Linux/Mac - terminal,
135-
Windows - Anaconda Prompt).
135+
Windows - Miniconda Prompt).
136136
</p>
137137

138138
<ol>
@@ -153,23 +153,22 @@
153153
</li>
154154

155155
<li>
156-
<a href="https://www.anaconda.com/download/">Download and install</a> the most
157-
recent version of Anaconda for your operating system. We assume it is installed
158-
in a directory named anaconda3. Regardless of the installer, we will be working
159-
with Python 3.9
156+
<a href="https://www.anaconda.com/docs/getting-started/miniconda/main">Download and install</a> the most
157+
recent version of Miniconda for your operating system. We assume it is installed
158+
in a directory named miniconda3. Regardless of the installer, we will be working
159+
with Python 3.13
160160
</li>
161161

162162
<li>
163163
<ul>
164-
<li> On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu).</li>
165-
<li> On Linux/Mac: on the command line <code>source path_to_anaconda3/bin/activate base</code></li>
164+
<li> On Windows: open the Miniconda Prompt (found under the Miniconda3 start menu).</li>
165+
<li> On Linux/Mac: on the command line <code>source path_to_miniconda3/bin/activate base</code></li>
166166
</ul>
167167
</li>
168168

169169
<li>
170-
Update the base anaconda environment and install the git version control system into it.
170+
Update the base environment and install the git version control system into it.
171171
<pre><code>conda update conda
172-
conda update anaconda
173172
conda install git
174173
</code></pre>
175174
</li>
@@ -189,9 +188,9 @@
189188
<li>
190189
Activate the virtual environment:
191190
<ul>
192-
<li> On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu)<br><code>
191+
<li> On Windows: open the Miniconda Prompt (found under the Miniconda3 start menu)<br><code>
193192
conda activate sitkpy</code></li>
194-
<li> On Linux/Mac: on the command line <br><code>source path_to_anaconda3/bin/activate
193+
<li> On Linux/Mac: on the command line <br><code>source path_to_miniconda3/bin/activate
195194
sitkpy</code></li>
196195
</ul>
197196
</li>

environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: sitkpy
22

33
channels:
4-
- defaults
54
- conda-forge
65

76
dependencies:
8-
- python=3.9
7+
- python=3.13
98
- jupyter
109
- matplotlib
1110
- ipywidgets

environment_dev.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: sitkpy_dev
22

33
channels:
4-
- defaults
54
- conda-forge
65

76
dependencies:
8-
- python=3.9
7+
- python=3.13
98
- jupyter
109
- matplotlib
1110
- ipywidgets

0 commit comments

Comments
 (0)