diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4bb9683..64ed8b9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0b2f0c5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ["setuptools", "cython", "numpy"] diff --git a/requirements.dev.txt b/requirements.dev.txt index 5816f1a..f00586a 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -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 diff --git a/requirements.txt b/requirements.txt index c60632f..69bbaa2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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') diff --git a/setup.py b/setup.py index dc535be..7e8f330 100644 --- a/setup.py +++ b/setup.py @@ -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', @@ -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', diff --git a/test.py b/test.py new file mode 100644 index 0000000..6558ecf --- /dev/null +++ b/test.py @@ -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))