Skip to content

Commit 401e802

Browse files
authored
Merge pull request #1 from pydata/master
Merge changes since fork
2 parents 7b17b4f + f547ed0 commit 401e802

File tree

188 files changed

+24167
-5421
lines changed

Some content is hidden

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

188 files changed

+24167
-5421
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# reduce the number of merge conflicts
22
doc/whats-new.rst merge=union
3+
xarray/_version.py export-subst

.github/CONTRIBUTING.md

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

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#### Code Sample, a copy-pastable example if possible
22

3+
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you:
4+
http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
5+
36
```python
47
# Your code here
58

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
- [ ] Closes #xxxx (remove if there is no corresponding issue, which should only be the case for minor changes)
22
- [ ] Tests added (for all bug fixes or enhancements)
3-
- [ ] Tests passed (for all non-documentation changes)
43
- [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
*.py[cod]
22
__pycache__
33

4+
# example caches from Hypothesis
5+
.hypothesis/
6+
47
# temp files from docs build
58
doc/auto_gallery
69
doc/example.nc
@@ -33,6 +36,11 @@ pip-log.txt
3336
nosetests.xml
3437
.cache
3538
.ropeproject/
39+
.tags*
40+
.testmon*
41+
.tmontmp/
42+
.pytest_cache
43+
dask-worker-space/
3644

3745
# asv environments
3846
.asv
@@ -45,10 +53,11 @@ nosetests.xml
4553
.project
4654
.pydevproject
4755

48-
# PyCharm and Vim
56+
# IDEs
4957
.idea
5058
*.swp
5159
.DS_Store
60+
.vscode/
5261

5362
# xarray specific
5463
doc/_build

.pep8speaks.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# File : .pep8speaks.yml
2+
3+
scanner:
4+
diff_only: True # If True, errors caused by only the patch are shown
5+
6+
pycodestyle:
7+
max-line-length: 79
8+
ignore: # Errors and warnings to ignore
9+
- E402, # module level import not at top of file
10+
- E731, # do not assign a lambda expression, use a def
11+
- W503 # line break before binary operator
12+
- W504 # line break after binary operator

.travis.yml

Lines changed: 42 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Based on http://conda.pydata.org/docs/travis.html
2-
language: python
2+
language: minimal
33
sudo: false # use container based build
44
notifications:
55
email: false
@@ -10,74 +10,48 @@ branches:
1010
matrix:
1111
fast_finish: true
1212
include:
13-
- python: 2.7
14-
env: CONDA_ENV=py27-min
15-
- python: 2.7
16-
env: CONDA_ENV=py27-cdat+iris+pynio
17-
- python: 3.4
18-
env: CONDA_ENV=py34
19-
- python: 3.5
20-
env: CONDA_ENV=py35
21-
- python: 3.6
22-
env: CONDA_ENV=py36
23-
- python: 3.6
24-
env:
13+
- env: CONDA_ENV=py27-min
14+
- env: CONDA_ENV=py27-cdat+iris+pynio
15+
- env: CONDA_ENV=py35
16+
- env: CONDA_ENV=py36
17+
- env: CONDA_ENV=py37
18+
- env:
2519
- CONDA_ENV=py36
2620
- EXTRA_FLAGS="--run-flaky --run-network-tests"
27-
- python: 3.6
28-
env: CONDA_ENV=py36-netcdf4-dev
21+
- env: CONDA_ENV=py36-netcdf4-dev
2922
addons:
3023
apt_packages:
3124
- libhdf5-serial-dev
3225
- netcdf-bin
3326
- libnetcdf-dev
34-
- python: 3.6
35-
env: CONDA_ENV=py36-dask-dev
36-
- python: 3.6
37-
env: CONDA_ENV=py36-pandas-dev
38-
- python: 3.6
39-
env: CONDA_ENV=py36-bottleneck-dev
40-
- python: 3.6
41-
env: CONDA_ENV=py36-condaforge-rc
42-
- python: 3.6
43-
env: CONDA_ENV=py36-pynio-dev
44-
- python: 3.6
45-
env: CONDA_ENV=py36-rasterio1.0alpha
46-
- python: 3.6
47-
env: CONDA_ENV=py36-zarr-dev
27+
- env: CONDA_ENV=py36-dask-dev
28+
- env: CONDA_ENV=py36-pandas-dev
29+
- env: CONDA_ENV=py36-bottleneck-dev
30+
- env: CONDA_ENV=py36-condaforge-rc
31+
- env: CONDA_ENV=py36-pynio-dev
32+
- env: CONDA_ENV=py36-rasterio-0.36
33+
- env: CONDA_ENV=py36-zarr-dev
34+
- env: CONDA_ENV=docs
35+
- env: CONDA_ENV=py36-hypothesis
36+
4837
allow_failures:
49-
- python: 3.6
50-
env:
38+
- env:
5139
- CONDA_ENV=py36
5240
- EXTRA_FLAGS="--run-flaky --run-network-tests"
53-
- python: 3.6
54-
env: CONDA_ENV=py36-netcdf4-dev
41+
- env: CONDA_ENV=py36-netcdf4-dev
5542
addons:
5643
apt_packages:
5744
- libhdf5-serial-dev
5845
- netcdf-bin
5946
- libnetcdf-dev
60-
- python: 3.6
61-
env: CONDA_ENV=py36-dask-dev
62-
- python: 3.6
63-
env: CONDA_ENV=py36-pandas-dev
64-
- python: 3.6
65-
env: CONDA_ENV=py36-bottleneck-dev
66-
- python: 3.6
67-
env: CONDA_ENV=py36-condaforge-rc
68-
- python: 3.6
69-
env: CONDA_ENV=py36-pynio-dev
70-
- python: 3.6
71-
env: CONDA_ENV=py36-rasterio1.0alpha
72-
- python: 3.6
73-
env: CONDA_ENV=py36-zarr-dev
47+
- env: CONDA_ENV=py36-pandas-dev
48+
- env: CONDA_ENV=py36-bottleneck-dev
49+
- env: CONDA_ENV=py36-condaforge-rc
50+
- env: CONDA_ENV=py36-pynio-dev
51+
- env: CONDA_ENV=py36-zarr-dev
7452

7553
before_install:
76-
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
77-
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh;
78-
else
79-
wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh;
80-
fi
54+
- wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh;
8155
- bash miniconda.sh -b -p $HOME/miniconda
8256
- export PATH="$HOME/miniconda/bin:$PATH"
8357
- hash -r
@@ -86,16 +60,28 @@ before_install:
8660
- conda info -a
8761

8862
install:
89-
- conda env create --file ci/requirements-$CONDA_ENV.yml
63+
- if [[ "$CONDA_ENV" == "docs" ]]; then
64+
conda env create -n test_env --file doc/environment.yml;
65+
else
66+
conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml;
67+
fi
9068
- source activate test_env
9169
- conda list
92-
- python setup.py install
70+
- pip install --no-deps -e .
9371
- python xarray/util/print_versions.py
9472

9573
script:
96-
- flake8 -j auto xarray
74+
- which python
75+
- python --version
9776
- python -OO -c "import xarray"
98-
- py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS
77+
- if [[ "$CONDA_ENV" == "docs" ]]; then
78+
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc;
79+
sphinx-build -n -j auto -b html -d _build/doctrees doc _build/html;
80+
elif [[ "$CONDA_ENV" == "py36-hypothesis" ]]; then
81+
pytest properties ;
82+
else
83+
py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS;
84+
fi
9985

10086
after_success:
10187
- coveralls

HOW_TO_RELEASE

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ Time required: about an hour.
77
2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
88
(check the date!) and add a brief summary note describing the release at the
99
top.
10-
3. Update the version in setup.py and switch to `ISRELEASED = True`.
11-
4. If you have any doubts, run the full test suite one final time!
10+
3. If you have any doubts, run the full test suite one final time!
1211
py.test
13-
5. On the master branch, commit the release in git:
12+
4. On the master branch, commit the release in git:
1413
git commit -a -m 'Release v0.X.Y'
15-
6. Tag the release:
14+
5. Tag the release:
1615
git tag -a v0.X.Y -m 'v0.X.Y'
17-
7. Build source and binary wheels for pypi:
16+
6. Build source and binary wheels for pypi:
17+
git clean -xdf # this deletes all uncommited changes!
1818
python setup.py bdist_wheel sdist
19-
8. Use twine to register and upload the release on pypi. Be careful, you can't
19+
7. Use twine to register and upload the release on pypi. Be careful, you can't
2020
take this back!
2121
twine upload dist/xarray-0.X.Y*
2222
You will need to be listed as a package owner at
2323
https://pypi.python.org/pypi/xarray for this to work.
24-
9. Push your changes to master:
24+
8. Push your changes to master:
2525
git push upstream master
2626
git push upstream --tags
2727
9. Update the stable branch (used by ReadTheDocs) and switch back to master:
@@ -32,25 +32,18 @@ Time required: about an hour.
3232
It's OK to force push to 'stable' if necessary.
3333
We also update the stable branch with `git cherrypick` for documentation
3434
only fixes that apply the current released version.
35-
10. Revert ISRELEASED in setup.py back to False. Don't change the version
36-
number: in normal development, we keep the version number in setup.py as the
37-
last released version.
38-
11. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst.
39-
12. Commit your changes and push to master again:
35+
10. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst.
36+
11. Commit your changes and push to master again:
4037
git commit -a -m 'Revert to dev version'
4138
git push upstream master
4239
You're done pushing to master!
43-
13. Issue the release on GitHub. Click on "Draft a new release" at
44-
https://github.com/pydata/xarray/releases and paste in the latest from
45-
whats-new.rst.
46-
14. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
40+
12. Issue the release on GitHub. Click on "Draft a new release" at
41+
https://github.com/pydata/xarray/releases. Type in the version number, but
42+
don't bother to describe it -- we maintain that on the docs instead.
43+
13. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
4744
and switch your new release tag (at the bottom) from "Inactive" to "Active".
4845
It should now build automatically.
49-
15. Update conda-forge. Clone https://github.com/conda-forge/xarray-feedstock
50-
and update the version number and sha256 in meta.yaml. (On OS X, you can
51-
calculate sha256 with `shasum -a 256 xarray-0.X.Y.tar.gz`). Submit a pull
52-
request (and merge it, once CI passes).
53-
16. Issue the release announcement! For bug fix releases, I usually only email
46+
14. Issue the release announcement! For bug fix releases, I usually only email
5447
[email protected]. For major/feature releases, I will email a broader
5548
list (no more than once every 3-6 months):
5649

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ recursive-include doc *
44
prune doc/_build
55
prune doc/generated
66
global-exclude .DS_Store
7+
include versioneer.py
8+
include xarray/_version.py

README.rst

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ xarray: N-D labeled arrays and datasets
77
:target: https://ci.appveyor.com/project/shoyer/xray
88
.. image:: https://coveralls.io/repos/pydata/xarray/badge.svg
99
:target: https://coveralls.io/r/pydata/xarray
10+
.. image:: https://readthedocs.org/projects/xray/badge/?version=latest
11+
:target: http://xarray.pydata.org/
1012
.. image:: https://img.shields.io/pypi/v/xarray.svg
1113
:target: https://pypi.python.org/pypi/xarray/
1214
.. image:: https://zenodo.org/badge/13221727.svg
1315
:target: https://zenodo.org/badge/latestdoi/13221727
1416
.. image:: http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat
15-
:target: https://tomaugspurger.github.io/asv-collection/xarray/
17+
:target: http://pandas.pydata.org/speed/xarray/
18+
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
19+
:target: http://numfocus.org
1620

1721
**xarray** (formerly **xray**) is an open source project and Python package that aims to bring the
1822
labeled data power of pandas_ to the physical sciences, by providing
@@ -84,6 +88,11 @@ Documentation
8488

8589
The official documentation is hosted on ReadTheDocs at http://xarray.pydata.org/
8690

91+
Contributing
92+
------------
93+
94+
You can find information about contributing to xarray at our `Contributing page <http://xarray.pydata.org/en/latest/contributing.html#>`_.
95+
8796
Get in touch
8897
------------
8998

@@ -96,20 +105,36 @@ Get in touch
96105
.. _mailing list: https://groups.google.com/forum/#!forum/xarray
97106
.. _on GitHub: http://github.com/pydata/xarray
98107

108+
NumFOCUS
109+
--------
110+
111+
.. image:: https://numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png
112+
:scale: 25 %
113+
:target: https://numfocus.org/
114+
115+
Xarray is a fiscally sponsored project of NumFOCUS_, a nonprofit dedicated
116+
to supporting the open source scientific computing community. If you like
117+
Xarray and want to support our mission, please consider making a donation_
118+
to support our efforts.
119+
120+
.. _donation: https://www.flipcause.com/secure/cause_pdetails/NDE2NTU=
121+
99122
History
100123
-------
101124

102125
xarray is an evolution of an internal tool developed at `The Climate
103126
Corporation`__. It was originally written by Climate Corp researchers Stephan
104127
Hoyer, Alex Kleeman and Eugene Brevdo and was released as open source in
105-
May 2014. The project was renamed from "xray" in January 2016.
128+
May 2014. The project was renamed from "xray" in January 2016. Xarray became a
129+
fiscally sponsored project of NumFOCUS_ in August 2018.
106130

107131
__ http://climate.com/
132+
.. _NumFOCUS: https://numfocus.org
108133

109134
License
110135
-------
111136

112-
Copyright 2014-2017, xarray Developers
137+
Copyright 2014-2018, xarray Developers
113138

114139
Licensed under the Apache License, Version 2.0 (the "License");
115140
you may not use this file except in compliance with the License.

asv_bench/asv.conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"netcdf4": [""],
6464
"scipy": [""],
6565
"bottleneck": ["", null],
66-
"dask": ["", null],
66+
"dask": [""],
67+
"distributed": [""],
6768
},
6869

6970

0 commit comments

Comments
 (0)