From 5ee9f92a7ae4e9671aa499dd8fc174f02baf31d4 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 17 Sep 2026 13:13:41 -0300 Subject: [PATCH 1/3] simpler setup --- .github/workflows/cibuildwheel.yml | 18 +------- .github/workflows/deploy-docs.yml | 22 ++++------ .github/workflows/tests.yml | 43 +++++++++++++++++++ .github/workflows/tests_conda.yml | 66 ------------------------------ .github/workflows/tests_latest.yml | 48 ---------------------- docs/conf.py | 5 +-- pyproject.toml | 15 +------ 7 files changed, 56 insertions(+), 161 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .github/workflows/tests_conda.yml delete mode 100644 .github/workflows/tests_latest.yml diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index ded8e6a6..7794f271 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -36,25 +36,11 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Build just oldest and newest on PRs, all on tags - if: ${{ github.event_name == 'pull_request' }} - shell: bash - # - On PPs, omit musllinux for speed - # - On PRs, run just oldest and newest Python versions (3.11 is the oldest abi3 target) - run: | - CIBW_SKIP="cp310-win_arm64 *musllinux*" - echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV - echo "Setting CIBW_SKIP=$CIBW_SKIP" - - CIBW_TEST_SKIP="cp312-* cp313-*" - echo "CIBW_TEST_SKIP=$CIBW_TEST_SKIP" >> $GITHUB_ENV - echo "Setting CIBW_TEST_SKIP=$CIBW_TEST_SKIP" - - name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels" uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 env: - CIBW_SKIP: ${{ env.CIBW_SKIP }} - CIBW_TEST_SKIP: ${{ env.CIBW_TEST_SKIP }} + CIBW_SKIP: "*-musllinux*" + CIBW_BUILD: "cp311-* cp315-*" CIBW_ARCHS: ${{ matrix.arch }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 60be653b..b1347bb1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -25,27 +25,21 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Setup Mamba - uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - environment-name: TEST - create-args: >- - python=3 - numpy>1.13.3 - sphinx - - - name: Build environment - shell: bash -l {0} + python-version: "3.x" + + - name: Install cftime run: | - python -m pip install -e . --no-deps --force-reinstall + pip install --group dev + pip install -e . - name: Get the version - shell: bash -l {0} id: get_version - run: echo "name=VERSION::$(python setup.py --version)" >> $GITHUB_OUTPUT + run: echo "name=VERSION::$(python -c 'import cftime; print(cftime.__version__)')" >> $GITHUB_OUTPUT - name: Build documentation - shell: bash -l {0} run: | set -e pushd docs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..0696fd78 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,43 @@ +name: TESTS + +on: + pull_request: + push: + branches: [master] + +# Deny all permissions by default +permissions: {} + +jobs: + run: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: [ "3.11", "3.15-dev" ] + os: [ windows-latest, ubuntu-latest, macos-latest, macos-15-intel ] + platform: [x64, x32] + exclude: + - os: macos-latest + platform: x32 + + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install cftime + run: | + pip install --group dev + pip install -e . + + + - name: Run Tests + run: | + coverage run -m pytest -vv test + coverage report diff --git a/.github/workflows/tests_conda.yml b/.github/workflows/tests_conda.yml deleted file mode 100644 index ab730842..00000000 --- a/.github/workflows/tests_conda.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: TESTS-CONDA-ENV - -on: - pull_request: - push: - branches: [master] - -# Deny all permissions by default -permissions: {} - -jobs: - run: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] - os: [windows-latest, ubuntu-latest, macos-latest] - platform: [x64, x32] - experimental: [false] - exclude: - - os: macos-latest - platform: x32 - include: - - python-version: "3.12" - os: "ubuntu-latest" - experimental: true - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Setup micromamba Env - uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 - with: - environment-name: TEST - create-args: >- - python=${{ matrix.python-version }} - numpy>1.13.3 - cython>=0.29.20 - pytest - coverage - - name: Install unstable dependencies - if: matrix.experimental == true - shell: bash -l {0} - run: | - python -m pip install \ - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ - --trusted-host pypi.anaconda.org \ - --no-deps --pre --upgrade \ - numpy; - python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall - - - name: Install cftime - if: matrix.experimental != true - shell: bash -l {0} - run: | - python -m pip install -v -e . --no-deps --force-reinstall - - - name: Run Tests - shell: bash -l {0} - run: | - coverage run -m pytest -vv test - coverage report diff --git a/.github/workflows/tests_latest.yml b/.github/workflows/tests_latest.yml deleted file mode 100644 index 123a3b3b..00000000 --- a/.github/workflows/tests_latest.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build and test with development python - -on: - pull_request: - push: - -# Deny all permissions by default -permissions: {} - -jobs: - build-linux: - name: Python (${{ matrix.python-version }}) - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.14"] - steps: - - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Update Pip - run: | - python -m pip install --upgrade pip - - - name: Install unstable cftime dependencies via pip - run: | - python -m pip install --pre --group dev - # get nightly wheels for numpy - python -m pip install \ - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ - --trusted-host pypi.anaconda.org \ - --no-deps --pre --upgrade \ - numpy - - - name: Install cftime - run: | - python -m pip install . - - - name: Test cftime - run: | - pytest -vv test diff --git a/docs/conf.py b/docs/conf.py index 245e9fed..2bb2504d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,15 +18,14 @@ # -- Project information ----------------------------------------------------- +import cftime project = 'cftime' copyright = '2018, Jeff Whitaker' author = 'Jeff Whitaker' # The short X.Y version -version = '' -# The full version, including alpha/beta/rc tags -release = '1.0' +version = release = cftime.__version__ # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 862e3acb..32a5f357 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ 'Operating System :: POSIX :: Linux', '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', @@ -27,7 +26,7 @@ dependencies = [ "numpy>=2.3.0; platform_system == 'Windows' and platform_machine == 'ARM64'", "numpy>=1.21.2; platform_system != 'Windows' or platform_machine != 'ARM64'", ] -requires-python = ">=3.10" +requires-python = ">=3.11" [dependency-groups] dev = [ @@ -109,24 +108,12 @@ ignore = [ [tool.cibuildwheel] build-verbosity = 1 -skip = [ - "*musllinux_aarch64*", - # Skipped due to unavailability of Python binary and NumPy for Win-ARM64 - "cp310-win_arm64", -] -test-skip = [ - # Emulated testing is slow, so trust that the Python 3.14 test is good enough on aarch64 - # (takes about 5 minutes per wheel to build, and 5 minutes to test) - "cp3{10,11,12,13}-*_aarch64", -] test-groups = "dev" test-command = [ '''python -c "import cftime; print(f'cftime v{cftime.__version__}')"''', "python -m pytest -vv {package}/test" ] -#manylinux-x86_64-image = "manylinux2014" -#manylinux-aarch64-image = "manylinux2014" manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" environment = { CFTIME_LIMITED_API = "1" } From 47ca6357618422cf7e7c603f9adf574ef027d66f Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Fri, 18 Sep 2026 12:43:49 -0300 Subject: [PATCH 2/3] remove x32 --- .github/workflows/tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0696fd78..24975db9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: TESTS on: pull_request: push: - branches: [master] + branches: [ master ] # Deny all permissions by default permissions: {} @@ -16,10 +16,6 @@ jobs: matrix: python-version: [ "3.11", "3.15-dev" ] os: [ windows-latest, ubuntu-latest, macos-latest, macos-15-intel ] - platform: [x64, x32] - exclude: - - os: macos-latest - platform: x32 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 74c495c43552d2c54b41b3fba81337e53fca913b Mon Sep 17 00:00:00 2001 From: Filipe Date: Fri, 18 Sep 2026 13:24:12 -0300 Subject: [PATCH 3/3] Update pyproject.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Robert --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 32a5f357..9556277d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,8 +23,7 @@ classifiers = [ 'Topic :: Scientific/Engineering', ] dependencies = [ - "numpy>=2.3.0; platform_system == 'Windows' and platform_machine == 'ARM64'", - "numpy>=1.21.2; platform_system != 'Windows' or platform_machine != 'ARM64'", + "numpy>=1.23.2", ] requires-python = ">=3.11"