Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving pytables to conda install only, dropping python 3.9 #134

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
58 changes: 43 additions & 15 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -38,39 +38,67 @@ 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: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
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
- name: Install dependencies
# Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
MMathisLab marked this conversation as resolved.
Show resolved Hide resolved
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Create and activate environment (Linux/macOS)
if: runner.os != 'Windows'
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

# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: aganders3/headless-gui@v2
with:
run: python -m tox
- 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 (Linux/macOS)
if: runner.os != 'Windows'
run: |
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 }}

- name: Coverage
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]
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Loading