Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix/dask_indexing
Browse files Browse the repository at this point in the history
* upstream/main: (291 commits)
  Update error message when saving multiindex (pydata#7475)
  DOC: cross ref the groupby tutorial (pydata#7555)
  [pre-commit.ci] pre-commit autoupdate (pydata#7543)
  supress namespace_package deprecation warning (doctests) (pydata#7548)
  [skip-ci] Add PDF of Xarray logo (pydata#7530)
  Support complex arrays in xr.corr (pydata#7392)
  clarification for thresh arg of dataset.dropna() (pydata#7481)
  [pre-commit.ci] pre-commit autoupdate (pydata#7524)
  Require to explicitly defining optional dimensions such as hue and markersize (pydata#7277)
  Use plt.rc_context for default styles (pydata#7318)
  Update HOW_TO_RELEASE.md (pydata#7512)
  Update whats-new for dev (pydata#7511)
  Fix whats-new for 2023.02.0 (pydata#7506)
  Update apply_ufunc output_sizes error message (pydata#7509)
  Zarr: drop "source" and  "original_shape" from encoding (pydata#7500)
  [pre-commit.ci] pre-commit autoupdate (pydata#7507)
  Whats-new for 2023.03.0
  Add `inclusive` argument to `cftime_range` and `date_range` and deprecate `closed` argument (pydata#7373)
  Make text match code example (pydata#7499)
  Remove Dask single-threaded setting in tests (pydata#7489)
  ...
  • Loading branch information
dcherian committed Feb 28, 2023
2 parents c93b297 + 4194920 commit 97fa188
Show file tree
Hide file tree
Showing 196 changed files with 22,474 additions and 9,285 deletions.
7 changes: 0 additions & 7 deletions .coveragerc

This file was deleted.

3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
82 changes: 82 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Automation:
- .github/*
- .github/**/*

CI:
- ci/*
- ci/**/*

dependencies:
- requirements.txt
- ci/requirements/*

topic-arrays:
- xarray/core/duck_array_ops.py

topic-backends:
- xarray/backends/*
- xarray/backends/**/*

topic-cftime:
- xarray/coding/*time*

topic-CF conventions:
- xarray/conventions.py

topic-combine:
- xarray/core/combine.py

topic-dask:
- xarray/core/dask*
- xarray/core/parallel.py

topic-DataTree:
- xarray/core/datatree*

# topic-documentation:
# - ['doc/*', '!doc/whats-new.rst']
# - doc/**/*

topic-faq:
- doc/howdoi.rst

topic-groupby:
- xarray/core/groupby.py

topic-html-repr:
- xarray/core/formatting_html.py

topic-hypothesis:
- xarray/properties/*
- xarray/testing/strategies/*

topic-indexing:
- xarray/core/indexes.py
- xarray/core/indexing.py

topic-performance:
- asv_bench/benchmarks/*
- asv_bench/benchmarks/**/*

topic-plotting:
- xarray/plot/*
- xarray/plot/**/*

topic-rolling:
- xarray/core/rolling.py
- xarray/core/rolling_exp.py

topic-testing:
- conftest.py
- xarray/testing.py
- xarray/testing/*

topic-typing:
- xarray/core/types.py

topic-zarr:
- xarray/backends/zarr.py

io:
- xarray/backends/*
- xarray/backends/**/*
20 changes: 10 additions & 10 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:

jobs:
benchmark:
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
name: Linux
runs-on: ubuntu-20.04
env:
ASV_DIR: "./asv_bench"
CONDA_ENV_FILE: ci/requirements/environment.yml

steps:
# We need the full repo to avoid this issue
Expand All @@ -20,17 +21,16 @@ jobs:
with:
fetch-depth: 0

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
- name: Set up conda environment
uses: mamba-org/provision-with-micromamba@v15
with:
# installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
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: |
asv
- name: Setup some dependencies
shell: bash -l {0}
run: |
pip install asv
sudo apt-get update -y
- name: Run benchmarks
shell: bash -l {0}
Expand Down
84 changes: 77 additions & 7 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: "[skip-ci]"
Expand Down Expand Up @@ -53,12 +53,13 @@ jobs:
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
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)}}"

Expand All @@ -72,7 +73,10 @@ jobs:
python xarray/util/print_versions.py
- name: Run doctests
run: |
python -m pytest --doctest-modules xarray --ignore xarray/tests
# Raise an error if there are warnings in the doctests, with `-Werror`.
# This is a trial; if it presents an problem, feel free to remove.
# See https://github.com/pydata/xarray/issues/7164 for more info.
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
mypy:
name: Mypy
Expand All @@ -96,12 +100,67 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
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)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install 'mypy<0.990'
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected]
with:
file: mypy_report/cobertura.xml
flags: mypy
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false

mypy39:
name: Mypy 3.9
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.9"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: set environment variables
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
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)}}"
- name: Install xarray
Expand All @@ -114,11 +173,22 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install mypy
python -m pip install 'mypy<0.990'
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected]
with:
file: mypy_report/cobertura.xml
flags: mypy39
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false



min-version-policy:
name: Minimum Version Policy
Expand All @@ -140,7 +210,7 @@ jobs:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
uses: mamba-org/provision-with-micromamba@v15
with:
environment-name: xarray-tests
environment-file: false
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: "[skip-ci]"
Expand All @@ -42,15 +42,15 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# Bookend python versions
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.10", "3.11"]
env: [""]
include:
# Minimum python version:
- env: "bare-minimum"
python-version: "3.8"
python-version: "3.9"
os: ubuntu-latest
- env: "min-all-deps"
python-version: "3.8"
python-version: "3.9"
os: ubuntu-latest
# Latest python version:
- env: "all-but-dask"
Expand All @@ -67,7 +67,13 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if [[ ${{ matrix.os }} == windows* ]] ;
if [[ "${{matrix.python-version}}" == "3.11" ]]; then
if [[ ${{matrix.os}} == windows* ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-py311.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/requirements/environment-py311.yml" >> $GITHUB_ENV
fi
elif [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
elif [[ "${{ matrix.env }}" != "" ]] ;
Expand All @@ -86,12 +92,15 @@ jobs:
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
uses: mamba-org/provision-with-micromamba@v15
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: |
python=${{matrix.python-version}}
conda
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
Expand Down Expand Up @@ -129,7 +138,7 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/[email protected].0
uses: codecov/[email protected].1
with:
file: ./coverage.xml
flags: unittests
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/label-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Issue and PR Labeler"
on:
pull_request:
types: [opened]
issues:
types: [opened, reopened]
jobs:
label-all-on-open:
runs-on: ubuntu-latest
steps:
- uses: andymckay/[email protected]
with:
add-labels: "needs triage"
ignore-if-labeled: false
14 changes: 14 additions & 0 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "PR Labeler"
on:
- pull_request_target

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Workaround for sync-labels bug:
# https://github.com/actions/labeler/issues/112
sync-labels: ""
2 changes: 1 addition & 1 deletion .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
done
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
Expand Down
Loading

0 comments on commit 97fa188

Please sign in to comment.