Skip to content

Commit d5e7646

Browse files
committed
Merge branch 'main' into fix/dask_indexing
* main: (129 commits) docs on specifying chunks in to_zarr encoding arg (pydata#6542) [skip-ci] List count under Aggregation (pydata#6711) Add `Dataset.dtypes` property (pydata#6706) try to import `UndefinedVariableError` from the new location (pydata#6701) DOC: note of how `chunks` can be defined (pydata#6696) pdyap version dependent client.open_url call (pydata#6656) use `pytest-reportlog` to generate upstream-dev CI failure reports (pydata#6699) [pre-commit.ci] pre-commit autoupdate (pydata#6694) Bump actions/setup-python from 3 to 4 (pydata#6692) Fix Dataset.where with drop=True and mixed dims (pydata#6690) pass kwargs through from save_mfdataset to to_netcdf (pydata#6686) Docs: indexing.rst finetuning (pydata#6685) use micromamba instead of mamba (pydata#6674) install the development version of `matplotlib` into the upstream-dev CI (pydata#6675) Add whatsnew section for v2022.06.0 release notes for 2022.06.0rc0 release notes for the pre-release (pydata#6676) more testpypi workflow fixes (pydata#6673) thin: add examples (pydata#6663) Update multidimensional-coords.ipynb (pydata#6672) ...
2 parents a11be00 + ec41d65 commit d5e7646

File tree

186 files changed

+10310
-5764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+10310
-5764
lines changed

.github/ISSUE_TEMPLATE/bugreport.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Bug Report
1+
name: 🐛 Bug Report
22
description: File a bug report to help us improve
33
labels: [bug, "needs triage"]
44
body:
@@ -26,14 +26,24 @@ body:
2626
attributes:
2727
label: Minimal Complete Verifiable Example
2828
description: |
29-
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:
29+
Minimal, self-contained copy-pastable example that demonstrates the issue. This will be automatically formatted into code, so no need for markdown backticks.
30+
render: Python
31+
32+
- type: checkboxes
33+
id: mvce-checkboxes
34+
attributes:
35+
label: MVCE confirmation
36+
description: |
37+
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
3038
3139
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
3240
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
3341
34-
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
35-
This will be automatically formatted into code, so no need for markdown backticks.
36-
render: Python
42+
options:
43+
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
44+
- label: Complete example — the example is self-contained, including all data and the text of any traceback.
45+
- label: Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result.
46+
- label: New issue — a search of GitHub Issues suggests this is not a duplicate.
3747

3848
- type: textarea
3949
id: log-output
@@ -54,6 +64,12 @@ body:
5464
attributes:
5565
label: Environment
5666
description: |
57-
Paste the output of `xr.show_versions()` here
67+
Paste the output of `xr.show_versions()` between the `<details>` tags, leaving an empty line following the opening tag.
68+
value: |
69+
<details>
70+
71+
72+
73+
</details>
5874
validations:
5975
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Usage question
3+
- name: Usage question
44
url: https://github.com/pydata/xarray/discussions
55
about: |
66
Ask questions and discuss with other community members here.
77
If you have a question like "How do I concatenate a list of datasets?" then
88
please include a self-contained reproducible example if possible.
9+
- name: 🗺️ Raster analysis usage question
10+
url: https://github.com/corteva/rioxarray/discussions
11+
about: |
12+
If you are using the rioxarray extension (engine='rasterio'), or have questions about
13+
raster analysis such as geospatial formats, coordinate reprojection, etc.,
14+
please use the rioxarray discussion forum.

.github/ISSUE_TEMPLATE/misc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Issue
2-
description: General Issue or discussion topic. For usage questions, please follow the "Usage question" link
1+
name: 📝 Issue
2+
description: General issue, that's not a bug report.
33
labels: ["needs triage"]
44
body:
55
- type: markdown

.github/ISSUE_TEMPLATE/newfeature.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Feature Request
1+
name: 💡 Feature Request
22
description: Suggest an idea for xarray
33
labels: [enhancement]
44
body:

.github/stale.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Configuration for probot-stale - https://github.com/probot/stale
22

33
# Number of days of inactivity before an Issue or Pull Request becomes stale
4-
daysUntilStale: 700 # start with a large number and reduce shortly
4+
daysUntilStale: 600 # start with a large number and reduce shortly
55

66
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
77
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
@@ -14,10 +14,10 @@ exemptLabels:
1414
- "[Status] Maybe Later"
1515

1616
# Set to true to ignore issues in a project (defaults to false)
17-
exemptProjects: false
17+
exemptProjects: true
1818

1919
# Set to true to ignore issues in a milestone (defaults to false)
20-
exemptMilestones: false
20+
exemptMilestones: true
2121

2222
# Set to true to ignore issues with an assignee (defaults to false)
2323
exemptAssignees: true
@@ -31,6 +31,9 @@ markComment: |
3131
3232
If this issue remains relevant, please comment here or remove the `stale` label; otherwise it will be marked as closed automatically
3333
34+
closeComment: |
35+
The stalebot didn't hear anything for a while, so it closed this. Please reopen if this is still an issue.
36+
3437
# Comment to post when removing the stale label.
3538
# unmarkComment: >
3639
# Your comment here.
@@ -40,8 +43,7 @@ markComment: |
4043
# Your comment here.
4144

4245
# Limit the number of actions per hour, from 1-30. Default is 30
43-
limitPerRun: 1 # start with a small number
44-
46+
limitPerRun: 2 # start with a small number
4547

4648
# Limit to only `issues` or `pulls`
4749
# only: issues

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
cp benchmarks/README_CI.md benchmarks.log .asv/results/
6868
working-directory: ${{ env.ASV_DIR }}
6969

70-
- uses: actions/upload-artifact@v2
70+
- uses: actions/upload-artifact@v3
7171
if: always()
7272
with:
7373
name: asv-benchmark-results-${{ runner.os }}

.github/workflows/ci-additional.yaml

Lines changed: 60 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -30,116 +30,80 @@ jobs:
3030
with:
3131
keyword: "[skip-ci]"
3232

33-
test:
34-
name: ${{ matrix.os }} ${{ matrix.env }}
35-
runs-on: ${{ matrix.os }}
33+
doctest:
34+
name: Doctests
35+
runs-on: "ubuntu-latest"
3636
needs: detect-ci-trigger
3737
if: needs.detect-ci-trigger.outputs.triggered == 'false'
3838
defaults:
3939
run:
4040
shell: bash -l {0}
41-
strategy:
42-
fail-fast: false
43-
matrix:
44-
os: ["ubuntu-latest"]
45-
env:
46-
[
47-
# Minimum python version:
48-
"py38-bare-minimum",
49-
"py38-min-all-deps",
50-
51-
# Latest python version:
52-
"py39-all-but-dask",
53-
"py39-flaky",
54-
]
41+
42+
env:
43+
CONDA_ENV_FILE: ci/requirements/environment.yml
44+
PYTHON_VERSION: "3.10"
45+
5546
steps:
5647
- uses: actions/checkout@v3
5748
with:
5849
fetch-depth: 0 # Fetch all history for all branches and tags.
5950

60-
- name: Set environment variables
51+
- name: set environment variables
6152
run: |
62-
if [[ ${{ matrix.env }} == "py39-flaky" ]] ;
63-
then
64-
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
65-
echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV
66-
67-
else
68-
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
69-
fi
70-
- name: Cache conda
71-
uses: actions/cache@v2
72-
with:
73-
path: ~/conda_pkgs_dir
74-
key:
75-
${{ runner.os }}-conda-${{ matrix.env }}-${{
76-
hashFiles('ci/requirements/**.yml') }}
53+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
7754
78-
- uses: conda-incubator/setup-miniconda@v2
55+
- name: Setup micromamba
56+
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
7957
with:
80-
channels: conda-forge
81-
channel-priority: strict
82-
mamba-version: "*"
83-
activate-environment: xarray-tests
84-
auto-update-conda: false
85-
python-version: 3.9
86-
use-only-tar-bz2: true
87-
88-
- name: Install conda dependencies
89-
run: |
90-
mamba env update -f $CONDA_ENV_FILE
58+
environment-file: ${{env.CONDA_ENV_FILE}}
59+
environment-name: xarray-tests
60+
extra-specs: |
61+
python=${{env.PYTHON_VERSION}}
62+
cache-env: true
63+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
9164

9265
- name: Install xarray
9366
run: |
9467
python -m pip install --no-deps -e .
95-
9668
- name: Version info
9769
run: |
9870
conda info -a
9971
conda list
10072
python xarray/util/print_versions.py
101-
- name: Import xarray
102-
run: |
103-
python -c "import xarray"
104-
- name: Run tests
73+
- name: Run doctests
10574
run: |
106-
python -m pytest -n 4 \
107-
--cov=xarray \
108-
--cov-report=xml \
109-
$PYTEST_EXTRA_FLAGS
75+
python -m pytest --doctest-modules xarray --ignore xarray/tests
11076
111-
- name: Upload code coverage to Codecov
112-
uses: codecov/[email protected]
113-
with:
114-
file: ./coverage.xml
115-
flags: unittests,${{ matrix.env }}
116-
env_vars: RUNNER_OS
117-
name: codecov-umbrella
118-
fail_ci_if_error: false
119-
doctest:
120-
name: Doctests
77+
mypy:
78+
name: Mypy
12179
runs-on: "ubuntu-latest"
80+
needs: detect-ci-trigger
81+
# temporarily skipping due to https://github.com/pydata/xarray/issues/6551
12282
if: needs.detect-ci-trigger.outputs.triggered == 'false'
12383
defaults:
12484
run:
12585
shell: bash -l {0}
86+
env:
87+
CONDA_ENV_FILE: ci/requirements/environment.yml
88+
PYTHON_VERSION: "3.10"
12689

12790
steps:
12891
- uses: actions/checkout@v3
12992
with:
13093
fetch-depth: 0 # Fetch all history for all branches and tags.
131-
- uses: conda-incubator/setup-miniconda@v2
132-
with:
133-
channels: conda-forge
134-
channel-priority: strict
135-
mamba-version: "*"
136-
activate-environment: xarray-tests
137-
auto-update-conda: false
138-
python-version: "3.9"
13994

140-
- name: Install conda dependencies
95+
- name: set environment variables
14196
run: |
142-
mamba env update -f ci/requirements/environment.yml
97+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
98+
- name: Setup micromamba
99+
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
100+
with:
101+
environment-file: ${{env.CONDA_ENV_FILE}}
102+
environment-name: xarray-tests
103+
extra-specs: |
104+
python=${{env.PYTHON_VERSION}}
105+
cache-env: true
106+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
143107
- name: Install xarray
144108
run: |
145109
python -m pip install --no-deps -e .
@@ -148,9 +112,13 @@ jobs:
148112
conda info -a
149113
conda list
150114
python xarray/util/print_versions.py
151-
- name: Run doctests
115+
- name: Install mypy
152116
run: |
153-
python -m pytest --doctest-modules xarray --ignore xarray/tests
117+
python -m pip install mypy
118+
119+
- name: Run mypy
120+
run: |
121+
python -m mypy --install-types --non-interactive
154122
155123
min-version-policy:
156124
name: Minimum Version Policy
@@ -161,20 +129,28 @@ jobs:
161129
run:
162130
shell: bash -l {0}
163131

132+
strategy:
133+
matrix:
134+
environment-file: ["bare-minimum", "min-all-deps"]
135+
fail-fast: false
136+
164137
steps:
165138
- uses: actions/checkout@v3
166139
with:
167140
fetch-depth: 0 # Fetch all history for all branches and tags.
168-
- uses: conda-incubator/setup-miniconda@v2
141+
142+
- name: Setup micromamba
143+
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
169144
with:
145+
environment-name: xarray-tests
146+
environment-file: false
147+
extra-specs: |
148+
python=3.10
149+
pyyaml
150+
conda
151+
python-dateutil
170152
channels: conda-forge
171-
channel-priority: strict
172-
mamba-version: "*"
173-
auto-update-conda: false
174-
python-version: "3.9"
175153

176154
- name: minimum versions policy
177155
run: |
178-
mamba install -y pyyaml conda python-dateutil
179-
python ci/min_deps_check.py ci/requirements/py38-bare-minimum.yml
180-
python ci/min_deps_check.py ci/requirements/py38-min-all-deps.yml
156+
python ci/min_deps_check.py ci/requirements/${{ matrix.environment-file }}.yml

0 commit comments

Comments
 (0)