Skip to content

Commit

Permalink
Merge branch 'main' into remove_gha_hack
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo authored Oct 30, 2024
2 parents bb79fc4 + 54b2819 commit 82c41c6
Show file tree
Hide file tree
Showing 15 changed files with 268 additions and 286 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}
- name: "Conda package cache"
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 5
Expand All @@ -58,7 +58,7 @@ jobs:

- name: "Conda environment cache"
id: conda-env-cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 5
Expand All @@ -77,7 +77,7 @@ jobs:
conda list
- name: "Tox cache"
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to forece a cache refresh.
CACHE_BUILD: 5
Expand All @@ -91,9 +91,9 @@ jobs:
tox -e ${{ matrix.lock }} -- --platform osx-64 --platform win-64
- name: "Upload lock artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: lock-artifacts
name: lock-artifact-${{ matrix.lock }}
path: ${{ github.workspace }}/requirements/locks/${{ matrix.lock }}*.txt


Expand All @@ -106,10 +106,10 @@ jobs:
uses: actions/checkout@v4

- name: "Download lock artifacts"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: lock-artifacts
path: ${{ github.workspace }}/requirements/locks
merge-multiple: true

- name: "Generate token"
uses: tibdex/github-app-token@v2
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
run:
shell: bash -l {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CYTHON_COVERAGE: 1
ENV_NAME: "ci-tests"
strategy:
Expand All @@ -39,7 +38,6 @@ jobs:
- os: ubuntu-latest
version: py312
posargs: "--cov-report=xml --cov"
post-command: codecov
- os: macos-latest
version: py312
platform: osx
Expand All @@ -57,7 +55,7 @@ jobs:
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}
- name: "Conda package cache"
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 2
Expand All @@ -76,7 +74,7 @@ jobs:

- name: "Conda environment cache"
id: conda-env-cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 2
Expand All @@ -95,7 +93,7 @@ jobs:
conda list
- name: "Tox cache"
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
env:
# Increment the build number to forece a cache refresh.
CACHE_BUILD: 2
Expand All @@ -105,7 +103,11 @@ jobs:
key: ${{ runner.os }}-tox-${{ env.ENV_NAME }}-${{ matrix.version }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.TOX_INI) }}

- name: "Run ${{ matrix.os }} on ${{ matrix.version}} tests"
env:
POST_COMMAND: ${{ matrix.post-command }}
run: |
tox -e ${{ matrix.version }}-${{ matrix.platform }}-test -- ${{ matrix.posargs }}
- name: "Upload coverage report to Codecov"
if: contains(matrix.posargs, '--cov')
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
with:
token: ${{ secrets.CODECOV_TOKEN }}
22 changes: 11 additions & 11 deletions .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: echo "MACOSX_DEPLOYMENT_TARGET=$([[ ${{ matrix.os }} == 'macos-latest' ]] && echo '14.0' || echo '13.0')" >> $GITHUB_ENV

- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
uses: pypa/[email protected].1
uses: pypa/[email protected].3
env:
CIBW_SKIP: "cp39-* cp313-* pp* *-musllinux*"
CIBW_ARCHS: ${{ matrix.arch }}
Expand All @@ -87,9 +87,9 @@ jobs:
UDUNITS2_XML_PATH: ${{ matrix.xml_path }}
CIBW_ENVIRONMENT_PASS_LINUX: UDUNITS2_INCDIR UDUNITS2_LIBDIR UDUNITS2_XML_PATH

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts
name: pypi-artifacts-bdist-${{ matrix.os }}-${{ matrix.arch }}
path: ${{ github.workspace }}/wheelhouse/*.whl


Expand All @@ -106,9 +106,9 @@ jobs:
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts
name: pypi-artifacts-sdist
path: ${{ github.workspace }}/dist/*.tar.gz


Expand All @@ -117,10 +117,10 @@ jobs:
name: "Show artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
merge-multiple: true

- shell: bash
run: |
Expand All @@ -134,10 +134,10 @@ jobs:
# upload to Test PyPI for every commit on main branch
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand All @@ -155,10 +155,10 @@ jobs:
# upload to PyPI for every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
Expand Down Expand Up @@ -33,13 +33,13 @@ repos:
#args: ["--show=errskip"] # show everything for the moment

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.19.1
hooks:
- id: blacken-docs
types: [file, rst]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.10"
rev: "v0.7.1"
hooks:
# Run the linter
- id: ruff
Expand Down
7 changes: 4 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ build:
python: mambaforge-4.10
jobs:
post_checkout:
# reference: https://github.com/SciTools/cf-units/pull/272
# perform a "git fetch --unshallow" when the cf-units repo
# becomes incomplete i.e., there is a .git/shallow.
# The SciTools/cf-units repository is shallow i.e., has a .git/shallow,
# therefore complete the repository with a full history in order
# to allow setuptools-scm to correctly auto-discover the version.
- git fetch --unshallow
- git fetch --all
pre_install:
# create a "common" link to the underlying rtd conda environment,
Expand Down
Loading

0 comments on commit 82c41c6

Please sign in to comment.