Skip to content

Commit

Permalink
add support for python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaehne committed Feb 11, 2025
1 parent 168b755 commit 41f700f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,38 @@ jobs:
MPLBACKEND: agg
PIP_ARGS: --upgrade -e
PYTEST_ARGS: --pyargs lumispy
PYTEST_ARGS_COVERAGE:
PYTEST_ARGS_COVERAGE: --cov=. --cov-report=xml
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
PYTHON_VERSION: ['3.8', '3.12']
PYTHON_VERSION: ['3.10', '3.12']
PIP_SELECTOR: ['[tests]',]
include:
- os: ubuntu
PYTHON_VERSION: '3.9'
PYTHON_VERSION: '3.11'
PIP_SELECTOR: '[tests]'
- os: ubuntu
PYTHON_VERSION: '3.10'
PYTHON_VERSION: '3.13'
PIP_SELECTOR: '[tests]'
# dev
- os: ubuntu
PYTHON_VERSION: '3.11'
PIP_SELECTOR: '[tests, coverage]'
PYTEST_ARGS_COVERAGE: --cov=lumispy --cov-report=xml
LABEL: '/coverage'
PYTHON_VERSION: '3.12'
PIP_SELECTOR: '[tests]'
LABEL: '-dev'
# minimum
- os: ubuntu
PYTHON_VERSION: '3.9'
PIP_SELECTOR: '[tests]'
LABEL: '-minimum'
# oldest
- os: ubuntu
PYTHON_VERSION: '3.9'
PIP_SELECTOR: '[tests]'
LABEL: -release-oldest
# Matching pyproject.toml
DEPENDENCIES: hyperspy==1.7.3

steps:
- uses: actions/checkout@v4

Expand All @@ -48,17 +61,22 @@ jobs:
run: |
pip install ${{ env.PIP_ARGS }} .'${{ matrix.PIP_SELECTOR }}'
- name: Pip list
run: |
pip list
- name: Install (HyperSpy dev)
# Test against the hyperspy `RELEASE_next_minor` branch
if: ${{ matrix.PYTEST_ARGS_COVERAGE }}
shell: bash
run: |
pip install https://github.com/hyperspy/hyperspy/archive/RELEASE_next_minor.zip
- name: Install oldest supported version
if: contains( matrix.LABEL, 'oldest')
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Pip list
run: |
pip list
- name: Run test suite
run: |
pytest ${{ env.PYTEST_ARGS }} ${{ matrix.PYTEST_ARGS_COVERAGE }}
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"hyperspy >= 1.7", # earlier versions do not provide non-uniform axes
"hyperspy >= 1.7.3", # earlier versions fail on pint dependency
"numpy",
"scipy",
"pint>=0.10",
Expand Down Expand Up @@ -61,7 +61,7 @@ keywords = [
]
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"

[project.entry-points."hyperspy.extensions"]
lumispy = "lumispy"
Expand Down

0 comments on commit 41f700f

Please sign in to comment.