Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 700 # start with a large number and reduce shortly

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- "[Status] Maybe Later"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically

# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 1 # start with a small number


# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# issues:
# exemptLabels:
# - confirmed
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ script:
- python --version
- python -OO -c "import xarray"
- if [[ "$CONDA_ENV" == "docs" ]]; then
conda install -c conda-forge --override-channels sphinx sphinx_rtd_theme sphinx-gallery numpydoc "gdal>2.2.4";
sphinx-build -n -j auto -b html -d _build/doctrees doc _build/html;
cd doc;
sphinx-build -n -j auto -b html -d _build/doctrees . _build/html;
elif [[ "$CONDA_ENV" == "lint" ]]; then
pycodestyle xarray ;
elif [[ "$CONDA_ENV" == "py36-hypothesis" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions ci/requirements-py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ dependencies:
- pseudonetcdf>=3.0.1
- eccodes
- cdms2
# - pynio # xref #2683
# - iris>=1.10 # xref #2683
# - pynio # xref #2683
# - iris>=1.10 # xref #2683
- pydap
- lxml
- pip:
Expand Down
47 changes: 26 additions & 21 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# serve to show the default.
from __future__ import absolute_import, division, print_function

from contextlib import suppress
import datetime
import importlib
import os
import subprocess
import sys

import xarray
Expand All @@ -24,29 +25,33 @@

print("python exec:", sys.executable)
print("sys.path:", sys.path)
for name in ('numpy scipy pandas matplotlib dask IPython seaborn '
'cartopy netCDF4 rasterio zarr iris flake8 '
'sphinx_gallery cftime').split():
try:
module = importlib.import_module(name)
if name == 'matplotlib':
module.use('Agg')
fname = module.__file__.rstrip('__init__.py')
print("%s: %s, %s" % (name, module.__version__, fname))
except ImportError:
print("no %s" % name)
# neither rasterio nor cartopy should be hard requirements for
# the doc build.
if name == 'rasterio':
allowed_failures.update(['gallery/plot_rasterio_rgb.py',
'gallery/plot_rasterio.py'])
elif name == 'cartopy':
allowed_failures.update(['gallery/plot_cartopy_facetgrid.py',
'gallery/plot_rasterio_rgb.py',
'gallery/plot_rasterio.py'])

if 'conda' in sys.executable:
print('conda environment:')
subprocess.run(['conda', 'list'])
else:
print('pip environment:')
subprocess.run(['pip', 'list'])

print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))

with suppress(ImportError):
import matplotlib
matplotlib.use('Agg')

try:
import rasterio
except ImportError:
allowed_failures.update(['gallery/plot_rasterio_rgb.py',
'gallery/plot_rasterio.py'])

try:
import cartopy
except ImportError:
allowed_failures.update(['gallery/plot_cartopy_facetgrid.py',
'gallery/plot_rasterio_rgb.py',
'gallery/plot_rasterio.py'])

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
29 changes: 16 additions & 13 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ name: xarray-docs
channels:
- conda-forge
dependencies:
- python=3.6
- numpy=1.14.5
- python=3.7
- numpy=1.16.0
- pandas=0.23.3
- scipy=1.1.0
- matplotlib=2.2.2
- scipy=1.2.0
- matplotlib=3.0.2
- seaborn=0.9.0
- dask=0.18.2
- ipython=6.4.0
- netCDF4=1.4.0
- cartopy=0.16.0
- rasterio=1.0.1
- dask=1.1.0
- ipython=7.2.0
- netCDF4=1.4.2
- cartopy=0.17.0
- rasterio=1.0.13
- zarr=2.2.0
- iris=2.1.0
- flake8=3.5.0
- iris=2.2.0
- flake8=3.6.0
- cftime=1.0.3.4
- bottleneck=1.2
- sphinx=1.7.6
- bottleneck=1.2.1
- sphinx=1.8.2
- numpydoc=0.8.0
- sphinx-gallery=0.2.0
- pillow=5.4.1
- sphinx_rtd_theme=0.4.2
- mock=2.0.0
3 changes: 1 addition & 2 deletions doc/examples/multidimensional-coords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ grid, we can take advantage of xarray's ability to apply
ax = plt.axes(projection=ccrs.PlateCarree());
ds.Tair[0].plot.pcolormesh(ax=ax, transform=ccrs.PlateCarree(),
x='xc', y='yc', add_colorbar=False);
ax.coastlines();
@savefig xarray_multidimensional_coords_12_0.png width=100%
plt.tight_layout();
ax.coastlines();

Multidimensional Groupby
------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Vectorized indexing also works with ``isel``, ``loc``, and ``sel``:
ind = xr.DataArray([['a', 'b'], ['b', 'a']], dims=['a', 'b'])
da.loc[:, ind] # same as da.sel(y=ind)

These methods may and also be applied to ``Dataset`` objects
These methods may also be applied to ``Dataset`` objects

.. ipython:: python

Expand Down
12 changes: 11 additions & 1 deletion doc/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ require external libraries and dicts can easily be pickled, or converted to
json, or geojson. All the values are converted to lists, so dicts might
be quite large.

To export just the dataset schema, without the data itself, use the
``data=False`` option:

.. ipython:: python

ds.to_dict(data=False)

This can be useful for generating indices of dataset contents to expose to
search indices or other automated data discovery tools.

.. _io.netcdf:

netCDF
Expand Down Expand Up @@ -665,7 +675,7 @@ To read a consolidated store, pass the ``consolidated=True`` option to
:py:func:`~xarray.open_zarr`::

ds = xr.open_zarr('foo.zarr', consolidated=True)

Xarray can't perform consolidation on pre-existing zarr datasets. This should
be done directly from zarr, as described in the
`zarr docs <https://zarr.readthedocs.io/en/latest/tutorial.html#consolidating-metadata>`_.
Expand Down
6 changes: 2 additions & 4 deletions doc/pandas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __ http://pandas.pydata.org/pandas-docs/stable/visualization.html
__ http://stanford.edu/~mwaskom/software/seaborn/

.. ipython:: python
:suppress:
:suppress:

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -93,7 +93,6 @@ DataFrames:

s = ds['foo'].to_series()
s

# or equivalently, with Series.to_xarray()
xr.DataArray.from_series(s)

Expand Down Expand Up @@ -173,11 +172,10 @@ So you can represent a Panel, in two ways:
Let's take a look:

.. ipython:: python
:okwarning:
:okwarning:

panel = pd.Panel(np.random.rand(2, 3, 4), items=list('ab'), major_axis=list('mno'),
minor_axis=pd.date_range(start='2000', periods=4, name='date'))

panel

As a DataArray:
Expand Down
2 changes: 0 additions & 2 deletions doc/time-series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ core functionality.
import numpy as np
import pandas as pd
import xarray as xr

np.random.seed(123456)

Creating datetime64 data
Expand Down Expand Up @@ -241,7 +240,6 @@ coordinate with dates from a no-leap calendar and a

from itertools import product
from cftime import DatetimeNoLeap

dates = [DatetimeNoLeap(year, month, 1) for year, month in
product(range(1, 3), range(1, 13))]
da = xr.DataArray(np.arange(24), coords=[dates], dims=['time'], name='foo')
Expand Down
27 changes: 25 additions & 2 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ What's New
import xarray as xr
np.random.seed(123456)

.. _whats-new.0.11.3:
.. _whats-new.0.12.0:

v0.11.3 (unreleased)
v0.12.0 (unreleased)
--------------------

Breaking changes
Expand All @@ -28,6 +28,8 @@ Breaking changes
Enhancements
~~~~~~~~~~~~

- Add ``data=False`` option to ``to_dict()`` methods. (:issue:`2656`)
By `Ryan Abernathey <https://github.com/rabernat>`_
- :py:meth:`~xarray.DataArray.coarsen` and
:py:meth:`~xarray.Dataset.coarsen` are newly added.
See :ref:`comput.coarsen` for details.
Expand All @@ -45,18 +47,39 @@ Enhancements
:py:class:`~xarray.CFTimeIndex` is now possible. (:issue:`2191`).
By `Jwen Fai Low <https://github.com/jwenfai>`_ and
`Spencer Clark <https://github.com/spencerkclark>`_.
- :py:func:`xarray.testing.assert_equal` and
:py:func:`xarray.testing.assert_identical` now provide a more detailed
report showing what exactly differs between the two objects (dimensions /
coordinates / variables / attributes) (:issue:`1507`).
By `Benoit Bovy <https://github.com/benbovy>`_.

Bug fixes
~~~~~~~~~

- Silenced warnings that appear when using pandas 0.24.
By `Stephan Hoyer <https://github.com/shoyer>`_
- Interpolating via resample now internally specifies ``bounds_error=False``
as an argument to ``scipy.interpolate.interp1d``, allowing for interpolation
from higher frequencies to lower frequencies. Datapoints outside the bounds
of the original time coordinate are now filled with NaN (:issue:`2197`). By
`Spencer Clark <https://github.com/spencerkclark>`_.

.. _whats-new.0.11.3:

v0.11.3 (26 January 2019)
-------------------------

Bug fixes
~~~~~~~~~

- Saving files with times encoded with reference dates with timezones
(e.g. '2000-01-01T00:00:00-05:00') no longer raises an error
(:issue:`2649`). By `Spencer Clark <https://github.com/spencerkclark>`_.
- Fixed performance regression with ``open_mfdataset`` (:issue:`2662`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Fixed supplying an explicit dimension in the ``concat_dim`` argument to
to ``open_mfdataset`` (:issue:`2647`).
By `Ben Root <https://github.com/WeatherGod>`_.

.. _whats-new.0.11.2:

Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
3 changes: 0 additions & 3 deletions xarray/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# flake8: noqa
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from ._version import get_versions
__version__ = get_versions()['version']
Expand Down
Loading