Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-*"
Comment on lines +42 to +43

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would actually suggest keeping as much as cibw's configuration as possible in pyproject.toml:

  • a single source of truth is preferable to two
  • static configuration is easier to maintain and reason with

CIBW_ARCHS: ${{ matrix.arch }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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 ]

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
66 changes: 0 additions & 66 deletions .github/workflows/tests_conda.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/tests_latest.yml

This file was deleted.

5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
18 changes: 2 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -24,10 +23,9 @@ 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.10"
requires-python = ">=3.11"

[dependency-groups]
dev = [
Expand Down Expand Up @@ -109,24 +107,12 @@ ignore = [

[tool.cibuildwheel]
Comment thread
ocefpaf marked this conversation as resolved.
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" }
Loading