From e85cb1db311a65bb556e98b90ee2620095f03789 Mon Sep 17 00:00:00 2001 From: Nick Coish Date: Tue, 25 Mar 2025 17:24:22 -0400 Subject: [PATCH 1/5] Update pyo3 and numpy crate versions to support python 3.13 --- Cargo.toml | 8 ++++---- pyproject.toml | 2 +- python-src/fastpdb/__init__.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9c2b741..655e797 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "fastpdb" -version = "1.3.1" +version = "1.3.2" edition = "2018" [dependencies] -numpy = "0.21" +numpy = "0.24" ndarray = "0.16" [dependencies.pyo3] -version = "0.21" +version = "0.24" features = ["extension-module"] [lib] name = "fastpdb" -crate-type = ["cdylib"] \ No newline at end of file +crate-type = ["cdylib"] diff --git a/pyproject.toml b/pyproject.toml index 7f90794..81baf8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fastpdb" -version = "1.3.1" +version = "1.3.2" description = "A high performance drop-in replacement for Biotite's PDBFile." readme = "README.rst" requires-python = ">=3.7" diff --git a/python-src/fastpdb/__init__.py b/python-src/fastpdb/__init__.py index eb9a25c..68bc1d9 100644 --- a/python-src/fastpdb/__init__.py +++ b/python-src/fastpdb/__init__.py @@ -1,7 +1,7 @@ __name__ = "fastpdb" __author__ = "Patrick Kunzmann" __all__ = ["PDBFile"] -__version__ = "1.3.1" +__version__ = "1.3.2" import os import warnings From 2df96f3ab458e6929ffdeed2e01dd8addaf4612f Mon Sep 17 00:00:00 2001 From: Nick Coish Date: Tue, 25 Mar 2025 17:35:22 -0400 Subject: [PATCH 2/5] github: replace deprecated v3 upload-artifact API in test_and_deploy workflow --- .github/workflows/test_and_deploy.yml | 40 ++++++++++++++------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index b4ad6ee..325993d 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -42,11 +42,11 @@ jobs: run: pip install .//dist//*.whl - name: Test wheel run: pytest --assert=plain tests - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: artifact-wheel-${{ matrix.os }}-${{ matrix.py-version }} path: .//dist//*.whl - sdist: name: Build & test source distribution runs-on: ubuntu-latest @@ -66,8 +66,9 @@ jobs: run: pip install .//dist//*.tar.gz - name: Test source distribution run: pytest --assert=plain tests - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: artifact-tar-${{ matrix.os }}-${{ matrix.py-version }} path: dist//*.tar.gz benchmarks: @@ -92,19 +93,20 @@ jobs: needs: [wheels, sdist, benchmarks] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 - with: - name: artifact - path: dist - - name: List distributions to be uploaded - run: ls dist - - name: Upload to GitHub Releases - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 - if: github.event_name == 'release' && github.event.action == 'published' - with: - files: dist//* - - name: Upload to PyPI - uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc - if: github.event_name == 'release' && github.event.action == 'published' - with: - password: ${{ secrets.PYPI_TOKEN }} + - uses: actions/download-artifact@v4 + with: + pattern: artifact-* + merge-multiple: true + path: dist + - name: List distributions to be uploaded + run: ls dist + - name: Upload to GitHub Releases + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 + if: github.event_name == 'release' && github.event.action == 'published' + with: + files: dist//* + - name: Upload to PyPI + uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc + if: github.event_name == 'release' && github.event.action == 'published' + with: + password: ${{ secrets.PYPI_TOKEN }} From f8cddfedf5b305d139de90448f223846cf499224 Mon Sep 17 00:00:00 2001 From: Nick Coish Date: Tue, 25 Mar 2025 17:46:24 -0400 Subject: [PATCH 3/5] github: template MATURIN_VERSION and update to latest in workflow --- .github/workflows/test_and_deploy.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 325993d..a62e667 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -9,8 +9,10 @@ on: pull_request: release: types: - - published + - published +env: + MATURIN_VERSION: "1.8" jobs: wheels: @@ -32,10 +34,10 @@ jobs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: stable - override: true + toolchain: stable + override: true - name: Install dependencies - run: pip install "maturin==1.4" "oldest-supported-numpy" pytest + run: pip install "maturin==$MATURIN_VERSION" "oldest-supported-numpy" pytest - name: Build wheel run: maturin build --release -i python -o dist - name: Install wheel @@ -59,7 +61,7 @@ jobs: with: python-version: "3.12" - name: Install dependencies - run: pip install "maturin==1.4" pytest + run: pip install "maturin==$MATURIN_VERSION" pytest - name: Build source distribution run: maturin sdist -o dist - name: Install source distribution From 91fda0723a59e7467573aa1b7f190118bee0580d Mon Sep 17 00:00:00 2001 From: Nick Coish Date: Tue, 25 Mar 2025 17:46:51 -0400 Subject: [PATCH 4/5] github: Add python 3.13 to the test matric and remove deprecated macos-12 test --- .github/workflows/test_and_deploy.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index a62e667..45c6560 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -20,8 +20,8 @@ jobs: strategy: matrix: # Support both Mac x86_64 and arm64 - os: [ubuntu-latest, windows-latest, macos-12, macos-latest] - py-version: ["3.10", "3.11", "3.12"] + os: [ubuntu-latest, windows-latest, macos-latest] + py-version: ["3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} defaults: run: @@ -59,7 +59,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 with: - python-version: "3.12" + python-version: "3.13" - name: Install dependencies run: pip install "maturin==$MATURIN_VERSION" pytest - name: Build source distribution @@ -80,7 +80,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 with: - python-version: "3.12" + python-version: "3.13" - name: Install dependencies run: pip install .[test] - name: Run benchmarks @@ -95,7 +95,8 @@ jobs: needs: [wheels, sdist, benchmarks] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + - name: Download Artifacts + uses: actions/download-artifact@v4 with: pattern: artifact-* merge-multiple: true From 888e09fda0973a911f544992087c59de764a8281 Mon Sep 17 00:00:00 2001 From: Nick Coish Date: Tue, 25 Mar 2025 17:54:02 -0400 Subject: [PATCH 5/5] pyproject.toml: broaden numpy build system dependency to allow existing numpy versions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81baf8c..09cb0d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,6 @@ python-source = "python-src" [build-system] requires = [ "maturin >=1.0,<2.0", - "numpy == 1.26" + "numpy >=1.26,<1.27" ] build-backend = "maturin"