From b73e9c77beec0b5ab98867c0aef6635add0a0edc Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 15:58:27 -0400 Subject: [PATCH 01/12] Update test_and_deploy.yml - conda install tables --- .github/workflows/test_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 3561aaf..5dab1ce 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -57,6 +57,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions + conda install -c conda-forge pytables==3.8.0 # this runs the platform-specific tests declared in tox.ini - name: Test with tox From ff4bc6f99071ac3066b1cfb743f8f61a9f3e3ca0 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:03:14 -0400 Subject: [PATCH 02/12] Update test_and_deploy.yml --- .github/workflows/test_and_deploy.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 5dab1ce..9b07c1b 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -49,15 +49,18 @@ jobs: powershell gl-ci-helpers/appveyor/install_opengl.ps1 if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} - # note: if you need dependencies from conda, considering using - # setup-miniconda: https://github.com/conda-incubator/setup-miniconda - # and - # tox-conda: https://github.com/tox-dev/tox-conda + # Set up Miniconda + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | + conda install -c conda-forge pytables==3.8.0 python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions - conda install -c conda-forge pytables==3.8.0 # this runs the platform-specific tests declared in tox.ini - name: Test with tox From 080f6f1fcbb34fd8d0a52fe84405ecbba6be0ee9 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:05:48 -0400 Subject: [PATCH 03/12] Update test_and_deploy.yml - install miniconda --- .github/workflows/test_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 9b07c1b..99c943a 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -53,6 +53,7 @@ jobs: - name: Set up Miniconda uses: conda-incubator/setup-miniconda@v2 with: + miniconda-version: "latest" auto-update-conda: true python-version: ${{ matrix.python-version }} From 6d2b7dc99ea8ad4f75fe45b5876f0c6b6acece72 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:10:36 -0400 Subject: [PATCH 04/12] Update setup.cfg --- setup.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index a5e4849..7f8506f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering :: Artificial Intelligence Topic :: Scientific/Engineering :: Image Processing @@ -41,8 +40,7 @@ install_requires = qtpy>=2.4 scikit-image scipy - tables -python_requires = >=3.9 +python_requires = >=3.10 include_package_data = True package_dir = =src From 7cbaea6250d44dd0a7bbb15b1c2541cd40f55b15 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:11:13 -0400 Subject: [PATCH 05/12] Update tox.ini --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index c715870..e9fa69b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,10 @@ # For more information about tox, see https://tox.readthedocs.io/en/latest/ [tox] -envlist = py{39,310}-{linux,macos,windows} +envlist = py{310}-{linux,macos,windows} isolated_build=true [gh-actions] python = - 3.9: py39 3.10: py310 [gh-actions:env] From 23e095c2c26656b3151b88b60e6ad7c6f3a5e964 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:34:54 -0400 Subject: [PATCH 06/12] Update test_and_deploy.yml From 7a3b1f3041637c5fa77ea81289f4fa4a695da9df Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Tue, 11 Jun 2024 16:36:19 -0400 Subject: [PATCH 07/12] Update test_and_deploy.yml --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 99c943a..6a67cd2 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.9, "3.10"] + python-version: ["3.10"] steps: - uses: actions/checkout@v4 From acde60a2a1f2d67fcec18df49a15d501d33d9cdc Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Wed, 12 Jun 2024 11:41:26 -0400 Subject: [PATCH 08/12] Update test_and_deploy.yml --- .github/workflows/test_and_deploy.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 6a67cd2..ce36e22 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -57,17 +57,19 @@ jobs: auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Create and activate environment run: | - conda install -c conda-forge pytables==3.8.0 + conda create --name test-env python=${{ matrix.python-version }} -y + conda activate test-env + conda install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions # this runs the platform-specific tests declared in tox.ini - name: Test with tox - uses: aganders3/headless-gui@v2 - with: - run: python -m tox + run: | + conda activate test-env + python -m tox env: PLATFORM: ${{ matrix.platform }} From 7ec0c100da5c06f81fe411d1fe4aba26c189a983 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Wed, 12 Jun 2024 11:54:26 -0400 Subject: [PATCH 09/12] Update test_and_deploy.yml --- .github/workflows/test_and_deploy.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index ce36e22..b496fae 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -1,4 +1,4 @@ -# This workflows will upload a Python Package using Twine when a release is created +# This workflow will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries name: tests @@ -38,10 +38,10 @@ jobs: with: python-version: ${{ matrix.python-version }} - # these libraries enable testing on Qt on linux + # These libraries enable testing on Qt on linux - uses: tlambert03/setup-qt-libs@v1 - # strategy borrowed from vispy for installing opengl libs on windows + # Strategy borrowed from vispy for installing opengl libs on Windows - name: Install Windows OpenGL if: runner.os == 'Windows' run: | @@ -57,18 +57,28 @@ jobs: auto-update-conda: true python-version: ${{ matrix.python-version }} + - name: Initialize Conda + shell: bash + run: | + eval "$(conda shell.bash hook)" + conda init bash + - name: Create and activate environment + shell: bash run: | + eval "$(conda shell.bash hook)" conda create --name test-env python=${{ matrix.python-version }} -y - conda activate test-env + source activate test-env conda install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions - # this runs the platform-specific tests declared in tox.ini + # This runs the platform-specific tests declared in tox.ini - name: Test with tox + shell: bash run: | - conda activate test-env + eval "$(conda shell.bash hook)" + source activate test-env python -m tox env: PLATFORM: ${{ matrix.platform }} @@ -77,7 +87,7 @@ jobs: uses: codecov/codecov-action@v4 deploy: - # this will run when you have tagged a commit, starting with "v*" + # This will run when you have tagged a commit, starting with "v*" # and requires that you have put your twine API key in your # github secrets (see readme for details) needs: [test] From a9a2ddb66a683eed135fbeb28ac762db4df9fc82 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Wed, 12 Jun 2024 12:04:03 -0400 Subject: [PATCH 10/12] Update test_and_deploy.yml - trying again... --- .github/workflows/test_and_deploy.yml | 37 +++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index b496fae..104f3e7 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -57,28 +57,39 @@ jobs: auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Initialize Conda - shell: bash + - name: Create and activate environment (Linux/macOS) + if: runner.os != 'Windows' run: | - eval "$(conda shell.bash hook)" - conda init bash - - - name: Create and activate environment - shell: bash - run: | - eval "$(conda shell.bash hook)" + source $HOME/miniconda/etc/profile.d/conda.sh conda create --name test-env python=${{ matrix.python-version }} -y source activate test-env conda install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions + - name: Create and activate environment (Windows) + if: runner.os == 'Windows' + run: | + C:\Miniconda\Scripts\conda.exe create --name test-env python=${{ matrix.python-version }} -y + C:\Miniconda\Scripts\activate test-env + C:\Miniconda\Scripts\conda.exe install -c conda-forge pytables==3.8.0 -y + python -m pip install --upgrade pip + python -m pip install setuptools tox tox-gh-actions + # This runs the platform-specific tests declared in tox.ini - - name: Test with tox - shell: bash + - name: Test with tox (Linux/macOS) + if: runner.os != 'Windows' run: | - eval "$(conda shell.bash hook)" - source activate test-env + source $HOME/miniconda/etc/profile.d/conda.sh + conda activate test-env + python -m tox + env: + PLATFORM: ${{ matrix.platform }} + + - name: Test with tox (Windows) + if: runner.os == 'Windows' + run: | + C:\Miniconda\Scripts\activate test-env python -m tox env: PLATFORM: ${{ matrix.platform }} From e18d87db3551478bcbd5de0ca4313ac86e945295 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Wed, 12 Jun 2024 13:02:58 -0400 Subject: [PATCH 11/12] Update .github/workflows/test_and_deploy.yml Co-authored-by: Jessy Lauer <30733203+jeylau@users.noreply.github.com> --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 104f3e7..e38dec1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -51,7 +51,7 @@ jobs: # Set up Miniconda - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" auto-update-conda: true From e3b38b2d964e3c5db3d92bef07fe128037a06237 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Wed, 12 Jun 2024 13:05:49 -0400 Subject: [PATCH 12/12] Update test_and_deploy.yml --- .github/workflows/test_and_deploy.yml | 28 +++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index e38dec1..c612f56 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -1,4 +1,4 @@ -# This workflow will upload a Python Package using Twine when a release is created +# This workflows will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries name: tests @@ -57,21 +57,36 @@ jobs: auto-update-conda: true python-version: ${{ matrix.python-version }} + # Initialize Conda on Linux/macOS + - name: Initialize Conda (Linux/macOS) + if: runner.os != 'Windows' + shell: bash -l {0} + run: | + conda init bash + - name: Create and activate environment (Linux/macOS) if: runner.os != 'Windows' + shell: bash -l {0} run: | - source $HOME/miniconda/etc/profile.d/conda.sh conda create --name test-env python=${{ matrix.python-version }} -y source activate test-env conda install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions + # Initialize Conda on Windows + - name: Initialize Conda (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + C:\Miniconda\Scripts\conda.exe init powershell + - name: Create and activate environment (Windows) if: runner.os == 'Windows' + shell: powershell run: | C:\Miniconda\Scripts\conda.exe create --name test-env python=${{ matrix.python-version }} -y - C:\Miniconda\Scripts\activate test-env + conda activate test-env C:\Miniconda\Scripts\conda.exe install -c conda-forge pytables==3.8.0 -y python -m pip install --upgrade pip python -m pip install setuptools tox tox-gh-actions @@ -79,17 +94,18 @@ jobs: # This runs the platform-specific tests declared in tox.ini - name: Test with tox (Linux/macOS) if: runner.os != 'Windows' + shell: bash -l {0} run: | - source $HOME/miniconda/etc/profile.d/conda.sh - conda activate test-env + source activate test-env python -m tox env: PLATFORM: ${{ matrix.platform }} - name: Test with tox (Windows) if: runner.os == 'Windows' + shell: powershell run: | - C:\Miniconda\Scripts\activate test-env + conda activate test-env python -m tox env: PLATFORM: ${{ matrix.platform }}