diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d6f49e1..4939ccc 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.1 +current_version = 2.1.0 commit = True tag = True diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84ac163..ea879a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,18 +10,14 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - # exclude MacOS arm64 on 3.7 - exclude: - - os: macos-latest - python-version: '3.7' + python-version: ['3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -33,7 +29,41 @@ jobs: pip install -e . - name: Run linting tests on files in src - run: ruff src + run: ruff check src - name: Run tests - run: pytest \ No newline at end of file + run: pytest + + # test old versions of numpy; this follows advice in + # https://numpy.org/doc/stable/dev/depending_on_numpy.html#depending-on-numpy + old_numpy_test: + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Build wheel via wheel, then install it + run: | + python -m pip install build + python -m build # This will pull in numpy 2.0 in an isolated env + python -m pip install dist/*.whl + + - name: Test against oldest supported numpy version + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools + python -m pip install numpy==1.26.4 + # now run test suite + pip install -r requirements.txt + pip install pytest ruff + pip install -e . + pytest \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0a64d71..9fa3513 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,7 +32,7 @@ env: jobs: build_sdist: name: Build SDist - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: @@ -43,27 +43,32 @@ jobs: if: github.event.inputs.overrideVersion run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}" >> $GITHUB_ENV + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Build SDist run: pipx run build --sdist - name: Check metadata run: pipx run twine check --strict dist/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz build_arch_wheels: name: ${{ matrix.python }} on ${{ matrix.arch }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - python: [37, 38, 39, 310, 311, 312] + python: [39, 310, 311, 312] arch: [aarch64] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true @@ -77,7 +82,7 @@ jobs: with: platforms: all - - uses: pypa/cibuildwheel@v2.16 + - uses: pypa/cibuildwheel@v2.20 env: CIBW_BUILD: cp${{ matrix.python }}-manylinux_* CIBW_ARCHS: ${{ matrix.arch }} @@ -87,7 +92,7 @@ jobs: shell: bash - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: wheelhouse/*.whl @@ -115,7 +120,7 @@ jobs: shell: bash run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}" >> $GITHUB_ENV - - uses: pypa/cibuildwheel@v2.16 + - uses: pypa/cibuildwheel@v2.20 env: CIBW_BUILD: ${{ matrix.build }} CIBW_ARCHS: ${{ matrix.arch }} @@ -125,7 +130,7 @@ jobs: shell: bash - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: wheelhouse/*.whl diff --git a/REVISION b/REVISION index 38f77a6..7ec1d6d 100644 --- a/REVISION +++ b/REVISION @@ -1 +1 @@ -2.0.1 +2.1.0 diff --git a/pyproject.toml b/pyproject.toml index ad357e0..8c1df2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,12 @@ [project] +requires-python = ">=3.9" name = "fastkde" -dynamic = ["dependencies", "version", "optional-dependencies", "description", "readme", "authors", "keywords"] +dynamic = ["version", "optional-dependencies", "description", "readme", "authors", "keywords"] +dependencies = [ + "numpy>=1.26.4", + "scipy", + "xarray", +] [tool.setuptools.dynamic] dependencies = {file = ["requirements.txt"]} @@ -16,7 +22,7 @@ requires = [ "wheel", "toml", "setuptools_scm>=4.1.2", - "oldest-supported-numpy; python_version>='3.5'", + "numpy>=2.0.0", ] build-backend = "setuptools.build_meta"