Skip to content

Commit 4a31d8b

Browse files
committed
Merge branch 'master' of github.com:pydata/xarray into remove-old-auto-combine
* 'master' of github.com:pydata/xarray: (81 commits) 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) built-in accessor documentation (pydata#3988) Recommend installing cftime when time decoding fails. (pydata#4134) parameter documentation for DataArray.sel (pydata#4150) speed up map_blocks (pydata#4149) Remove outdated note from datetime accessor docstring (pydata#4148) Fix the upstream-dev pandas build failure (pydata#4138) map_blocks: Allow passing dask-backed objects in args (pydata#3818) keep attrs in reset_index (pydata#4103) Fix open_rasterio() for WarpedVRT with specified src_crs (pydata#4104) Allow non-unique and non-monotonic coordinates in get_clean_interp_index and polyfit (pydata#4099) update numpy's intersphinx url (pydata#4117) xr.infer_freq (pydata#4033) ...
2 parents 68566f3 + 2a8cd3b commit 4a31d8b

File tree

101 files changed

+5374
-2569
lines changed

Some content is hidden

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

101 files changed

+5374
-2569
lines changed

.deepsource.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version = 1
2+
3+
test_patterns = [
4+
"*/tests/**",
5+
"*/test_*.py"
6+
]
7+
8+
exclude_patterns = [
9+
"doc/**",
10+
"ci/**"
11+
]
12+
13+
[[analyzers]]
14+
name = "python"
15+
enabled = true
16+
17+
[analyzers.meta]
18+
runtime_version = "3.x.x"

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
hooks:
1717
- id: flake8
1818
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: v0.761 # Must match ci/requirements/*.yml
19+
rev: v0.780 # Must match ci/requirements/*.yml
2020
hooks:
2121
- id: mypy
2222
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194

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: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
conda_env: py37
2121
py38:
2222
conda_env: py38
23+
py38-all-but-dask:
24+
conda_env: py38-all-but-dask
2325
py38-upstream-dev:
2426
conda_env: py38
2527
upstream_dev: true
@@ -106,21 +108,3 @@ jobs:
106108
python ci/min_deps_check.py ci/requirements/py36-bare-minimum.yml
107109
python ci/min_deps_check.py ci/requirements/py36-min-all-deps.yml
108110
displayName: minimum versions policy
109-
110-
- job: Docs
111-
pool:
112-
vmImage: 'ubuntu-16.04'
113-
steps:
114-
- template: ci/azure/install.yml
115-
parameters:
116-
env_file: ci/requirements/doc.yml
117-
- bash: |
118-
source activate xarray-tests
119-
# Replicate the exact environment created by the readthedocs CI
120-
conda install --yes --quiet -c pkgs/main mock pillow sphinx sphinx_rtd_theme
121-
displayName: Replicate readthedocs CI environment
122-
- bash: |
123-
source activate xarray-tests
124-
cd doc
125-
sphinx-build -W --keep-going -j auto -b html -d _build/doctrees . _build/html
126-
displayName: Build HTML docs

ci/azure/install.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,37 @@ 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
17+
conda uninstall -y --force \
18+
numpy \
19+
scipy \
20+
pandas \
21+
matplotlib \
22+
dask \
23+
distributed \
24+
zarr \
25+
cftime \
26+
rasterio \
27+
pint \
28+
bottleneck \
29+
sparse
1530
python -m pip install \
16-
-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com \
31+
-i https://pypi.anaconda.org/scipy-wheels-nightly/simple \
1732
--no-deps \
1833
--pre \
1934
--upgrade \
20-
matplotlib \
2135
numpy \
22-
scipy
36+
scipy \
37+
pandas
38+
python -m pip install \
39+
-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com \
40+
--no-deps \
41+
--pre \
42+
--upgrade \
43+
matplotlib
2344
python -m pip install \
2445
--no-deps \
2546
--upgrade \
@@ -29,8 +50,7 @@ steps:
2950
git+https://github.com/Unidata/cftime \
3051
git+https://github.com/mapbox/rasterio \
3152
git+https://github.com/hgrecco/pint \
32-
git+https://github.com/pydata/bottleneck \
33-
git+https://github.com/pandas-dev/pandas
53+
git+https://github.com/pydata/bottleneck
3454
condition: eq(variables['UPSTREAM_DEV'], 'true')
3555
displayName: Install upstream dev dependencies
3656

ci/requirements/doc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ dependencies:
1717
- netcdf4>=1.5
1818
- numba
1919
- numpy>=1.17
20-
- numpydoc
2120
- pandas>=1.0
2221
- rasterio>=1.1
2322
- seaborn
2423
- setuptools
2524
- sphinx>=2.3
2625
- sphinx_rtd_theme>=0.4
27-
- zarr>=2.4
26+
- zarr>=2.4

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ 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
14+
- pint
1515
- pip
1616
- pytest
1717
- pytest-cov

0 commit comments

Comments
 (0)