Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
update cibw workflow to support py313 and py314
  • Loading branch information
MuellerSeb committed Oct 16, 2025
commit c01bfbf835e38550e23f7c36e737323c24b32af2
106 changes: 68 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
source_check:
name: source check
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Install dependencies
run: |
Expand All @@ -34,7 +34,7 @@ jobs:

- name: black check
run: |
python -m black --check --diff --color .
python -m black --check --diff --color .

- name: isort check
run: |
Expand All @@ -50,49 +50,48 @@ jobs:
strategy:
fail-fast: false
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15-intel, macos-latest] # windows-11-arm (no scipy)

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Build wheels
uses: pypa/cibuildwheel@v2.18.0
uses: pypa/cibuildwheel@v3.2.1
with:
output-dir: dist
output-dir: dist-wheel-${{ matrix.os }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/*.whl
name: dist-wheel-${{ matrix.os }}
path: ./dist-wheel-${{ matrix.os }}/*.whl

build_sdist:
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }} scipy${{ matrix.ver.sp }}
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
os:
[ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14]
ver:
- {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
- {py: '3.9', np: '==1.20.0', sp: '==1.5.4'}
- {py: '3.10', np: '==1.21.6', sp: '==1.7.2'}
- {py: '3.11', np: '==1.23.2', sp: '==1.9.2'}
- {py: '3.12', np: '==1.26.2', sp: '==1.11.2'}
- {py: '3.12', np: '>=2.0.0rc1', sp: '>=1.13.0'}
- { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
- { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
- { py: "3.11", np: "==1.23.2", sp: "==1.9.2" }
- { py: "3.12", np: "==1.26.2", sp: "==1.11.2" }
- { py: "3.13", np: "==2.1.0", sp: "==1.14.1" }
- { py: "3.14", np: "==2.3.2", sp: "==1.16.1" }
- { py: "3.14", np: ">=2.3.2", sp: ">=1.16.1" }
exclude:
- os: macos-14
ver: {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
- os: macos-14
ver: {py: '3.9', np: '==1.20.0', sp: '==1.5.4'}
ver: { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
- os: macos-14
ver: {py: '3.10', np: '==1.21.6', sp: '==1.7.2'}
ver: { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Set up Python ${{ matrix.ver.py }}
uses: actions/setup-python@v5
Expand All @@ -102,41 +101,72 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build "coveralls>=3.0.0"
pip install build

- name: Install PyKrige
- name: Install pykrige
run: |
pip install -v --editable .[test]

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
python -m pytest --cov pykrige --cov-report term-missing -v tests/
python -m coveralls --service=github
python -m pytest -v tests/

- name: Build sdist
run: |
# PEP 517 package builder from pypa
python -m build --sdist --outdir dist .
python -m build --sdist --outdir dist-sdist .

- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
with:
name: dist-sdist
path: dist-sdist/*.tar.gz

coverage:
name: coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.9'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
path: dist/*.tar.gz
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "coveralls>=3.0.0"

- name: Install pykrige
run: |
pip install -v --editable .[test]

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install "numpy${{ matrix.ver.np }}"
python -m pytest --cov pykrige --cov-report term-missing -v tests/
python -m coveralls --service=github

upload_to_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: dist-*
merge-multiple: true
path: dist

- name: Publish to Test PyPI
# only if working on main
if: github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
35 changes: 18 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[build-system]
requires = [
"setuptools>=64",
"setuptools_scm>=7",
"numpy>=2.0.0rc1,<2.3; python_version >= '3.9'",
"scipy>=1.13.0,<2; python_version >= '3.9'",
"oldest-supported-numpy; python_version < '3.9'",
"scipy>=1.3.2,<2; python_version < '3.9'",
"Cython>=3.0.10,<3.1.0",
"setuptools>=77",
"wheel",
"Cython>=3",
"numpy>=2",
"scipy>=1.5.4",
"pentapy>=1.1.0,<2",
"setuptools_scm[toml]>=7",
]
build-backend = "setuptools.build_meta"

[project]
requires-python = ">=3.8"
requires-python = ">=3.9"
name = "PyKrige"
description = "Kriging Toolkit for Python."
authors = [
Expand All @@ -21,26 +21,27 @@ maintainers = [
{name = "Sebastian Müller, Roman Yurchak", email = "[email protected]"},
]
readme = "README.md"
license = {text = "BSD-3-Clause"}
license = "BSD-3-Clause"
license-files = ["LICENSE"]
dynamic = ["version"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: Unix",
"Operating System :: Microsoft",
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Mathematics",
Expand All @@ -49,7 +50,7 @@ classifiers = [
]
dependencies = [
"numpy>=1.20.0",
"scipy>=1.1.0,<2",
"scipy>=1.5.4,<2",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -86,9 +87,6 @@ Homepage = "https://github.com/GeoStat-Framework/PyKrige"
Source = "https://github.com/GeoStat-Framework/PyKrige"
Tracker = "https://github.com/GeoStat-Framework/PyKrige/issues"

[tool.setuptools]
license-files = ["LICENSE"]

[tool.setuptools_scm]
write_to = "src/pykrige/_version.py"
write_to_template = "__version__ = '{version}'"
Expand Down Expand Up @@ -155,8 +153,11 @@ max-line-length = 100
[tool.cibuildwheel]
# Switch to using build
build-frontend = "build"
# Disable building PyPy wheels on all platforms, 32bit and musllinux builds, py3.6/7
skip = ["cp36-*", "cp37-*", "pp*", "*-win32", "*-manylinux_i686", "*-musllinux_*"]
# Disable building py3.6/7/8, pp3.8, 32bit linux
skip = ["*-win32", "*_i686", "*-musllinux_*", "cp31?t-*"]
# Run the package tests using `pytest`
test-extras = "test"
test-command = "pytest -v {package}/tests"

environment.PIP_ONLY_BINARY = "numpy,scipy"
environment.PIP_PREFER_BINARY = "1"
Loading