Skip to content

Commit 1977ba1

Browse files
committed
Merge remote-tracking branch 'origin/master' into open_mfzarr
2 parents 13be3e0 + bdcfab5 commit 1977ba1

File tree

102 files changed

+6426
-3008
lines changed

Some content is hidden

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

102 files changed

+6426
-3008
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"
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
xarray@googlegroups.com. For major/feature releases, I will email a broader
103112
list (no more than once every 3-6 months):
104113
- pydata@googlegroups.com
@@ -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

0 commit comments

Comments
 (0)