Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Notebook Testing

env:
PYTHON_VERSION: "3.13"

on:
push:
branches:
Expand Down Expand Up @@ -27,10 +30,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.9
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ env.PYTHON_VERSION }}
- name: Install and run black for notebooks
run: |
python -m pip install --upgrade pip
Expand All @@ -40,8 +43,8 @@ jobs:
needs: lint
strategy:
matrix:
# not using macos-latest because pyenchant doesn't work with the new macos-14 arm64
os: [ubuntu-latest, macos-13, windows-latest]
# using macos-13, last available intel architecture. macos-latest is arm64 architecture.
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
inputs: ["00_ or 01_ or 02_ or 03_ or 04_ or 05_", "06_ or 07_ or 08_ or 09_ or 10_"]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -54,10 +57,10 @@ jobs:
key: notebook-data-${{ hashFiles('data/manifest.json') }}
restore-keys: |
notebook-data-${{ hashFiles('data/manifest.json') }}
- name: Set up Python 3.9
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ env.PYTHON_VERSION }}
- name: Install enchant on non windows systems
shell: bash
run: |
Expand All @@ -78,7 +81,11 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: python downloaddata.py data/ data/manifest.json
- name: run the test
shell: bash
env:
SIMPLE_ITK_MEMORY_CONSTRAINED_ENVIRONMENT: 1
run: |
run: | # pyenchant has a problem locating libenchant on macOS-ARM64. setting this environment variable resolves the issue
if [ "$RUNNER_OS" == "macOS" ] && [ "${{ matrix.os }}" != "macos-13" ]; then
export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib
fi
pytest -v --tb=short -k "${{matrix.inputs}}" tests/test_notebooks.py::Test_notebooks::test_python_notebook
2 changes: 1 addition & 1 deletion binder/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.9
python-3.13
23 changes: 11 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@


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

<ol>
Expand All @@ -153,23 +153,22 @@
</li>

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

<li>
<ul>
<li> On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu).</li>
<li> On Linux/Mac: on the command line <code>source path_to_anaconda3/bin/activate base</code></li>
<li> On Windows: open the Miniconda Prompt (found under the Miniconda3 start menu).</li>
<li> On Linux/Mac: on the command line <code>source path_to_miniconda3/bin/activate base</code></li>
</ul>
</li>

<li>
Update the base anaconda environment and install the git version control system into it.
Update the base environment and install the git version control system into it.
<pre><code>conda update conda
conda update anaconda
conda install git
</code></pre>
</li>
Expand All @@ -189,9 +188,9 @@
<li>
Activate the virtual environment:
<ul>
<li> On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu)<br><code>
<li> On Windows: open the Miniconda Prompt (found under the Miniconda3 start menu)<br><code>
conda activate sitkpy</code></li>
<li> On Linux/Mac: on the command line <br><code>source path_to_anaconda3/bin/activate
<li> On Linux/Mac: on the command line <br><code>source path_to_miniconda3/bin/activate
sitkpy</code></li>
</ul>
</li>
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: sitkpy

channels:
- defaults
- conda-forge

dependencies:
- python=3.9
- python=3.13
- jupyter
- matplotlib
- ipywidgets
Expand Down
3 changes: 1 addition & 2 deletions environment_dev.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: sitkpy_dev

channels:
- defaults
- conda-forge

dependencies:
- python=3.9
- python=3.13
- jupyter
- matplotlib
- ipywidgets
Expand Down
Loading