Skip to content

Commit b1c15ad

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix_facecolor_plot
* upstream/master: (21 commits) fix typo in error message in plot.py (pydata#4188) Support multiple dimensions in DataArray.argmin() and DataArray.argmax() methods (pydata#3936) Show data by default in HTML repr for DataArray (pydata#4182) Blackdoc (pydata#4177) Add CONTRIBUTING.md for the benefit of GitHub Correct dask handling for 1D idxmax/min on ND data (pydata#4135) use assert_allclose in the aggregation-with-units tests (pydata#4174) Remove old auto combine (pydata#3926) Fix 4009 (pydata#4173) Limit length of dataarray reprs (pydata#3905) Remove <pre> from nested HTML repr (pydata#4171) Proposal for better error message about in-place operation (pydata#3976) use builtin python types instead of the numpy alias (pydata#4170) Revise pull request template (pydata#4039) pint support for Dataset (pydata#3975) drop eccodes in docs (pydata#4162) Update issue templates inspired/based on dask (pydata#4154) Fix failing upstream-dev build & remove docs build (pydata#4160) Improve typehints of xr.Dataset.__getitem__ (pydata#4144) provide a error summary for assert_allclose (pydata#3847) ...
2 parents d65416a + 54b9450 commit b1c15ad

Some content is hidden

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

62 files changed

+2939
-1620
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Please include a self-contained copy-pastable example that generates the issue if possible.
11+
12+
Please be concise with code posted. See guidelines below on how to provide a good bug report:
13+
14+
- Craft Minimal Bug Reports: http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
15+
- Minimal Complete Verifiable Examples: https://stackoverflow.com/help/mcve
16+
17+
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
18+
-->
19+
20+
**What happened**:
21+
22+
**What you expected to happen**:
23+
24+
**Minimal Complete Verifiable Example**:
25+
26+
```python
27+
# Put your MCVE code here
28+
```
29+
30+
**Anything else we need to know?**:
31+
32+
**Environment**:
33+
34+
<details><summary>Output of <tt>xr.show_versions()</tt></summary>
35+
36+
<!-- Paste the output here xr.show_versions() here -->
37+
38+
39+
</details>

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: General Question
4+
url: https://stackoverflow.com/questions/tagged/python-xarray
5+
about: "If you have a question like *How do I append to an xarray.Dataset?* then please ask on Stack Overflow using the #python-xarray tag."
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Please do a quick search of existing issues to make sure that this has not been asked before. -->
11+
12+
**Is your feature request related to a problem? Please describe.**
13+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14+
15+
**Describe the solution you'd like**
16+
A clear and concise description of what you want to happen.
17+
18+
**Describe alternatives you've considered**
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
**Additional context**
22+
Add any other context about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
- [ ] Closes #xxxx
44
- [ ] Tests added
55
- [ ] Passes `isort -rc . && black . && mypy . && flake8`
6-
- [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API
6+
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
7+
- [ ] New functions/methods are listed in `api.rst`

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ repos:
1111
rev: stable
1212
hooks:
1313
- id: black
14+
- repo: https://github.com/keewis/blackdoc
15+
rev: stable
16+
hooks:
17+
- id: blackdoc
1418
- repo: https://gitlab.com/pycqa/flake8
1519
rev: 3.7.9
1620
hooks:
1721
- id: flake8
1822
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: v0.761 # Must match ci/requirements/*.yml
23+
rev: v0.780 # Must match ci/requirements/*.yml
2024
hooks:
2125
- id: mypy
2226
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Xarray's contributor guidelines [can be found in our online documentation](http://xarray.pydata.org/en/stable/contributing.html)

HOW_TO_RELEASE.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
How to issue an xarray release in 16 easy steps
1+
# How to issue an xarray release in 17 easy steps
22

33
Time required: about an hour.
44

55
1. Ensure your master branch is synced to upstream:
66
```
77
git pull upstream master
88
```
9-
2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
9+
2. Get a list of contributors with:
10+
```
11+
git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format=%aN | sort -u | perl -pe 's/\n/$1, /'
12+
```
13+
or by substituting the _previous_ release in:
14+
```
15+
git log v0.X.Y-1.. --format=%aN | sort -u | perl -pe 's/\n/$1, /'
16+
```
17+
Add these into `whats-new.rst` somewhere :)
18+
3. Look over whats-new.rst and the docs. Make sure "What's New" is complete
1019
(check the date!) and consider adding a brief summary note describing the
1120
release at the top.
1221
Things to watch out for:
@@ -16,41 +25,41 @@ Time required: about an hour.
1625
due to a bad merge. Check for these before a release by using git diff,
1726
e.g., `git diff v0.X.Y whats-new.rst` where 0.X.Y is the previous
1827
release.
19-
3. If you have any doubts, run the full test suite one final time!
28+
4. If you have any doubts, run the full test suite one final time!
2029
```
2130
pytest
2231
```
23-
4. Check that the ReadTheDocs build is passing.
24-
5. On the master branch, commit the release in git:
32+
5. Check that the ReadTheDocs build is passing.
33+
6. On the master branch, commit the release in git:
2534
```
2635
git commit -am 'Release v0.X.Y'
2736
```
28-
6. Tag the release:
37+
7. Tag the release:
2938
```
3039
git tag -a v0.X.Y -m 'v0.X.Y'
3140
```
32-
7. Build source and binary wheels for pypi:
41+
8. Build source and binary wheels for pypi:
3342
```
3443
git clean -xdf # this deletes all uncommited changes!
3544
python setup.py bdist_wheel sdist
3645
```
37-
8. Use twine to check the package build:
46+
9. Use twine to check the package build:
3847
```
3948
twine check dist/xarray-0.X.Y*
4049
```
41-
9. Use twine to register and upload the release on pypi. Be careful, you can't
50+
10. Use twine to register and upload the release on pypi. Be careful, you can't
4251
take this back!
4352
```
4453
twine upload dist/xarray-0.X.Y*
4554
```
4655
You will need to be listed as a package owner at
4756
https://pypi.python.org/pypi/xarray for this to work.
48-
10. Push your changes to master:
57+
11. Push your changes to master:
4958
```
5059
git push upstream master
5160
git push upstream --tags
5261
```
53-
11. Update the stable branch (used by ReadTheDocs) and switch back to master:
62+
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
5463
```
5564
git checkout stable
5665
git rebase master
@@ -60,7 +69,7 @@ Time required: about an hour.
6069
It's OK to force push to 'stable' if necessary. (We also update the stable
6170
branch with `git cherrypick` for documentation only fixes that apply the
6271
current released version.)
63-
12. Add a section for the next release (v.X.Y+1) to doc/whats-new.rst:
72+
13. Add a section for the next release (v.X.Y+1) to doc/whats-new.rst:
6473
```
6574
.. _whats-new.0.X.Y+1:
6675
@@ -86,19 +95,19 @@ Time required: about an hour.
8695
Internal Changes
8796
~~~~~~~~~~~~~~~~
8897
```
89-
13. Commit your changes and push to master again:
98+
14. Commit your changes and push to master again:
9099
```
91100
git commit -am 'New whatsnew section'
92101
git push upstream master
93102
```
94103
You're done pushing to master!
95-
14. Issue the release on GitHub. Click on "Draft a new release" at
104+
15. Issue the release on GitHub. Click on "Draft a new release" at
96105
https://github.com/pydata/xarray/releases. Type in the version number, but
97106
don't bother to describe it -- we maintain that on the docs instead.
98-
15. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
107+
16. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
99108
and switch your new release tag (at the bottom) from "Inactive" to "Active".
100109
It should now build automatically.
101-
16. Issue the release announcement! For bug fix releases, I usually only email
110+
17. Issue the release announcement! For bug fix releases, I usually only email
102111
[email protected]. For major/feature releases, I will email a broader
103112
list (no more than once every 3-6 months):
104113
@@ -109,18 +118,8 @@ Time required: about an hour.
109118
110119
Google search will turn up examples of prior release announcements (look for
111120
"ANN xarray").
112-
You can get a list of contributors with:
113-
```
114-
git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format="%aN" | sort -u
115-
```
116-
or by substituting the _previous_ release in:
117-
```
118-
git log v0.X.Y-1.. --format="%aN" | sort -u
119-
```
120-
NB: copying this output into a Google Groups form can cause
121-
[issues](https://groups.google.com/forum/#!topic/xarray/hK158wAviPs) with line breaks, so take care
122121
123-
Note on version numbering:
122+
## Note on version numbering
124123
125124
We follow a rough approximation of semantic version. Only major releases (0.X.0)
126125
should include breaking changes. Minor releases (0.X.Y) are for bug fixes and

azure-pipelines.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,3 @@ jobs:
108108
python ci/min_deps_check.py ci/requirements/py36-bare-minimum.yml
109109
python ci/min_deps_check.py ci/requirements/py36-min-all-deps.yml
110110
displayName: minimum versions policy
111-
112-
- job: Docs
113-
pool:
114-
vmImage: 'ubuntu-16.04'
115-
steps:
116-
- template: ci/azure/install.yml
117-
parameters:
118-
env_file: ci/requirements/doc.yml
119-
- bash: |
120-
source activate xarray-tests
121-
# Replicate the exact environment created by the readthedocs CI
122-
conda install --yes --quiet -c pkgs/main mock pillow sphinx sphinx_rtd_theme
123-
displayName: Replicate readthedocs CI environment
124-
- bash: |
125-
source activate xarray-tests
126-
cd doc
127-
sphinx-build -W --keep-going -j auto -b html -d _build/doctrees . _build/html
128-
displayName: Build HTML docs

ci/azure/install.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ steps:
1010
conda env create -n xarray-tests --file ${{ parameters.env_file }}
1111
displayName: Install conda dependencies
1212

13+
# TODO: add sparse back in, once Numba works with the development version of
14+
# NumPy again: https://github.com/pydata/xarray/issues/4146
1315
- bash: |
1416
source activate xarray-tests
1517
conda uninstall -y --force \
@@ -23,7 +25,8 @@ steps:
2325
cftime \
2426
rasterio \
2527
pint \
26-
bottleneck
28+
bottleneck \
29+
sparse
2730
python -m pip install \
2831
-i https://pypi.anaconda.org/scipy-wheels-nightly/simple \
2932
--no-deps \

ci/requirements/py36-min-all-deps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ dependencies:
1515
- cfgrib=0.9
1616
- cftime=1.0
1717
- coveralls
18-
- dask=2.2
19-
- distributed=2.2
18+
- dask=2.5
19+
- distributed=2.5
2020
- flake8
2121
- h5netcdf=0.7
2222
- h5py=2.9 # Policy allows for 2.10, but it's a conflict-fest

ci/requirements/py36-min-nep18.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ dependencies:
66
# require drastically newer packages than everything else
77
- python=3.6
88
- coveralls
9-
- dask=2.4
10-
- distributed=2.4
9+
- dask=2.5
10+
- distributed=2.5
1111
- msgpack-python=0.6 # remove once distributed is bumped. distributed GH3491
1212
- numpy=1.17
1313
- pandas=0.25
14-
- pint=0.11
1514
- pip
1615
- pytest
1716
- pytest-cov
1817
- pytest-env
1918
- scipy=1.2
2019
- setuptools=41.2
2120
- sparse=0.8
21+
- pip:
22+
- pint==0.13

ci/requirements/py36.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31-
- pint
3231
- pip
3332
- pseudonetcdf
3433
- pydap
@@ -45,3 +44,4 @@ dependencies:
4544
- zarr
4645
- pip:
4746
- numbagg
47+
- pint

ci/requirements/py37-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31-
- pint
3231
- pip
3332
- pseudonetcdf
3433
- pydap
@@ -45,3 +44,4 @@ dependencies:
4544
- zarr
4645
- pip:
4746
- numbagg
47+
- pint

ci/requirements/py37.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31-
- pint
3231
- pip
3332
- pseudonetcdf
3433
- pydap
@@ -45,3 +44,4 @@ dependencies:
4544
- zarr
4645
- pip:
4746
- numbagg
47+
- pint

ci/requirements/py38-all-but-dask.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ dependencies:
2525
- numba
2626
- numpy
2727
- pandas
28-
- pint
2928
- pip
3029
- pseudonetcdf
3130
- pydap
@@ -42,3 +41,4 @@ dependencies:
4241
- zarr
4342
- pip:
4443
- numbagg
44+
- pint

0 commit comments

Comments
 (0)