-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
84 changed files
with
9,187 additions
and
1,057 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# reduce the number of merge conflicts | ||
doc/whats-new.rst merge=union | ||
xarray/_version.py export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,21 +7,20 @@ Time required: about an hour. | |
2. Look over whats-new.rst and the docs. Make sure "What's New" is complete | ||
(check the date!) and add a brief summary note describing the release at the | ||
top. | ||
3. Update the version in setup.py and switch to `ISRELEASED = True`. | ||
4. If you have any doubts, run the full test suite one final time! | ||
3. If you have any doubts, run the full test suite one final time! | ||
py.test | ||
5. On the master branch, commit the release in git: | ||
4. On the master branch, commit the release in git: | ||
git commit -a -m 'Release v0.X.Y' | ||
6. Tag the release: | ||
5. Tag the release: | ||
git tag -a v0.X.Y -m 'v0.X.Y' | ||
7. Build source and binary wheels for pypi: | ||
6. Build source and binary wheels for pypi: | ||
python setup.py bdist_wheel sdist | ||
8. Use twine to register and upload the release on pypi. Be careful, you can't | ||
7. Use twine to register and upload the release on pypi. Be careful, you can't | ||
take this back! | ||
twine upload dist/xarray-0.X.Y* | ||
You will need to be listed as a package owner at | ||
https://pypi.python.org/pypi/xarray for this to work. | ||
9. Push your changes to master: | ||
8. Push your changes to master: | ||
git push upstream master | ||
git push upstream --tags | ||
9. Update the stable branch (used by ReadTheDocs) and switch back to master: | ||
|
@@ -32,25 +31,22 @@ Time required: about an hour. | |
It's OK to force push to 'stable' if necessary. | ||
We also update the stable branch with `git cherrypick` for documentation | ||
only fixes that apply the current released version. | ||
10. Revert ISRELEASED in setup.py back to False. Don't change the version | ||
number: in normal development, we keep the version number in setup.py as the | ||
last released version. | ||
11. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst. | ||
12. Commit your changes and push to master again: | ||
10. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst. | ||
11. Commit your changes and push to master again: | ||
git commit -a -m 'Revert to dev version' | ||
git push upstream master | ||
You're done pushing to master! | ||
13. Issue the release on GitHub. Click on "Draft a new release" at | ||
12. Issue the release on GitHub. Click on "Draft a new release" at | ||
https://github.com/pydata/xarray/releases and paste in the latest from | ||
whats-new.rst. | ||
14. Update the docs. Login to https://readthedocs.org/projects/xray/versions/ | ||
13. Update the docs. Login to https://readthedocs.org/projects/xray/versions/ | ||
and switch your new release tag (at the bottom) from "Inactive" to "Active". | ||
It should now build automatically. | ||
15. Update conda-forge. Clone https://github.com/conda-forge/xarray-feedstock | ||
14. Update conda-forge. Clone https://github.com/conda-forge/xarray-feedstock | ||
and update the version number and sha256 in meta.yaml. (On OS X, you can | ||
calculate sha256 with `shasum -a 256 xarray-0.X.Y.tar.gz`). Submit a pull | ||
request (and merge it, once CI passes). | ||
16. Issue the release announcement! For bug fix releases, I usually only email | ||
15. Issue the release announcement! For bug fix releases, I usually only email | ||
[email protected]. For major/feature releases, I will email a broader | ||
list (no more than once every 3-6 months): | ||
[email protected], [email protected], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
import xarray as xr | ||
|
||
from . import parameterized, randn, requires_dask | ||
|
||
nx = 3000 | ||
long_nx = 30000000 | ||
ny = 2000 | ||
nt = 1000 | ||
window = 20 | ||
|
||
randn_xy = randn((nx, ny), frac_nan=0.1) | ||
randn_xt = randn((nx, nt)) | ||
randn_t = randn((nt, )) | ||
randn_long = randn((long_nx, ), frac_nan=0.1) | ||
|
||
|
||
new_x_short = np.linspace(0.3 * nx, 0.7 * nx, 100) | ||
new_x_long = np.linspace(0.3 * nx, 0.7 * nx, 1000) | ||
new_y_long = np.linspace(0.1, 0.9, 1000) | ||
|
||
|
||
class Interpolation(object): | ||
def setup(self, *args, **kwargs): | ||
self.ds = xr.Dataset( | ||
{'var1': (('x', 'y'), randn_xy), | ||
'var2': (('x', 't'), randn_xt), | ||
'var3': (('t', ), randn_t)}, | ||
coords={'x': np.arange(nx), | ||
'y': np.linspace(0, 1, ny), | ||
't': pd.date_range('1970-01-01', periods=nt, freq='D'), | ||
'x_coords': ('x', np.linspace(1.1, 2.1, nx))}) | ||
|
||
@parameterized(['method', 'is_short'], | ||
(['linear', 'cubic'], [True, False])) | ||
def time_interpolation(self, method, is_short): | ||
new_x = new_x_short if is_short else new_x_long | ||
self.ds.interp(x=new_x, method=method).load() | ||
|
||
@parameterized(['method'], | ||
(['linear', 'nearest'])) | ||
def time_interpolation_2d(self, method): | ||
self.ds.interp(x=new_x_long, y=new_y_long, method=method).load() | ||
|
||
|
||
class InterpolationDask(Interpolation): | ||
def setup(self, *args, **kwargs): | ||
requires_dask() | ||
super(InterpolationDask, self).setup(**kwargs) | ||
self.ds = self.ds.chunk({'t': 50}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ dependencies: | |
- rasterio | ||
- bottleneck | ||
- zarr | ||
- pseudonetcdf>=3.0.1 | ||
- pip: | ||
- coveralls | ||
- pytest-cov | ||
|
Oops, something went wrong.