diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a912a5..56a55ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,8 @@ name: Notebook Testing +env: + PYTHON_VERSION: "3.13" + on: push: branches: @@ -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 @@ -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: @@ -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: | @@ -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 diff --git a/binder/runtime.txt b/binder/runtime.txt index 8fdd907..e912aa6 100644 --- a/binder/runtime.txt +++ b/binder/runtime.txt @@ -1 +1 @@ -python-3.9 +python-3.13 diff --git a/docs/index.html b/docs/index.html index 052ad98..871da8e 100755 --- a/docs/index.html +++ b/docs/index.html @@ -129,10 +129,10 @@

-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 command line (Linux/Mac - terminal, -Windows - Anaconda Prompt). +Windows - Miniconda Prompt).

    @@ -153,23 +153,22 @@
  1. -Download and install 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 +Download and install 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
  2. -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.
    conda update conda
    -conda update anaconda
     conda install git
     
  3. @@ -189,9 +188,9 @@
  4. Activate the virtual environment:
  5. diff --git a/environment.yml b/environment.yml index ce294a9..50ae00f 100644 --- a/environment.yml +++ b/environment.yml @@ -1,11 +1,10 @@ name: sitkpy channels: - - defaults - conda-forge dependencies: - - python=3.9 + - python=3.13 - jupyter - matplotlib - ipywidgets diff --git a/environment_dev.yml b/environment_dev.yml index 46e9982..4e19f97 100644 --- a/environment_dev.yml +++ b/environment_dev.yml @@ -1,11 +1,10 @@ name: sitkpy_dev channels: - - defaults - conda-forge dependencies: - - python=3.9 + - python=3.13 - jupyter - matplotlib - ipywidgets