Skip to content

Commit

Permalink
Merge branch 'main' into nanoseconds-resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer authored Aug 21, 2023
2 parents 8750475 + 83c2919 commit 94a7652
Show file tree
Hide file tree
Showing 117 changed files with 7,591 additions and 1,745 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
extra-specs: |
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
create-args: >-
asv
- name: 'Get Previous tag'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
extra-specs: |
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
create-args: >-
asv
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ jobs:
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"

- name: Install xarray
run: |
Expand Down Expand Up @@ -100,15 +100,15 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -126,7 +126,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.3
uses: codecov/codecov-action@v3.1.4
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -154,15 +154,15 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -180,7 +180,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.3
uses: codecov/codecov-action@v3.1.4
with:
file: mypy_report/cobertura.xml
flags: mypy39
Expand Down Expand Up @@ -210,16 +210,14 @@ jobs:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-name: xarray-tests
environment-file: false
extra-specs: |
create-args: >-
python=3.10
pyyaml
conda
python-dateutil
channels: conda-forge
- name: minimum versions policy
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ jobs:
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
extra-specs: |
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
conda
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3.1.3
uses: codecov/codecov-action@v3.1.4
with:
file: ./coverage.xml
flags: unittests
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Upload nightly wheels
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
cron:
runs-on: ubuntu-latest
if: github.repository == 'pydata/xarray'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build tarball and wheels
run: |
git clean -xdf
git restore -SW .
python -m build
- name: Check built artifacts
run: |
python -m twine check --strict dist/*
pwd
if [ -f dist/xarray-0.0.0.tar.gz ]; then
echo "❌ INVALID VERSION NUMBER"
exit 1
else
echo "✅ Looks good"
fi
- name: Upload wheel
uses: scientific-python/upload-nightly-action@main
with:
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
artifacts_path: dist
102 changes: 0 additions & 102 deletions .github/workflows/parse_logs.py

This file was deleted.

31 changes: 25 additions & 6 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,26 @@ jobs:
python -m pip install dist/xarray*.whl
python -m xarray.util.print_versions
upload-to-test-pypi:
needs: test-built-dist
if: github.event_name == 'push'
runs-on: ubuntu-latest

environment:
name: pypi
url: https://test.pypi.org/p/xarray
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.8.5
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true

Expand All @@ -84,14 +98,19 @@ jobs:
needs: test-built-dist
if: github.event_name == 'release'
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/xarray
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.5
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
Loading

0 comments on commit 94a7652

Please sign in to comment.