Skip to content

Commit

Permalink
Merge pull request #169 from SINTEF/py3.12
Browse files Browse the repository at this point in the history
Add Py3.12 to CI
  • Loading branch information
TheBB authored Feb 6, 2024
2 parents 3c6cc82 + 047ce87 commit 86c9638
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: '*musllinux*'
CIBW_BEFORE_BUILD: pip install -r requirements.dev.txt
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools", "cython", "numpy"]
4 changes: 2 additions & 2 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Cython==0.29.33
numpy==1.24.2
Cython==3.0.8
numpy==1.26.4
pytest==6.2.5
pytest-benchmark==3.2.3
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy==1.24.2
scipy==1.10.1
h5py==3.8.0
numpy==1.26.4
scipy==1.12.0
h5py==3.10.0
tqdm==4.41.1
nutils==4.1
rhino3dm==7.15.0; (sys_platform == 'windows' and python_version < '3.11') or (sys_platform == 'linux' and python_version < '3.10')
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
long_description_content_type='text/markdown',
long_description=long_description,
keywords=['Bspline', 'Splines', 'NURBS', 'Curve', 'Surface', 'Volume', 'Interpolation', 'Approximation', 'Fit', 'Integration', 'Differentiation'],
url='https://github.com/sintefmath/Splipy',
url='https://github.com/sintef/Splipy',
maintainer='Kjetil Andre Johannessen',
maintainer_email='kjetijo@gmail.com',
license='GNU public license v3',
Expand All @@ -41,7 +41,7 @@
]),
# include_dirs=[np.get_include()],
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Topic :: Multimedia :: Graphics :: 3D Modeling',
'Topic :: Scientific/Engineering :: Mathematics',
'Intended Audience :: Science/Research',
Expand Down
34 changes: 34 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from __future__ import annotations

from typing import SupportsFloat, Sequence, Protocol, SupportsIndex, Iterator, Any, TypeVar, List, overload, Union
import numpy as np
from numpy.typing import ArrayLike


# T_co = TypeVar("T_co", covariant=True)


# class Seq(Protocol[T_co]):
# def __len__(self) -> int: ...
# @overload
# def __getitem__(self, index: SupportsIndex, /) -> T_co: ...
# @overload
# def __getitem__(self, index: slice, /) -> Seq[T_co]: ...
# def __iter__(self) -> Iterator[T_co]: ...
# def __contains__(self, x: Any) -> bool: ...
# def __reversed__(self, /) -> Iterator[T_co]: ...
# def count(self, value: Any, /) -> int: ...
# def index(self, value: Any, /) -> int: ...


# b: Seq[SupportsFloat]

# a: ArrayLike = b

f: float
n: np.floating
u: Union[float, np.floating]

reveal_type(abs(f))
reveal_type(abs(n))
reveal_type(abs(u))

0 comments on commit 86c9638

Please sign in to comment.