diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ff2fa627e81..0d751bececf 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -41,7 +41,7 @@ jobs: - [macos-13, macosx_*, x86_64] - [windows-2022, win_amd64, AMD64] - [macos-14, macosx_*, arm64] - python: ["cp310", "cp311", "cp312", "cp313"] + python: ["cp311", "cp312", "cp313", "cp314"] defaults: run: working-directory: ./package @@ -51,7 +51,7 @@ jobs: fetch-depth: 0 - name: Build wheels - uses: pypa/cibuildwheel@v2.23.0 + uses: pypa/cibuildwheel@v3.2.0 with: package-dir: package env: @@ -246,14 +246,13 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14"] type: ["FULL", "MIN"] exclude: # Multiple deps don't like windows - os: windows-latest type: "FULL" - # Chemfiles won't install over py3.13 - - python-version: "3.13" + - python-version: "3.14" type: "FULL" env: MPLBACKEND: agg diff --git a/.github/workflows/gh-ci-cron.yaml b/.github/workflows/gh-ci-cron.yaml index d1f64ced2a4..395b571e632 100644 --- a/.github/workflows/gh-ci-cron.yaml +++ b/.github/workflows/gh-ci-cron.yaml @@ -6,8 +6,8 @@ on: workflow_dispatch: # Uncomment when you need to test on a PR # pull_request: - # branches: - # - develop + # branches: + # - develop concurrency: @@ -107,7 +107,6 @@ jobs: pip condarc: | channels: - - jaimergp/label/unsupported-cudatoolkit-shim - conda-forge - bioconda @@ -141,7 +140,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-13] + os: [ubuntu-22.04, macos-13] steps: - uses: actions/checkout@v4 @@ -156,11 +155,10 @@ jobs: with: environment-name: mda create-args: >- - python=3.10 + python=3.11 pip condarc: | channels: - - jaimergp/label/unsupported-cudatoolkit-shim - conda-forge - bioconda @@ -190,7 +188,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 @@ -233,10 +231,8 @@ jobs: matrix: # Stick to macos-13 because some of our # optional deps don't support arm64 (i.e. macos-14) - # - # add "3.13" once conda-forge packages are available (see #4805) os: [ubuntu-latest, macos-13] - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -252,10 +248,8 @@ jobs: create-args: >- python=${{ matrix.python-version }} pip - # using jaime's shim to avoid pulling down the cudatoolkit condarc: | channels: - - jaimergp/label/unsupported-cudatoolkit-shim - conda-forge - bioconda @@ -298,15 +292,21 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: install_deps + shell: bash + run: | + pip install pytest-xdist pytest-timeout "numpy<2.3" "cython<3.1" wheel "setuptools>=40.9.0" packaging + - name: install_mdanalysis shell: bash run: | # If wheels is False we build directly from source so we use the --no-binary flag # to avoid pulling down wheels for MDAnalysis (which are already precompiled) + # Also need to add `--no-build-isolation` until next release, see Issue #5125 if [ "${{ matrix.wheels }}" == "false" ]; then - INSTALL_FLAGS="-vvv --no-binary" + INSTALL_FLAGS="--no-build-isolation --no-binary" fi - pip install ${INSTALL_FLAGS} mdanalysis mdanalysistests pytest-xdist pytest-timeout + pip install ${INSTALL_FLAGS} mdanalysis mdanalysistests - name: run_tests shell: bash diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index 549624278f4..f63bf1e04be 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -28,29 +28,43 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, ] - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] full-deps: [true, ] codecov: [true, ] + cython: ["cython<3.1", ] include: - - name: python_313 + # Including 3.14 and 3.11 without coverage + # and cython >=3.1 to deal temporarily with + # keeping on testing Cython whilst issue #5057 + # is not fixed + - name: python_314_nocov os: ubuntu-latest - python-version: "3.13" + python-version: "3.14" full-deps: false - codecov: true - - name: macOS_14_arm64_py312 + codecov: false + cython: "cython>=3.1" + - name: python_311_nocov + os: ubuntu-latest + python-version: "3.11" + full-deps: false + codecov: false + cython: "cython>=3.1" + - name: macOS_14_arm64_py313 os: macOS-14 - python-version: "3.12" + python-version: "3.13" full-deps: false codecov: true + cython: "cython<3.1" - name: numpy_min os: ubuntu-latest - python-version: "3.10" + python-version: "3.11" full-deps: false codecov: true - numpy: numpy=1.23.2 + numpy: numpy=1.26.0 + cython: "cython<3.1" - name: asv_check os: ubuntu-latest - python-version: "3.10" + python-version: "3.11" full-deps: true codecov: false extra-pip-deps: asv @@ -88,7 +102,7 @@ jobs: # disable GSD because it occasionally introduce hanging in testing #4209 gsd: '' # pin cython - cython: 'cython<3.1' + cython: ${{ matrix.cython }} # in most cases will just default to empty, i.e. pick up max version from other deps numpy: ${{ matrix.numpy }} extra-pip-deps: ${{ matrix.extra-pip-deps }} @@ -151,12 +165,11 @@ jobs: with: environment-name: mda create-args: >- - python=3.10 + python=3.11 pip # using jaime's shim to avoid pulling down the cudatoolkit condarc: | channels: - - jaimergp/label/unsupported-cudatoolkit-shim - conda-forge - bioconda diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index f8b24dcd091..118ced31f3b 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - uses: psf/black@stable with: @@ -55,7 +55,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: install run: | @@ -80,12 +80,10 @@ jobs: with: environment-name: mda create-args: >- - python=3.10 + python=3.11 pip - # using jaime's shim to avoid pulling down the cudatoolkit condarc: | channels: - - jaimergp/label/unsupported-cudatoolkit-shim - conda-forge - bioconda @@ -94,7 +92,7 @@ jobs: with: micromamba: true full-deps: true - numpy: numpy=1.23.2 + numpy: numpy=1.26.0 rdkit: rdkit=2023.09.3 - name: install diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e3a65315c2b..1775bc3592b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,39 +21,39 @@ jobs: MPLBACKEND: agg strategy: matrix: - Win-Python310-64bit-full: - PYTHON_VERSION: '3.10' + Win-Python311-64bit-full: + PYTHON_VERSION: '3.11' PYTHON_ARCH: 'x64' BUILD_TYPE: 'normal' imageName: 'windows-2019' - Win-Python312-64bit-full: - PYTHON_VERSION: '3.12' + Win-Python313-64bit-full: + PYTHON_VERSION: '3.13' PYTHON_ARCH: 'x64' BUILD_TYPE: 'normal' imageName: 'windows-2019' - Win-Python312-64bit-full-wheel: - PYTHON_VERSION: '3.12' + Win-Python313-64bit-full-wheel: + PYTHON_VERSION: '3.13' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.26.0' + NUMPY_MIN: '2.1.0' imageName: 'windows-2019' - Win-Python310-64bit-full-wheel: - PYTHON_VERSION: '3.10' + Win-Python311-64bit-full-wheel: + PYTHON_VERSION: '3.11' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.23.2' + NUMPY_MIN: '1.26.0' imageName: 'windows-2019' - Linux-Python312-64bit-full-wheel: - PYTHON_VERSION: '3.12' + Linux-Python313-64bit-full-wheel: + PYTHON_VERSION: '3.13' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' NUMPY_MIN: '2.1.0' imageName: 'ubuntu-latest' - Linux-Python310-64bit-full-wheel: - PYTHON_VERSION: '3.10' + Linux-Python311-64bit-full-wheel: + PYTHON_VERSION: '3.11' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.23.2' + NUMPY_MIN: '1.26.0' imageName: 'ubuntu-latest' pool: vmImage: $(imageName) @@ -100,6 +100,8 @@ jobs: python -m pip install numpy==$(NUMPY_MIN) displayName: 'pin to older NumPy (wheel test)' condition: and(succeeded(), ne(variables['NUMPY_MIN'], '')) + # Disabled PyTNG checking, see issue #5123 + # TODO: add pytng>=0.2.3 back once resolved - script: >- python -m pip install -vvv biopython @@ -110,7 +112,6 @@ jobs: mmtf-python networkx parmed - pytng>=0.2.3 rdkit>=2024.03.4 tidynamics>=1.0.0 imdclient>=0.2.2 diff --git a/maintainer/conda/environment.yml b/maintainer/conda/environment.yml index 7b69149302c..e20ad6de080 100644 --- a/maintainer/conda/environment.yml +++ b/maintainer/conda/environment.yml @@ -17,9 +17,9 @@ dependencies: - mmtf-python - mock - networkx - - numpy>=1.23.2 + - numpy>=1.26.0 - pytest - - python==3.10 + - python==3.11 - pytng>=0.2.3 - scikit-learn - scipy diff --git a/package/CHANGELOG b/package/CHANGELOG index 01af33d6de7..e148f78323e 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -42,6 +42,7 @@ Fixes directly passing them. (Issue #3520, PR #5006) Enhancements + * Support for Python 3.14 was added (PR #5121). * Added support for reading and processing streamed data in `coordinates.base` with new `StreamFrameIteratorSliced` and `StreamReaderBase` (Issue #4827, PR #4923) * New coordinate reader: Added `IMDReader` for reading real-time streamed @@ -80,6 +81,7 @@ Enhancements Changes + * Support for Python 3.10 was removed, in line with SPEC0 (PR #5121). * Refactored the RDKit converter code to move the inferring code in a separate `RDKitInferring` module. The bond order and charges inferrer has been move to an `MDAnalysisInferrer` dataclass in there. (PR #4305) diff --git a/package/pyproject.toml b/package/pyproject.toml index bb9d9d48929..3dc32092fcb 100644 --- a/package/pyproject.toml +++ b/package/pyproject.toml @@ -1,7 +1,7 @@ [build-system] # Minimum requirements for the build system to execute requires = [ - "Cython>=0.28,<3.1", + "Cython>=0.28", "packaging", # numpy requirement for wheel builds for distribution on PyPI - building # against 2.x yields wheels that are also compatible with numpy 1.x at @@ -27,9 +27,9 @@ authors = [ maintainers = [ {name = 'MDAnalysis Core Developers', email = 'mdanalysis@numfocus.org'} ] -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ - 'numpy>=1.23.2', + 'numpy>=1.26.0', 'GridDataFormats>=0.4.0', 'mmtf-python>=1.0.0', 'joblib>=0.12', @@ -55,10 +55,10 @@ classifiers = [ 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Programming Language :: C', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Bio-Informatics', @@ -126,7 +126,7 @@ MDAnalysis = [ [tool.black] line-length = 79 -target-version = ['py310', 'py311', 'py312', 'py313'] +target-version = ['py311', 'py312', 'py313'] extend-exclude = ''' ( __pycache__ diff --git a/testsuite/MDAnalysisTests/analysis/test_helix_analysis.py b/testsuite/MDAnalysisTests/analysis/test_helix_analysis.py index 3a291050d46..e8e50717a24 100644 --- a/testsuite/MDAnalysisTests/analysis/test_helix_analysis.py +++ b/testsuite/MDAnalysisTests/analysis/test_helix_analysis.py @@ -508,16 +508,13 @@ def test_multiple_atoms_per_residues(self): def test_residue_gaps_split(self, psf_ca): sel = "resid 6:50 or resid 100:130 or resid 132:148" - with pytest.warns(UserWarning) as rec: + wmsg = "has gaps in the residues. Splitting into 3 helices" + with pytest.warns(UserWarning, match=wmsg): ha = hel.HELANAL(psf_ca, select=sel).run() assert len(ha.atomgroups) == 3 assert len(ha.atomgroups[0]) == 45 assert len(ha.atomgroups[1]) == 31 assert len(ha.atomgroups[2]) == 17 - assert len(rec) == 1 - warnmsg = rec[0].message.args[0] - assert "has gaps in the residues" in warnmsg - assert "Splitting into 3 helices" in warnmsg def test_residue_gaps_no_split(self, psf_ca): sel = "resid 6:50 or resid 100:130 or resid 132:148" diff --git a/testsuite/pyproject.toml b/testsuite/pyproject.toml index 5e5cf5fe30f..bc0b236535a 100644 --- a/testsuite/pyproject.toml +++ b/testsuite/pyproject.toml @@ -24,10 +24,10 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: C", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", @@ -35,7 +35,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] readme = {file = "README", content-type = "text/x-rst"} -requires-python = ">=3.10" +requires-python = ">=3.11" dynamic = ["version", "dependencies"] [project.urls] @@ -156,7 +156,7 @@ filterwarnings = [ [tool.black] line-length = 79 -target-version = ['py310', 'py311', 'py312', 'py313'] +target-version = ['py311', 'py312', 'py313'] extend-exclude = ''' ( testsuite/MDAnalysisTests/datafiles\.py