From 10b0a917ad7ab2177b6bcc2e2967fa7e6ad5a06f Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Fri, 9 Dec 2022 12:05:18 +0000 Subject: [PATCH] bump up azure and gh CI to py3.11 (#3903) Towards #3878 * bump up gh CI to py311 * Add rdkit to azure pipelines * Fix cibuildwheels to add py311 * bump up windows minimum numpy version * Add 3.11 to testpypi checks --- .github/workflows/deploy.yaml | 13 ++++++++----- .github/workflows/gh-ci.yaml | 8 +++++++- azure-pipelines.yml | 16 ++++++++-------- package/CHANGELOG | 2 ++ package/pyproject.toml | 6 ++++-- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 41b60512e4e..6c6ccab2ff0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -33,10 +33,10 @@ jobs: fail-fast: false matrix: buildplat: - - [ubuntu-18.04, manylinux_x86_64] - - [macos-10.15, macosx_*] + - [ubuntu-20.04, manylinux_x86_64] + - [macos-11, macosx_*] - [windows-2019, win_amd64] - python: ["cp38", "cp39", "cp310"] + python: ["cp38", "cp39", "cp310", "cp311"] defaults: run: working-directory: ./package @@ -46,7 +46,7 @@ jobs: fetch-depth: 0 - name: Build wheels - uses: pypa/cibuildwheel@v2.6.0 + uses: pypa/cibuildwheel@v2.11.2 with: package-dir: package env: @@ -189,9 +189,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] type: ["FULL", "MIN"] exclude: + # Py311 doesn't support all optional deps yet + - python-version: "3.11" + type: "FULL" # Multiple deps don't like windows - os: windows-latest python-version: "3.8" diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index 0a0d98076a1..2345bfdf2a6 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -28,11 +28,17 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, ] - python-version: [3.8, 3.9, "3.10"] + python-version: ["3.8", "3.9", "3.10"] full-deps: [true, ] install_hole: [true, ] codecov: [true, ] include: + - name: py311-ubuntu-min + os: ubuntu-latest + python-version: "3.11" + full-deps: false + install_hole: true + codecov: false - name: macOS_monterey_py39 os: macOS-12 python-version: 3.9 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ed3887434a4..90859497f87 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,11 +36,11 @@ jobs: PYTHON_ARCH: 'x64' BUILD_TYPE: 'normal' imageName: 'windows-2019' - Win-Python39-64bit-full-wheel: - PYTHON_VERSION: '3.9' + Win-Python310-64bit-full-wheel: + PYTHON_VERSION: '3.10' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.20.0' + NUMPY_MIN: '1.22.3' imageName: 'windows-2019' Win-Python38-64bit-full-wheel: PYTHON_VERSION: '3.8' @@ -48,11 +48,11 @@ jobs: BUILD_TYPE: 'wheel' NUMPY_MIN: '1.20.0' imageName: 'windows-2019' - Linux-Python39-64bit-full-wheel: - PYTHON_VERSION: '3.9' + Linux-Python310-64bit-full-wheel: + PYTHON_VERSION: '3.10' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.20.0' + NUMPY_MIN: '1.21.6' imageName: 'ubuntu-latest' Linux-Python38-64bit-full-wheel: PYTHON_VERSION: '3.8' @@ -74,7 +74,7 @@ jobs: # "manually" - powershell: | cd package - python -m pip install . + python -m pip -v install . cd .. displayName: 'Build MDAnalysis (wheel)' condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'wheel')) @@ -104,7 +104,6 @@ jobs: python -m pip install numpy==$(NUMPY_MIN) displayName: 'pin to older NumPy (wheel test)' condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'wheel')) - # TODO: recent rdkit is not on PyPI - script: >- python -m pip install biopython @@ -117,6 +116,7 @@ jobs: networkx parmed tidynamics>=1.0.0 + rdkit>=2020.03.1 displayName: 'Install additional dependencies for 64-bit tests' condition: and(succeeded(), eq(variables['PYTHON_ARCH'], 'x64')) - powershell: | diff --git a/package/CHANGELOG b/package/CHANGELOG index 1d81a82c1f0..6cae00a8df6 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -70,6 +70,8 @@ Enhancements * Added isolayer selection method (Issue #3845) Changes + * Minimum numpy version for python 3.10 and Windows has been raised to 1.22.3 + (PR #3903) * Replaced deprecated Bio.pairwise2 with Bio.align.PairwiseAligner in MDAnalysis.analysis.align.sequence_alignment (Issue #3950) * Increased minimal version of biopython to 1.80 (Issue #3950) diff --git a/package/pyproject.toml b/package/pyproject.toml index d15deece7e1..f6d2a1c4bc1 100644 --- a/package/pyproject.toml +++ b/package/pyproject.toml @@ -13,9 +13,11 @@ requires = [ # arm64 on darwin for py3.8+ requires numpy >=1.21.0 "numpy==1.21.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin' and platform_python_implementation != 'PyPy'", "numpy==1.21.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin' and platform_python_implementation != 'PyPy'", + # Scipy: On windows avoid 1.21.6, 1.22.0, and 1.22.1 because they were built on vc142 + "numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'", # As per https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg - # safest to build at 1.21.6 for all platforms - "numpy==1.21.6; python_version=='3.10' and platform_python_implementation != 'PyPy'", + # safest to build at 1.21.6 for all other platforms + "numpy==1.21.6; python_version=='3.10' and platform_system !='Windows'and platform_python_implementation != 'PyPy'", "numpy==1.23.2; python_version=='3.11' and platform_python_implementation != 'PyPy'", # For unreleased versions of Python there is currently no known supported # NumPy version. In that case we just let it be a bare NumPy install