diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9209b7..e666c3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout rustfrc - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Set up the repository with the Docker container action, which will allow us to build and run a manylinux Docker # container that will ensure compatibility. See the action repository for more info. - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 + id: setup-py with: python-version: ${{ matrix.py-version }} @@ -33,17 +34,18 @@ jobs: with: tool: maturin - # poetry update will install all dependencies for our package, as well as maturin, which we use as our build - # back-end + # poetry update will install all dependencies for our package - name: Poetry install - run: poetry install --sync --no-root + run: | + poetry env use '${{ steps.setup-py.outputs.python-path }}' + poetry install --sync --no-root working-directory: ${{ github.workspace }} - name: Test lower version if: ${{ matrix.py-version == '3.8' }} run: | . $(poetry env info --path)/bin/activate - pip install numpy==1.18.0 + pip install numpy==1.18.0 --only-binary true working-directory: ${{ github.workspace }} - name: maturin develop @@ -68,8 +70,8 @@ jobs: matrix: py-version: [ '3.9', '3.10', '3.11', '3.12' ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.py-version }} # The x86_64 Rust toolchain is installed on GitHub runners, but since we compile also for Apple Silicon, we also @@ -96,8 +98,8 @@ jobs: matrix: py-version: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.py-version }} - name: Build wheels @@ -119,8 +121,8 @@ jobs: matrix: py-version: [ '3.9', '3.10', '3.11', '3.12' ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.py-version }} - name: Build wheels diff --git a/CHANGELOG.md b/CHANGELOG.md index ff25d9f..0d4db82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.1.5 2024-04-03 + +* **Reintroduce Python 3.8, Numpy 1.18+ support**: Turned out it was unnecessary to drop all older versions. + ## 1.1.4 2024-04-03 * **Drop Python 3.7, 3.8 support**: Note that this is technically a breaking change, but 1.1.3 works just fine for older versions and this doesn't include much else. This is necessary to use NumPy 1.26, which is required for Python >=3.12. diff --git a/Cargo.toml b/Cargo.toml index 40b618c..1a2be1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustfrc" -version = "1.1.4" +version = "1.1.5" edition = "2021" [lib] diff --git a/README.md b/README.md index d924eb9..d9c25c5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # rustfrc -### v1.1.4 requires NumPy v1.26+ (in order to support Python 3.12) and Python 3.9+. For earlier versions, downgrade to v1.1.3. - ![GitHub release](https://flat.badgen.net/github/release/tmtenbrink/rustfrc) ![License](https://flat.badgen.net/github/license/tmtenbrink/rustfrc) @@ -19,10 +17,8 @@ Furthermore, there are also (since version 1.1) `sqr_abs(a: ndarray) -> ndarray` ## Requirements -* Python 3.9-3.12 -* NumPy 1.26 or greater - -If you are on Python 3.7-3.11 or are using an earlier version of NumPy, use `v1.1.3` instead. +* Python 3.8-3.12 +* NumPy 1.18+ (exact version might depend on Python version, e.g. Python 3.12 requires NumPy 1.26) ## Performance diff --git a/poetry.lock b/poetry.lock index b51de55..d6991fa 100644 --- a/poetry.lock +++ b/poetry.lock @@ -73,6 +73,51 @@ files = [ {file = "numpy-1.24.4.tar.gz", hash = "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463"}, ] +[[package]] +name = "numpy" +version = "1.26.4" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, + {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"}, + {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"}, + {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"}, + {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"}, + {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"}, + {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"}, + {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"}, + {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"}, + {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"}, + {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, +] + [[package]] name = "packaging" version = "24.0" @@ -135,4 +180,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">= 3.8, <3.13" -content-hash = "4c011836c713f7f4197bd7316e85684b2d7ca2a52ee2a24e09021a63c4ea8dc0" +content-hash = "f2c0b3791634bea11b61b41518e12b30091eb13abeb4bb8502a0fc5f4d41fb12" diff --git a/pyproject.toml b/pyproject.toml index c0ce595..b3f6f77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rustfrc" -version = "1.1.4" +version = "1.1.5" description = "Fast utility functions useful for Fourier Ring/Shell Correlation: binom_split, pois_gen, square_abs." readme = "README.md" requires-python = ">=3.8, <3.13" @@ -16,7 +16,8 @@ classifiers = [ "Topic :: Scientific/Engineering :: Image Processing" ] dependencies = [ - "numpy >= 1.18, < 2" + "numpy >= 1.18; python_version < '3.12'", + "numpy >= 1.26; python_version >= '3.12'" ] [project.urls] @@ -24,13 +25,16 @@ Source = "https://github.com/tmtenbrink/rustfrc" [tool.poetry] name = "rustfrc" -version = "1.1.4" +version = "1.1.5" description = "Fast utility functions useful for Fourier Ring/Shell Correlation: binomial splitting of arrays." authors = ["Tip ten Brink "] [tool.poetry.dependencies] python = ">= 3.8, <3.13" -numpy = "^1.18" +numpy = [ + {version = "^1.18", python = "<3.12"}, + {version = "^1.26", python = ">=3.12"} +] [tool.poetry.dev-dependencies] pytest = "^8.1.1"