From e2e4313f2ad75ec557a951bc9c4d8f5e63f40e9b Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 29 May 2025 17:49:47 +0200 Subject: [PATCH 01/14] MAINT: require scipy_doctest>=1.8.0 See https://discuss.scientific-python.org/t/scipy-doctest-select-only-doctests-or-both-doctests-and-unit-tests/1950 for the rationale and the plan. TL;DR: this is the only change needed to be forward-compatible with scipy_doctest>=1.8.0 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d7825607..33949a38 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -253,8 +253,8 @@ jobs: python ../pywt/tests/test_doc.py elif [ "${REFGUIDE_CHECK}" == "1" ]; then # doctests docstrings - pytest --doctest-modules --pyargs pywt -v --doctest-collect=api - pytest --doctest-modules --pyargs pywt.data -v + pytest --doctest-modules --doctest-only-doctests=true --pyargs pywt -v --doctest-collect=api + pytest --doctest-modules --doctest-only-doctests=true --pyargs pywt.data -v else pytest --pyargs pywt fi From ddf27d74bde3002f48123b3f8ea6a415126b2a7c Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sun, 27 Jul 2025 22:51:47 +0530 Subject: [PATCH 02/14] BLD/CI: Use cibuildwheel v3 (#810) --- .github/workflows/emscripten.yml | 2 +- .github/workflows/wheel_tests_and_release.yml | 20 ++++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index b7f35ff5..a01a4a04 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Build and test PyWavelets - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 env: CIBW_PLATFORM: pyodide CIBW_TEST_REQUIRES: pytest matplotlib diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index 3c190aec..fe928a7d 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -57,15 +57,13 @@ jobs: echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" - name: Build the wheel - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: output-dir: dist env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }} - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_2 - CIBW_FREE_THREADED_SUPPORT: True + CIBW_ENABLE: cpython-freethreading - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: wheels_linux_${{ matrix.cibw_arch }}_${{ matrix.cibw_python }} @@ -91,14 +89,12 @@ jobs: python-version: "3.12" - name: Build the wheel - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: output-dir: dist env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }} - CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 - CIBW_MUSLLINUX_AARCH64_IMAGE: musllinux_1_2 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: wheels_linux_${{ matrix.cibw_arch }}_${{ matrix.cibw_python }} @@ -145,7 +141,7 @@ jobs: - name: Build wheels for CPython (macOS) (x86_64) if: matrix.cibw_arch == 'x86_64' - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: output-dir: dist env: @@ -154,13 +150,13 @@ jobs: - name: Build wheels for CPython (macOS) (arm64) if: matrix.cibw_arch == 'arm64' - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: output-dir: dist env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} - CIBW_FREE_THREADED_SUPPORT: True + CIBW_ENABLE: cpython-freethreading - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: @@ -212,13 +208,13 @@ jobs: echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" - name: Build Windows wheels for CPython - uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 + uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: output-dir: dist env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_arch }} - CIBW_FREE_THREADED_SUPPORT: True + CIBW_ENABLE: cpython-freethreading - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: From 26fe03db4789af335dfca8670bf725b5c4381060 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Jul 2025 18:57:52 +0200 Subject: [PATCH 03/14] CI: pin setup-python action --- .github/workflows/wheel_tests_and_release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index fe928a7d..3d88b2b3 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 name: Install Python with: python-version: "3.12" @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 name: Install Python with: python-version: "3.12" @@ -123,7 +123,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 name: Install Python with: python-version: "3.12" @@ -178,7 +178,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 name: Install Python with: python-version: "3.12" @@ -239,7 +239,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 name: Install Python with: python-version: "3.12" From 44464b256a86b750320cf7a09b58aeb7b67dae36 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Jul 2025 18:55:16 +0200 Subject: [PATCH 04/14] CI: add cp314/cp314t wheel builds; improve cp313t builds This also adds Linux aarch64 and macOS x86-64 free-threaded wheels for Python 3.13 and 3.14. --- .github/workflows/wheel_tests_and_release.yml | 47 +++---------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index 3d88b2b3..5f697e6f 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -34,7 +34,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - cibw_python: ["cp311", "cp312", "cp313", "cp313t"] + cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"] cibw_arch: ["x86_64"] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -45,17 +45,6 @@ jobs: with: python-version: "3.12" - - name: Install build deps; set CIBW environment variables - if: ${{ matrix.cibw_python }} == "cp313t" - run: | - PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" - CIBW_DEPS="pip install --pre -i $PYPI_URL cython &&\ - pip install numpy pytest meson-python ninja" - NO_BUILD_ISOLATION="pip; args: --no-build-isolation" - echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" - - name: Build the wheel uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: @@ -77,7 +66,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04-arm] - cibw_python: ["cp311", "cp312", "cp313"] + cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"] cibw_arch: ["aarch64"] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -95,6 +84,7 @@ jobs: env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }} + CIBW_ENABLE: cpython-freethreading - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: wheels_linux_${{ matrix.cibw_arch }}_${{ matrix.cibw_python }} @@ -108,16 +98,13 @@ jobs: matrix: # macos-13 is the last runner that supports Intel (x86_64) architecture os: [macos-13, macos-14] - cibw_python: ["cp311", "cp312", "cp313", "cp313t"] + cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"] cibw_arch: ["x86_64", "arm64"] exclude: - os: macos-14 cibw_arch: "x86_64" - os: macos-13 cibw_arch: "arm64" - - os: macos-13 - cibw_arch: "x86_64" - cibw_python: "cp313t" steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -128,17 +115,6 @@ jobs: with: python-version: "3.12" - - name: Install build deps; set CIBW environment variables - if: ${{ matrix.cibw_python }} == "cp313t" - run: | - PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" - CIBW_DEPS="pip install --pre -i $PYPI_URL cython &&\ - pip install numpy pytest meson-python ninja" - NO_BUILD_ISOLATION="pip; args: --no-build-isolation" - echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" - - name: Build wheels for CPython (macOS) (x86_64) if: matrix.cibw_arch == 'x86_64' uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 @@ -147,6 +123,7 @@ jobs: env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} + CIBW_ENABLE: cpython-freethreading - name: Build wheels for CPython (macOS) (arm64) if: matrix.cibw_arch == 'arm64' @@ -172,7 +149,7 @@ jobs: matrix: os: [windows-latest] cibw_arch: ["AMD64", "x86"] - cibw_python: ["cp311", "cp312", "cp313", "cp313t"] + cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -195,18 +172,6 @@ jobs: with: architecture: x64 - - name: Install build deps; set CIBW environment variables - if: ${{ matrix.cibw_python }} == "cp313t" - shell: bash -el {0} - run: | - PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" - CIBW_DEPS="pip install --pre -i $PYPI_URL cython numpy &&\ - pip install pytest meson-python ninja" - NO_BUILD_ISOLATION="pip; args: --no-build-isolation" - echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV" - echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" - - name: Build Windows wheels for CPython uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 with: From 3f456b43e645be7e30dc7a65832251c6552c1ad4 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Jul 2025 19:52:30 +0200 Subject: [PATCH 05/14] DOC: fix typo in a wavelet name (#812) Closes gh-799 [skip ci] --- doc/source/ref/cwt.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/ref/cwt.rst b/doc/source/ref/cwt.rst index 292c3c54..88985a94 100644 --- a/doc/source/ref/cwt.rst +++ b/doc/source/ref/cwt.rst @@ -167,7 +167,7 @@ where :math:`B` is the bandwidth and :math:`C` is the center frequency. Frequency B-Spline Wavelets ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The frequency B-spline wavelets (``"fpspM-B-C"`` with integer M and floating +The frequency B-spline wavelets (``"fbspM-B-C"`` with integer M and floating point B, C) correspond to the following wavelets: .. math:: From 6c84e231d4e64d91eda8be17ac324b8ade33d6fa Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sat, 26 Oct 2024 04:33:59 +0200 Subject: [PATCH 06/14] DOC: update copyright end date in license file --- LICENSE | 2 +- pywt/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 0f67833e..d61b491b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2006-2012 Filip Wasilewski -Copyright (c) 2012-2020 The PyWavelets Developers +Copyright (c) 2012- The PyWavelets Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/pywt/__init__.py b/pywt/__init__.py index 2916bb0d..669b06b6 100644 --- a/pywt/__init__.py +++ b/pywt/__init__.py @@ -1,7 +1,7 @@ # flake8: noqa # Copyright (c) 2006-2012 Filip Wasilewski -# Copyright (c) 2012-2020 The PyWavelets Developers +# Copyright (c) 2012- The PyWavelets Developers # # See LICENSE for more details. From 2e16d286d7aefef9aa481122f1b137e11c1eebd5 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sat, 26 Oct 2024 05:03:11 +0200 Subject: [PATCH 07/14] BLD: require meson-python >=0.18.0 for PEP 639 support --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1de84bfb..c93dcf6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ [build-system] build-backend = "mesonpy" requires = [ - "meson-python>=0.16.0", + "meson-python>=0.18.0", "Cython>=3.0.4", # numpy requirement for wheel builds for distribution on PyPI - building From 546d6c04c62c0b22f35fd006bb4700f86b9e70b0 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sat, 26 Oct 2024 04:34:25 +0200 Subject: [PATCH 08/14] MAINT: update license metadata to use PEP 639 style license and SPDX expression Treat license files for vendored code correctly by including the full text of NumPy and SciPy license files, as required by the BSD licenses of those projects. --- LICENSES_bundled.txt | 10 ---------- licenses_bundled/LICENSE_numpy.txt | 30 ++++++++++++++++++++++++++++++ licenses_bundled/LICENSE_scipy.txt | 30 ++++++++++++++++++++++++++++++ licenses_bundled/README.txt | 12 ++++++++++++ pyproject.toml | 9 +++++---- 5 files changed, 77 insertions(+), 14 deletions(-) delete mode 100644 LICENSES_bundled.txt create mode 100644 licenses_bundled/LICENSE_numpy.txt create mode 100644 licenses_bundled/LICENSE_scipy.txt create mode 100644 licenses_bundled/README.txt diff --git a/LICENSES_bundled.txt b/LICENSES_bundled.txt deleted file mode 100644 index c016032a..00000000 --- a/LICENSES_bundled.txt +++ /dev/null @@ -1,10 +0,0 @@ -The PyWavelets repository and source distributions bundle some code that is -adapted from compatibly licensed projects. We list these here. - -Name: NumPy -Files: pywt/_pytesttester.py -License: 3-clause BSD - -Name: SciPy -Files: meson.build, util/* -License: 3-clause BSD diff --git a/licenses_bundled/LICENSE_numpy.txt b/licenses_bundled/LICENSE_numpy.txt new file mode 100644 index 00000000..6ccec682 --- /dev/null +++ b/licenses_bundled/LICENSE_numpy.txt @@ -0,0 +1,30 @@ +Copyright (c) 2005-2024, NumPy Developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the NumPy Developers nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses_bundled/LICENSE_scipy.txt b/licenses_bundled/LICENSE_scipy.txt new file mode 100644 index 00000000..11711761 --- /dev/null +++ b/licenses_bundled/LICENSE_scipy.txt @@ -0,0 +1,30 @@ +Copyright (c) 2001-2002 Enthought, Inc. 2003-2024, SciPy Developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses_bundled/README.txt b/licenses_bundled/README.txt new file mode 100644 index 00000000..ce889ac7 --- /dev/null +++ b/licenses_bundled/README.txt @@ -0,0 +1,12 @@ +The PyWavelets repository and source distributions bundle some code that is +adapted from compatibly licensed projects. We list these here, together with +the path to the files (relative to the root of the repository or sdist) +identifying the vendored code that required including a license file. + +Name: NumPy +Files: pywt/_pytesttester.py +License: BSD-3-Clause + +Name: SciPy +Files: meson.build, util/* +License: BSD-3-Clause diff --git a/pyproject.toml b/pyproject.toml index c93dcf6b..50530d5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,11 @@ requires = [ [project] name = "PyWavelets" version = "1.9.0.dev0" -# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88) -# at that point, no longer include them in `py3.install_sources()` -license = {file = "LICENSE"} +license = "MIT and BSD-3-Clause" +license-files = [ + "LICENSE", + "licenses_bundled/LICENSE_*", +] maintainers = [ {name = "The PyWavelets Developers", email = "pywavelets@googlegroups.com"} ] @@ -38,7 +40,6 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python", From 576a8f1e7bf02519ce455a802c881b5491635c5f Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Jul 2025 20:52:30 +0200 Subject: [PATCH 09/14] MAINT: minor tweak to build requirement for Python 3.14 Also add PyPI classifier for 3.14 --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 50530d5a..3b81d6ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ requires = [ # disabling build isolation. "numpy>=2.0.0; python_version<'3.13'", "numpy>=2.1.0; python_version>='3.13'", + "numpy>=2.3.2; python_version>='3.14'", ] [project] @@ -47,6 +48,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries :: Python Modules" ] From 6ddffce608ecdf0b59c4c3016c50673b7407c09a Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Jul 2025 21:47:04 +0200 Subject: [PATCH 10/14] Merge pull request #813 from rgommers/ci-cleanup CI: clean up free-threading job, and pin actions in tests.yml --- .github/workflows/tests.yml | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33949a38..8a495b05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,11 +62,8 @@ jobs: python-version: "3.13" OPTIONS_NAME: "editable-install" steps: - - name: Checkout PyWavelets - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: python-version: ${{ matrix.python-version}} allow-prereleases: true @@ -142,33 +139,19 @@ jobs: test_pywavelets_linux_free_threaded: name: linux-cp313t-default runs-on: ubuntu-latest - strategy: - # Ensure that a wheel builder finishes even if another fails - fail-fast: false - steps: - - name: Checkout PyWavelets - uses: actions/checkout@v4 - - # TODO: replace with setup-python when there is support - - uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: - python-version: "3.13-dev" - nogil: true + python-version: "3.13t" - name: Build package run: | - which python - python --version pip install --upgrade pip build - # We need nightly wheels for free-threaded support and latest fixes - pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython numpy - pip install pytest meson-python ninja + pip install cython numpy meson-python ninja pytest pip install . -v --no-build-isolation - name: Run tests - env: - PYTHON_GIL: 0 run: | # Move out of source directory to avoid finding local pywt cd demo @@ -196,11 +179,8 @@ jobs: OPTIONS_NAME: "pre-releases" steps: - - name: Checkout PyWavelets - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: python-version: ${{ matrix.python-version}} allow-prereleases: true From a30ff33560cd51f36934ab81b473392e653b1d6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 00:32:39 +0000 Subject: [PATCH 11/14] Bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `pypa/cibuildwheel` from 3.1.0 to 3.1.2 - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](https://github.com/pypa/cibuildwheel/compare/ffd835cef18fa11522f608fc0fa973b89f5ddc87...9e4e50bd76b3190f55304387e333f6234823ea9b) Updates `softprops/action-gh-release` from 2.2.2 to 2.3.2 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/da05d552573ad5aba039eaac05058a918a7bf631...72f2c25fcb47643c292f7107632f7a47c1df5cd8) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-version: 3.1.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-version: 2.3.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/emscripten.yml | 2 +- .github/workflows/wheel_tests_and_release.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index a01a4a04..a187295b 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Build and test PyWavelets - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 env: CIBW_PLATFORM: pyodide CIBW_TEST_REQUIRES: pytest matplotlib diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index 5f697e6f..792552f9 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -46,7 +46,7 @@ jobs: python-version: "3.12" - name: Build the wheel - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 with: output-dir: dist env: @@ -78,7 +78,7 @@ jobs: python-version: "3.12" - name: Build the wheel - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 with: output-dir: dist env: @@ -117,7 +117,7 @@ jobs: - name: Build wheels for CPython (macOS) (x86_64) if: matrix.cibw_arch == 'x86_64' - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 with: output-dir: dist env: @@ -127,7 +127,7 @@ jobs: - name: Build wheels for CPython (macOS) (arm64) if: matrix.cibw_arch == 'arm64' - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 with: output-dir: dist env: @@ -173,7 +173,7 @@ jobs: architecture: x64 - name: Build Windows wheels for CPython - uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0 + uses: pypa/cibuildwheel@9e4e50bd76b3190f55304387e333f6234823ea9b # v3.1.2 with: output-dir: dist env: @@ -236,7 +236,7 @@ jobs: TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} - name: Github release - uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2 + uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} From 7f4f74aaac4f97720a36d523d3a2bc3cc93b9b96 Mon Sep 17 00:00:00 2001 From: John Muradeli Date: Sun, 3 Aug 2025 17:14:32 +0000 Subject: [PATCH 12/14] DOC: `cwt`: log `scales` in docstring example (#802) --- pywt/_cwt.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 0d69095b..8158caca 100644 --- a/pywt/_cwt.py +++ b/pywt/_cwt.py @@ -81,9 +81,10 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): >>> import pywt >>> import numpy as np >>> import matplotlib.pyplot as plt - >>> x = np.arange(512) - >>> y = np.sin(2*np.pi*x/32) - >>> coef, freqs=pywt.cwt(y,np.arange(1,129),'gaus1') + >>> x = np.exp(np.linspace(0, 2, 512)) + >>> y = np.cos(2*np.pi*x) # exponential chirp + >>> scales = np.logspace(np.log10(1), np.log10(128), 128) + >>> coef, freqs = pywt.cwt(y, scales, 'gaus1') >>> plt.matshow(coef) >>> plt.show() @@ -92,7 +93,7 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): >>> import matplotlib.pyplot as plt >>> t = np.linspace(-1, 1, 200, endpoint=False) >>> sig = np.cos(2 * np.pi * 7 * t) + np.real(np.exp(-7*(t-0.4)**2)*np.exp(1j*2*np.pi*2*(t-0.4))) - >>> widths = np.arange(1, 31) + >>> widths = np.logspace(np.log10(1), np.log10(30), 30) >>> cwtmatr, freqs = pywt.cwt(sig, widths, 'mexh') >>> plt.imshow(cwtmatr, extent=[-1, 1, 1, 31], cmap='PRGn', aspect='auto', ... vmax=abs(cwtmatr).max(), vmin=-abs(cwtmatr).max()) From 4122c7cedb3cf7eed3bf7d8fde94ac7bf0cc047f Mon Sep 17 00:00:00 2001 From: John Muradeli Date: Sun, 3 Aug 2025 19:02:02 +0000 Subject: [PATCH 13/14] ENH: allow user to set `precision` in CWT, increase default to 12 (#570) Co-authored-by: Ralf Gommers --- pywt/_cwt.py | 13 +++++++++---- pywt/tests/test_matlab_compatibility_cwt.py | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 8158caca..91cde0f6 100644 --- a/pywt/_cwt.py +++ b/pywt/_cwt.py @@ -24,10 +24,9 @@ def next_fast_len(n): return 2**ceil(np.log2(n)) -def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): +def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1, + *, precision=12): """ - cwt(data, scales, wavelet) - One dimensional Continuous Wavelet Transform. Parameters @@ -60,6 +59,12 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): axis: int, optional Axis over which to compute the CWT. If not given, the last axis is used. + precision: int, optional + Length of wavelet (``2 ** precision``) used to compute the CWT. Greater + will increase resolution, especially for higher scales, but will + compute a bit slower. Too low will distort coefficients and their + norms, with a zipper-like effect. The default is 12, it's recommended + to use >=12. Returns ------- @@ -116,7 +121,7 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): dt_out = dt_cplx if wavelet.complex_cwt else dt out = np.empty((np.size(scales),) + data.shape, dtype=dt_out) - precision = 10 + int_psi, x = integrate_wavelet(wavelet, precision=precision) int_psi = np.conj(int_psi) if wavelet.complex_cwt else int_psi diff --git a/pywt/tests/test_matlab_compatibility_cwt.py b/pywt/tests/test_matlab_compatibility_cwt.py index 21d37c0a..7819c50f 100644 --- a/pywt/tests/test_matlab_compatibility_cwt.py +++ b/pywt/tests/test_matlab_compatibility_cwt.py @@ -149,7 +149,7 @@ def _load_matlab_result_psi(wavelet): def _check_accuracy(data, w, scales, coefs, wavelet, epsilon): # PyWavelets result - coefs_pywt, freq = pywt.cwt(data, scales, w) + coefs_pywt, freq = pywt.cwt(data, scales, w, precision=10) # coefs from Matlab are from R2012a which is missing the complex conjugate # as shown in Eq. 2 of Torrence and Compo. We take the complex conjugate of From ee0e24b9dfee2dafdc0bec7919bdf8544a85ba00 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 3 Aug 2025 21:20:19 +0200 Subject: [PATCH 14/14] CI: test Python 3.14 and 3.14t in regular CI jobs (#815) Follows up on gh-811, which added cp314/cp314t wheel builds. The `-dev` is still needed for `actions/setup-python` until after the final 3.14.0 release. --- .github/workflows/tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a495b05..32e8a492 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,7 +51,7 @@ jobs: - runs-on: ubuntu-latest python-version: "3.11" - runs-on: ubuntu-latest - python-version: "3.11" + python-version: "3.14-dev" USE_SDIST: 1 OPTIONS_NAME: "install-from-sdist" - runs-on: ubuntu-latest @@ -137,13 +137,17 @@ jobs: popd test_pywavelets_linux_free_threaded: - name: linux-cp313t-default + name: linux-cp${{ matrix.python-version }}-default runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.13t", "3.14t-dev"] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: - python-version: "3.13t" + python-version: ${{ matrix.python-version}} - name: Build package run: |