From 9b5936869e607ceb982ec3f36a879679968e570e Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 20 Mar 2025 16:22:24 -0700 Subject: [PATCH] Raise minimum requirements --- .github/workflows/build_wheels.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/run-tests.yml | 8 ++++---- .pre-commit-config.yaml | 22 +++++++++++----------- pyproject.toml | 27 +++++++++++++-------------- requirements_dev.txt | 3 +-- requirements_min.txt | 26 +++++++++++++------------- tools/build_manylinux2014.cmd | 2 +- tools/build_manylinux2014.sh | 2 +- tutorials/phasorpy_introduction.py | 5 ++++- 10 files changed, 50 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index dceb70ce..54ae2488 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -28,7 +28,7 @@ jobs: # uses: docker/setup-qemu-action@v3 # with: # platforms: all - - uses: pypa/cibuildwheel@v2.23.0 + - uses: pypa/cibuildwheel@v2.23.1 env: # Building and testing manylinux2014_aarch64 too is slow. # See https://github.com/phasorpy/phasorpy/pull/135 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6ff1db81..b58e190a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.13"] + python-version: ["3.11", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2282b579..c6b09048 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-20.04"] - python-version: ["3.10", "3.12"] + python-version: ["3.12", "3.13"] # 3.11 tested with cibuildwheel steps: - uses: actions/checkout@v4 @@ -56,7 +56,7 @@ jobs: fail-fast: false matrix: os: ["windows-2019", "macos-13"] - python-version: ["3.10"] + python-version: ["3.11"] # 3.12 tested with cibuildwheel steps: - uses: actions/checkout@v4 @@ -87,7 +87,7 @@ jobs: os: ["ubuntu-22.04", "windows-2019", "macos-13"] steps: - uses: actions/checkout@v4 - - uses: pypa/cibuildwheel@v2.23.0 + - uses: pypa/cibuildwheel@v2.23.1 env: # CIBW_ENVIRONMENT: "PIP_PRE=1" CIBW_BUILD_VERBOSITY: 3 @@ -115,7 +115,7 @@ jobs: # uses: docker/setup-qemu-action@v3 # with: # platforms: all - # - uses: pypa/cibuildwheel@v2.23.0 + # - uses: pypa/cibuildwheel@v2.23.1 # env: # CIBW_ARCHS_LINUX: aarch64 # CIBW_BUILD_VERBOSITY: 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0ef7f5d..51a7e7cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -32,7 +32,7 @@ repos: - id: python-use-type-annotations - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell @@ -43,7 +43,7 @@ repos: args: [] - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.3.3 + rev: v3.5.3 hooks: - id: prettier args: [--end-of-line=auto] @@ -55,18 +55,18 @@ repos: - id: autoflake - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.19.1 hooks: - id: pyupgrade - args: [--py310-plus, --keep-runtime-typing] + args: [--py311-plus, --keep-runtime-typing] - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 25.1.0 hooks: - id: black @@ -74,23 +74,23 @@ repos: rev: v0.3.9 hooks: - id: blackdoc - additional_dependencies: ["black==24.8.0"] + additional_dependencies: ["black==25.1.0"] - id: blackdoc-autoupdate-black # - repo: https://github.com/PyCQA/flake8 -# rev: 7.1.1 +# rev: 7.1.2 # hooks: # - id: flake8 # additional_dependencies: [flake8-typing-imports, flake8-docstrings] # - repo: https://github.com/astral-sh/ruff-pre-commit -# rev: v0.6.4 +# rev: v0.11.1 # hooks: # - id: ruff # args: [--show-fixes] # - repo: https://github.com/pre-commit/mirrors-mypy -# rev: v1.11.1 +# rev: v1.15.0 # hooks: # - id: mypy # files: src diff --git a/pyproject.toml b/pyproject.toml index f1fa7243..705e1344 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,36 +14,36 @@ dynamic = ["version"] dependencies = [ # sync with requirements_min.txt # https://scientific-python.org/specs/spec-0000/ - "numpy>=1.24.0", - "matplotlib>=3.7.0", + "numpy>=1.25.0", + "matplotlib>=3.8.0", "scipy>=1.11.0", "click", "pooch", "tqdm", - # "scikit-image>=0.20.0", - # "scikit-learn>=1.2.2", - # "pandas>=2.0.0", + "scikit-learn>=1.3.0", + # "scikit-image>=0.21.0", + # "pandas>=2.1.0", "xarray>=2023.4.0", "tifffile>=2024.8.30", ] -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] authors = [{ name = "PhasorPy Contributors" }] -license = { text = "MIT" } +license = "MIT" +license-files = ["LICENSE.txt"] [project.urls] Homepage = "https://www.phasorpy.org" @@ -84,7 +84,6 @@ all = [ [tool.setuptools] package-dir = { "" = "src" } packages = ["phasorpy"] -license-files = ["LICENSE.txt"] zip-safe = false [tool.setuptools.dynamic] @@ -124,7 +123,7 @@ disable = [ [tool.black] line-length = 79 -target-version = ["py310"] +target-version = ["py311"] skip-string-normalization = true [tool.isort] @@ -144,7 +143,7 @@ strict = true warn_unreachable = true [[tool.mypy.overrides]] -module = ["phasorpy._phasorpy", "pooch.*", "scipy.*", "mkl_fft.*"] +module = ["phasorpy._phasorpy", "pooch.*", "scipy.*", "mkl_fft.*", "sklearn.*"] ignore_missing_imports = true [tool.coverage.run] @@ -188,6 +187,6 @@ norecursedirs = [ ] [tool.cibuildwheel] -skip = "pp* cp37* cp38* cp39* *musllinux* *i686 *ppc64le *s390x cp39*win*arm64 cp310*win*arm64" -test-requires = ["lfdfiles", "sdtfile", "ptufile", "liffile", "pawflim", "pytest", "pytest-cov", "pytest-runner", "pytest-doctestplus", "coverage"] +skip = "pp* cp37* cp38* cp39* cp310* *musllinux* *i686 *ppc64le *s390x cp39*win*arm64" +test-requires = ["scikit-learn", "lfdfiles", "sdtfile", "ptufile", "liffile", "pawflim", "pytest", "pytest-cov", "pytest-runner", "pytest-doctestplus", "coverage"] test-command = "pytest {project}/tests" diff --git a/requirements_dev.txt b/requirements_dev.txt index 146fea7e..c9a9db08 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -40,7 +40,6 @@ pytest-runner pytest-doctestplus # # tools requirements -tomli; python_version < "3.11" black blackdoc flake8 @@ -55,11 +54,11 @@ pre-commit-hooks # # optional requirements # scikit-image -# scikit-learn # pandas # zarr # fsspec # bioio +scikit-learn lfdfiles sdtfile ptufile diff --git a/requirements_min.txt b/requirements_min.txt index c810fb3a..60beb4a5 100644 --- a/requirements_min.txt +++ b/requirements_min.txt @@ -1,15 +1,15 @@ # Minimum version requirements for the PhasorPy library # -numpy==1.24.4; python_version == "3.10" -matplotlib==3.7.5; python_version == "3.10" -pandas==2.0.3; python_version == "3.10" -scipy==1.11.4; python_version == "3.10" -scikit-image==0.20.0; python_version == "3.10" -# scikit-learn==1.2.2; python_version == "3.10" -xarray==2023.4.0; python_version == "3.10" -tifffile==2024.8.30; python_version == "3.10" -lfdfiles==2024.5.24; python_version == "3.10" -sdtfile==2024.5.24; python_version == "3.10" -ptufile==2024.9.14; python_version == "3.10" -liffile==2025.2.10; python_version == "3.10" -pawflim==1.0.4; python_version == "3.10" +numpy==1.25.2; python_version == "3.11" +matplotlib==3.8.4; python_version == "3.11" +pandas==2.1.4; python_version == "3.11" +scipy==1.11.4; python_version == "3.11" +scikit-image==0.21.0; python_version == "3.11" +scikit-learn==1.3.2; python_version == "3.11" +xarray==2023.4.0; python_version == "3.11" +tifffile==2024.8.30; python_version == "3.11" +lfdfiles==2024.5.24; python_version == "3.11" +sdtfile==2024.5.24; python_version == "3.11" +ptufile==2024.9.14; python_version == "3.11" +liffile==2025.2.10; python_version == "3.11" +pawflim==1.0.4; python_version == "3.11" diff --git a/tools/build_manylinux2014.cmd b/tools/build_manylinux2014.cmd index 1ab2ba1e..2cb74ec2 100644 --- a/tools/build_manylinux2014.cmd +++ b/tools/build_manylinux2014.cmd @@ -3,7 +3,7 @@ setlocal set PATH=C:\Windows;C:\Windows\System32;C:\Program Files\Docker\Docker\resources\bin set CIBW_ARCHS_LINUX=auto -set CIBW_SKIP=pp* cp37* cp38* cp39* *musllinux* +set CIBW_SKIP=pp* cp37* cp38* cp39* cp310* *musllinux* :: set CIBW_TEST_SKIP=* set CIBW_TEST_COMMAND=python -m pytest {project}/tests set CIBW_BUILD_VERBOSITY=3 diff --git a/tools/build_manylinux2014.sh b/tools/build_manylinux2014.sh index dd1e11b1..418bce22 100644 --- a/tools/build_manylinux2014.sh +++ b/tools/build_manylinux2014.sh @@ -1,7 +1,7 @@ # Build PhasorPy manylinux2014 wheels on Linux or macOS using Docker export CIBW_ARCHS_LINUX=auto -export CIBW_SKIP="pp* cp37* cp38* cp39* *musllinux*" +export CIBW_SKIP="pp* cp37* cp38* cp39* cp310* *musllinux*" # export CIBW_TEST_SKIP="*" export CIBW_TEST_COMMAND="pytest {project}/tests" export CIBW_BUILD_VERBOSITY=3 diff --git a/tutorials/phasorpy_introduction.py b/tutorials/phasorpy_introduction.py index 277aae28..1942ac00 100644 --- a/tutorials/phasorpy_introduction.py +++ b/tutorials/phasorpy_introduction.py @@ -16,12 +16,15 @@ # Install Python # -------------- # -# An installation of Python version 3.10 or higher is required to use the +# An installation of Python version 3.11 or higher is required to use the # PhasorPy library. # Python is an easy to learn, powerful programming language. # Python installers can be obtained from, for example, # `Python.org `_ or # `Anaconda.com `_. +# Alternatively, Python can be used via +# `Google Colab `_, +# a free, cloud-based service. # Refer to the `Python Tutorial `_ # for an introduction to Python. #