Skip to content

Commit 4c51aa2

Browse files
keewisdcherian
authored andcommitted
Silence sphinx warnings: Round 2 (#3592)
* remove the sections from the quantile examples sphinx' doctest extension does not work too well with them. * remove the attributes section from DataArray's docstring * fix author error issues * remove the newline in the GroupBy.quantile examples this will probably make doctest fail but it fixes the sphinx warnings. * fix a few more links * CI: disable nit-picky warnings and fail on new warnings
1 parent 87a25b6 commit 4c51aa2

File tree

5 files changed

+8
-34
lines changed

5 files changed

+8
-34
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ jobs:
110110
- bash: |
111111
source activate xarray-tests
112112
cd doc
113-
sphinx-build -n -j auto -b html -d _build/doctrees . _build/html
113+
sphinx-build -W --keep-going -j auto -b html -d _build/doctrees . _build/html
114114
displayName: Build HTML docs

doc/whats-new.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ New Features
3030
By `Deepak Cherian <https://github.com/dcherian>`_.
3131
- Added the :py:meth:`count` reduction method to both :py:class:`DatasetCoarsen`
3232
and :py:class:`DataArrayCoarsen` objects. (:pull:`3500`)
33-
By `Deepak Cherian <https://github.com/dcherian/>`_
33+
By `Deepak Cherian <https://github.com/dcherian>`_
3434

3535
Bug fixes
3636
~~~~~~~~~
@@ -42,17 +42,17 @@ Documentation
4242
- Switch doc examples to use nbsphinx and replace sphinx_gallery with
4343
notebook.
4444
(:pull:`3105`, :pull:`3106`, :pull:`3121`)
45-
By `Ryan Abernathey <https://github.com/rabernat>`
45+
By `Ryan Abernathey <https://github.com/rabernat>`_
4646
- Added example notebook demonstrating use of xarray with Regional Ocean
4747
Modeling System (ROMS) ocean hydrodynamic model output.
4848
(:pull:`3116`).
49-
By `Robert Hetland <https://github.com/hetland>`
49+
By `Robert Hetland <https://github.com/hetland>`_
5050
- Added example notebook demonstrating the visualization of ERA5 GRIB
5151
data. (:pull:`3199`)
52-
By `Zach Bruick <https://github.com/zbruick>` and
53-
`Stephan Siemen <https://github.com/StephanSiemen>`
54-
- Added examples for `DataArray.quantile`, `Dataset.quantile` and
55-
`GroupBy.quantile`. (:pull:`3576`)
52+
By `Zach Bruick <https://github.com/zbruick>`_ and
53+
`Stephan Siemen <https://github.com/StephanSiemen>`_
54+
- Added examples for :py:meth:`DataArray.quantile`, :py:meth:`Dataset.quantile` and
55+
``GroupBy.quantile``. (:pull:`3576`)
5656
By `Justus Magin <https://github.com/keewis>`_.
5757

5858
Internal Changes

xarray/core/dataarray.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,6 @@ class DataArray(AbstractArray, DataWithCoords):
235235
236236
Getting items from or doing mathematical operations with a DataArray
237237
always returns another DataArray.
238-
239-
Attributes
240-
----------
241-
dims : tuple
242-
Dimension names associated with this array.
243-
values : numpy.ndarray
244-
Access or modify DataArray values as a numpy array.
245-
coords : dict-like
246-
Dictionary of DataArray objects that label values along each dimension.
247-
name : str or None
248-
Name of this array.
249-
attrs : dict
250-
Dictionary for holding arbitrary metadata.
251238
"""
252239

253240
_cache: Dict[str, Any]
@@ -3000,8 +2987,6 @@ def quantile(
30002987
... coords={"x": [7, 9], "y": [1, 1.5, 2, 2.5]},
30012988
... dims=("x", "y"),
30022989
... )
3003-
3004-
Single quantile
30052990
>>> da.quantile(0) # or da.quantile(0, dim=...)
30062991
<xarray.DataArray ()>
30072992
array(0.7)
@@ -3013,8 +2998,6 @@ def quantile(
30132998
Coordinates:
30142999
* y (y) float64 1.0 1.5 2.0 2.5
30153000
quantile float64 0.0
3016-
3017-
Multiple quantiles
30183001
>>> da.quantile([0, 0.5, 1])
30193002
<xarray.DataArray (quantile: 3)>
30203003
array([0.7, 3.4, 9.4])

xarray/core/dataset.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5167,8 +5167,6 @@ def quantile(
51675167
... {"a": (("x", "y"), [[0.7, 4.2, 9.4, 1.5], [6.5, 7.3, 2.6, 1.9]])},
51685168
... coords={"x": [7, 9], "y": [1, 1.5, 2, 2.5]},
51695169
... )
5170-
5171-
Single quantile
51725170
>>> ds.quantile(0) # or ds.quantile(0, dim=...)
51735171
<xarray.Dataset>
51745172
Dimensions: ()
@@ -5184,8 +5182,6 @@ def quantile(
51845182
quantile float64 0.0
51855183
Data variables:
51865184
a (y) float64 0.7 4.2 2.6 1.5
5187-
5188-
Multiple quantiles
51895185
>>> ds.quantile([0, 0.5, 1])
51905186
<xarray.Dataset>
51915187
Dimensions: (quantile: 3)

xarray/core/groupby.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,6 @@ def quantile(self, q, dim=None, interpolation="linear", keep_attrs=None):
607607
... dims=("y", "y"),
608608
... )
609609
>>> ds = xr.Dataset({"a": da})
610-
611-
Single quantile
612610
>>> da.groupby("x").quantile(0)
613611
<xarray.DataArray (x: 2, y: 4)>
614612
array([[0.7, 4.2, 0.7, 1.5],
@@ -625,15 +623,12 @@ def quantile(self, q, dim=None, interpolation="linear", keep_attrs=None):
625623
* y (y) int64 1 2
626624
Data variables:
627625
a (y) float64 0.7 0.7
628-
629-
Multiple quantiles
630626
>>> da.groupby("x").quantile([0, 0.5, 1])
631627
<xarray.DataArray (x: 2, y: 4, quantile: 3)>
632628
array([[[0.7 , 1. , 1.3 ],
633629
[4.2 , 6.3 , 8.4 ],
634630
[0.7 , 5.05, 9.4 ],
635631
[1.5 , 4.2 , 6.9 ]],
636-
637632
[[6.5 , 6.5 , 6.5 ],
638633
[7.3 , 7.3 , 7.3 ],
639634
[2.6 , 2.6 , 2.6 ],

0 commit comments

Comments
 (0)