Skip to content

Commit d463b9b

Browse files
authored
Doc fixes/cleanup in anticipation of 0.10.1 release (#1940)
1 parent ec6e160 commit d463b9b

File tree

4 files changed

+56
-42
lines changed

4 files changed

+56
-42
lines changed

doc/conf.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import datetime
2121
import importlib
2222

23-
allowed_failures = []
23+
allowed_failures = set()
2424

2525
print("python exec:", sys.executable)
2626
print("sys.path:", sys.path)
@@ -34,11 +34,15 @@
3434
print("%s: %s, %s" % (name, module.__version__, fname))
3535
except ImportError:
3636
print("no %s" % name)
37+
# neither rasterio nor cartopy should be hard requirements for
38+
# the doc build.
3739
if name == 'rasterio':
38-
# not having rasterio should not break the build process
39-
allowed_failures = ['gallery/plot_rasterio_rgb.py',
40-
'gallery/plot_rasterio.py'
41-
]
40+
allowed_failures.update(['gallery/plot_rasterio_rgb.py',
41+
'gallery/plot_rasterio.py'])
42+
elif name == 'cartopy':
43+
allowed_failures.update(['gallery/plot_cartopy_facetgrid.py',
44+
'gallery/plot_rasterio_rgb.py',
45+
'gallery/plot_rasterio.py'])
4246

4347
import xarray
4448
print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))
@@ -70,7 +74,7 @@
7074
sphinx_gallery_conf = {'examples_dirs': 'gallery',
7175
'gallery_dirs': 'auto_gallery',
7276
'backreferences_dir': False,
73-
'expected_failing_examples': allowed_failures
77+
'expected_failing_examples': list(allowed_failures)
7478
}
7579

7680
autosummary_generate = True

doc/contributing.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ First, you need to have a development environment to be able to build xarray
290290
Building the documentation
291291
~~~~~~~~~~~~~~~~~~~~~~~~~~
292292

293-
In your development environment, install ``sphinx`` and ``sphinx_rtd_theme``::
293+
In your development environment, install ``sphinx``, ``sphinx_rtd_theme``,
294+
``sphinx-gallery`` and ``numpydoc``::
294295

295-
conda install -c anaconda sphinx sphinx_rtd_theme
296+
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc
296297

297298
Navigate to your local ``xarray/doc/`` directory in the console and run::
298299

doc/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Documentation
3535
.. toctree::
3636
:maxdepth: 1
3737

38+
whats-new
3839
why-xarray
3940
faq
4041
examples
@@ -53,7 +54,6 @@ Documentation
5354
api
5455
internals
5556
contributing
56-
whats-new
5757

5858
See also
5959
--------

doc/whats-new.rst

+42-33
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,56 @@ What's New
3030
v0.10.1 (unreleased)
3131
--------------------
3232

33+
The minor release includes a number of bug-fixes and backwards compatible enhancements.
34+
3335
Documentation
3436
~~~~~~~~~~~~~
3537

36-
- Added apply_ufunc example to toy weather data page (:issue:`1844`).
38+
- Added a new guide on :ref:`contributing` (:issue:`640`)
39+
By `Joe Hamman <https://github.com/jhamman>`_.
40+
- Added apply_ufunc example to :ref:`toy weather data` (:issue:`1844`).
3741
By `Liam Brannigan <https://github.com/braaannigan>`_.
3842
- New entry `Why don’t aggregations return Python scalars?` in the
3943
:doc:`faq` (:issue:`1726`).
4044
By `0x0L <https://github.com/0x0L>`_.
41-
- Added a new contributors guide (:issue:`640`)
42-
By `Joe Hamman <https://github.com/jhamman>`_.
4345

4446
Enhancements
4547
~~~~~~~~~~~~
48+
49+
**New functions and methods**:
50+
51+
- Added :py:meth:`DataArray.to_iris` and
52+
:py:meth:`DataArray.from_iris` for
53+
converting data arrays to and from Iris_ Cubes with the same data and coordinates
54+
(:issue:`621` and :issue:`37`).
55+
By `Neil Parley <https://github.com/nparley>`_ and `Duncan Watson-Parris <https://github.com/duncanwp>`_.
56+
- Experimental support for using `Zarr`_ as storage layer for xarray
57+
(:issue:`1223`).
58+
By `Ryan Abernathey <https://github.com/rabernat>`_ and
59+
`Joe Hamman <https://github.com/jhamman>`_.
60+
- New :py:meth:`~xarray.DataArray.rank` on arrays and datasets. Requires
61+
bottleneck (:issue:`1731`).
62+
By `0x0L <https://github.com/0x0L>`_.
63+
- ``.dt`` accessor can now ceil, floor and round timestamps to specified frequency.
64+
By `Deepak Cherian <https://github.com/dcherian>`_.
65+
66+
**Plotting enhancements**:
67+
68+
- :func:`xarray.plot.imshow` now handles RGB and RGBA images.
69+
Saturation can be adjusted with ``vmin`` and ``vmax``, or with ``robust=True``.
70+
By `Zac Hatfield-Dodds <https://github.com/Zac-HD>`_.
71+
- :py:func:`~plot.contourf()` learned to contour 2D variables that have both a
72+
1D coordinate (e.g. time) and a 2D coordinate (e.g. depth as a function of
73+
time) (:issue:`1737`).
74+
By `Deepak Cherian <https://github.com/dcherian>`_.
75+
- :py:func:`~plot()` rotates x-axis ticks if x-axis is time.
76+
By `Deepak Cherian <https://github.com/dcherian>`_.
77+
- :py:func:`~plot.line()` can draw multiple lines if provided with a
78+
2D variable.
79+
By `Deepak Cherian <https://github.com/dcherian>`_.
80+
81+
**Other enhancements**:
82+
4683
- Reduce methods such as :py:func:`DataArray.sum()` now handles object-type array.
4784

4885
.. ipython:: python
@@ -57,39 +94,17 @@ Enhancements
5794
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
5895
- Added nodatavals attribute to DataArray when using :py:func:`~xarray.open_rasterio`. (:issue:`1736`).
5996
By `Alan Snow <https://github.com/snowman2>`_.
60-
- :py:func:`~plot.contourf()` learned to contour 2D variables that have both a
61-
1D co-ordinate (e.g. time) and a 2D co-ordinate (e.g. depth as a function of
62-
time) (:issue:`1737`).
63-
By `Deepak Cherian <https://github.com/dcherian>`_.
64-
- Added :py:meth:`DataArray.to_iris <xray.DataArray.to_iris>` and :py:meth:`DataArray.from_iris <xray.DataArray.from_iris>` for
65-
converting data arrays to and from Iris_ Cubes with the same data and coordinates (:issue:`621` and :issue:`37`).
66-
By `Neil Parley <https://github.com/nparley>`_ and `Duncan Watson-Parris <https://github.com/duncanwp>`_.
6797
- Use ``pandas.Grouper`` class in xarray resample methods rather than the
6898
deprecated ``pandas.TimeGrouper`` class (:issue:`1766`).
6999
By `Joe Hamman <https://github.com/jhamman>`_.
70-
- Support for using `Zarr`_ as storage layer for xarray. (:issue:`1223`).
71-
By `Ryan Abernathey <https://github.com/rabernat>`_ and
72-
`Joe Hamman <https://github.com/jhamman>`_.
73-
- Support for using `Zarr`_ as storage layer for xarray.
74-
By `Ryan Abernathey <https://github.com/rabernat>`_.
75-
- :func:`xarray.plot.imshow` now handles RGB and RGBA images.
76-
Saturation can be adjusted with ``vmin`` and ``vmax``, or with ``robust=True``.
77-
By `Zac Hatfield-Dodds <https://github.com/Zac-HD>`_.
78100
- Experimental support for parsing ENVI metadata to coordinates and attributes
79101
in :py:func:`xarray.open_rasterio`.
80102
By `Matti Eskelinen <https://github.com/maaleske>`_.
81-
- :py:func:`~plot()` learned to rotate x-axis ticks if x-axis is time.
82-
By `Deepak Cherian <https://github.com/dcherian>`_.
83-
- :py:func:`~plot.line()` learned to draw multiple lines if provided with a
84-
2D variable.
85-
By `Deepak Cherian <https://github.com/dcherian>`_.
86103
- Reduce memory usage when decoding a variable with a scale_factor, by
87104
converting 8-bit and 16-bit integers to float32 instead of float64
88105
(:pull:`1840`), and keeping float16 and float32 as float32 (:issue:`1842`).
89106
Correspondingly, encoded variables may also be saved with a smaller dtype.
90107
By `Zac Hatfield-Dodds <https://github.com/Zac-HD>`_.
91-
- `.dt` accessor can now ceil, floor and round timestamps to specified frequency.
92-
By `Deepak Cherian <https://github.com/dcherian>`_.
93108
- Speed of reindexing/alignment with dask array is orders of magnitude faster
94109
when inserting missing values (:issue:`1847`).
95110
By `Stephan Hoyer <https://github.com/shoyer>`_.
@@ -104,12 +119,6 @@ Enhancements
104119

105120
.. _Iris: http://scitools.org.uk/iris
106121

107-
**New functions/methods**
108-
109-
- New :py:meth:`~xarray.DataArray.rank` on arrays and datasets. Requires
110-
bottleneck (:issue:`1731`).
111-
By `0x0L <https://github.com/0x0L>`_.
112-
113122
Bug fixes
114123
~~~~~~~~~
115124
- Support indexing with a 0d-np.ndarray (:issue:`1921`).
@@ -138,7 +147,7 @@ Bug fixes
138147
with size one in some dimension can now be plotted, which is good for
139148
exploring satellite imagery (:issue:`1780`).
140149
By `Zac Hatfield-Dodds <https://github.com/Zac-HD>`_.
141-
- Fixed ``UnboundLocalError`` when opening netCDF file `` (:issue:`1781`).
150+
- Fixed ``UnboundLocalError`` when opening netCDF file (:issue:`1781`).
142151
By `Stephan Hoyer <https://github.com/shoyer>`_.
143152
- The ``variables``, ``attrs``, and ``dimensions`` properties have been
144153
deprecated as part of a bug fix addressing an issue where backends were
@@ -167,7 +176,7 @@ Bug fixes
167176
match pandas (:issue:`1847`). A combination of strings/numbers or
168177
unicode/bytes now promote to object dtype, instead of strings or unicode.
169178
By `Stephan Hoyer <https://github.com/shoyer>`_.
170-
- Fixed bug where :py:meth:`~xarray.DataArray.isnull` was loading data
179+
- Fixed bug where :py:meth:`~xarray.DataArray.isnull` was loading data
171180
stored as dask arrays (:issue:`1937`).
172181
By `Joe Hamman <https://github.com/jhamman>`_.
173182

0 commit comments

Comments
 (0)