Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence sphinx warnings #4286

Merged
merged 57 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2d617e7
generate documentation for the a few missing CFTimeIndex attributes
keewis Jun 4, 2020
edae8bc
properly use continuation lines
keewis Jun 9, 2020
c9c6a95
add a missing quote
keewis Jul 26, 2020
b7794bd
delete the note about the removed auto_combine
keewis Jul 26, 2020
66ed0e0
replace auto_combine with combine_by_coords
keewis Jul 26, 2020
04b9cc8
set the current module in dask.rst
keewis Jul 26, 2020
d56a9f5
fix some links in whats-new.rst and generate doc pages for the plot f…
keewis Jul 26, 2020
8bb0a47
add the new CFTimeIndex methods to api-hidden
keewis Jul 26, 2020
3a8f318
don't link to CFTimeIndex.__repr__
keewis Jul 26, 2020
d997769
don't try to link to the datetime accessor
keewis Jul 26, 2020
baab87b
fix a few more docstrings
keewis Jul 26, 2020
f174f76
remove the non-html options (which are rarely used?) and silence flake8
keewis Jul 26, 2020
1f36ca4
add type aliases
keewis Jul 26, 2020
b76cb75
map ComplexWarning to numpy.ComplexWarning
keewis Jul 26, 2020
05e204e
fix more docstrings
keewis Jul 26, 2020
66caef9
add some missing methods and properties to api-hidden
keewis Jul 26, 2020
a7daa90
more aliases
keewis Jul 29, 2020
3881799
fix a few more docstrings
keewis Jul 29, 2020
3fdab8f
properly reference ... (Ellipsis)
keewis Jul 31, 2020
b67c280
update the docstrings of dataset
keewis Jul 31, 2020
09576d3
update the docstrings of DataArray
keewis Jul 31, 2020
4c797eb
remove the references to CFTimeOffset
keewis Jul 31, 2020
bf1c433
fix a lot more docstrings
keewis Jul 31, 2020
4a49002
fix even more docstrings
keewis Aug 1, 2020
c5d1a24
Merge branch 'master' into silence-sphinx-warnings
keewis Aug 6, 2020
f8245b8
remove a few more workarounds for a sphinx bug
keewis Aug 8, 2020
b616c40
Merge branch 'master' into silence-sphinx-warnings
keewis Aug 8, 2020
0e6d57b
use sphinx version 3.2
keewis Aug 8, 2020
ac569e3
Merge branch 'master' into silence-sphinx-warnings
keewis Aug 9, 2020
bc7177f
remove a few misspellings of bool and optional
keewis Aug 11, 2020
089797b
Merge branch 'master' into silence-sphinx-warnings
keewis Aug 11, 2020
be3015a
fix more docstrings
keewis Aug 11, 2020
1d384b3
more fixes
keewis Aug 11, 2020
18af38e
remove the mixed markup since it is not supported by the preprocessor
keewis Aug 11, 2020
45d4702
use double instead of single quotes in docstrings
keewis Aug 11, 2020
373fd3f
make sure the standard default notation is used everywhere
keewis Aug 11, 2020
a2fd268
add a missing end quote
keewis Aug 11, 2020
13e0f3d
don't use nested parameter definition lists
keewis Aug 12, 2020
9b08bbf
update some outdated links to the pandas docs
keewis Aug 12, 2020
2b26561
update some more docstrings
keewis Aug 12, 2020
28ae240
mark a parameter as optional
keewis Aug 12, 2020
836cf80
more docstrings
keewis Aug 12, 2020
939793c
use code blocks instead of literal blocks with doctest lines
keewis Aug 12, 2020
a0230b6
add back a removed colon
keewis Aug 12, 2020
e000be1
convert the glossary page to a sphinx glossary
keewis Aug 12, 2020
f3546fc
add term descriptions for names and scalars
keewis Aug 12, 2020
74086d7
preprocess types but don't use :param:
keewis Aug 12, 2020
9a74495
link to the terms
keewis Aug 12, 2020
f1731ec
don't try to link to the repr method
keewis Aug 12, 2020
f299eec
update the definition of scalar according to the review
keewis Aug 13, 2020
0f6641b
Update doc/terminology.rst
keewis Aug 14, 2020
055b0ba
Update doc/terminology.rst
keewis Aug 14, 2020
1e10430
Merge branch 'master' into silence-sphinx-warnings
dcherian Aug 15, 2020
b865041
Merge branch 'master' into silence-sphinx-warnings
dcherian Aug 19, 2020
292d7e4
Merge branch 'master' into silence-sphinx-warnings
keewis Aug 19, 2020
bb51167
fix a bad merge
keewis Aug 19, 2020
419dd01
fix the docstring of cftime_range
keewis Aug 19, 2020
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
2 changes: 1 addition & 1 deletion ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
- rasterio>=1.1
- seaborn
- setuptools
- sphinx=3.1
- sphinx=3.2
- sphinx_rtd_theme>=0.4
- sphinx-autosummary-accessors
- zarr>=2.4
55 changes: 55 additions & 0 deletions doc/api-hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
core.rolling.DatasetCoarsen.var
core.rolling.DatasetCoarsen.boundary
core.rolling.DatasetCoarsen.coord_func
core.rolling.DatasetCoarsen.keep_attrs
core.rolling.DatasetCoarsen.obj
core.rolling.DatasetCoarsen.side
core.rolling.DatasetCoarsen.trim_excess
Expand Down Expand Up @@ -104,6 +105,8 @@
core.resample.DatasetResample.dims
core.resample.DatasetResample.groups

core.rolling.DatasetRolling.argmax
core.rolling.DatasetRolling.argmin
core.rolling.DatasetRolling.count
core.rolling.DatasetRolling.max
core.rolling.DatasetRolling.mean
Expand All @@ -115,11 +118,15 @@
core.rolling.DatasetRolling.var
core.rolling.DatasetRolling.center
core.rolling.DatasetRolling.dim
core.rolling.DatasetRolling.keep_attrs
core.rolling.DatasetRolling.min_periods
core.rolling.DatasetRolling.obj
core.rolling.DatasetRolling.rollings
core.rolling.DatasetRolling.window

core.weighted.DatasetWeighted.obj
core.weighted.DatasetWeighted.weights

core.rolling_exp.RollingExp.mean

Dataset.argsort
Expand Down Expand Up @@ -188,6 +195,7 @@
core.rolling.DataArrayCoarsen.var
core.rolling.DataArrayCoarsen.boundary
core.rolling.DataArrayCoarsen.coord_func
core.rolling.DataArrayCoarsen.keep_attrs
core.rolling.DataArrayCoarsen.obj
core.rolling.DataArrayCoarsen.side
core.rolling.DataArrayCoarsen.trim_excess
Expand Down Expand Up @@ -238,6 +246,8 @@
core.resample.DataArrayResample.dims
core.resample.DataArrayResample.groups

core.rolling.DataArrayRolling.argmax
core.rolling.DataArrayRolling.argmin
core.rolling.DataArrayRolling.count
core.rolling.DataArrayRolling.max
core.rolling.DataArrayRolling.mean
Expand All @@ -249,11 +259,15 @@
core.rolling.DataArrayRolling.var
core.rolling.DataArrayRolling.center
core.rolling.DataArrayRolling.dim
core.rolling.DataArrayRolling.keep_attrs
core.rolling.DataArrayRolling.min_periods
core.rolling.DataArrayRolling.obj
core.rolling.DataArrayRolling.window
core.rolling.DataArrayRolling.window_labels

core.weighted.DataArrayWeighted.obj
core.weighted.DataArrayWeighted.weights

DataArray.argsort
DataArray.clip
DataArray.conj
Expand All @@ -277,6 +291,13 @@
core.accessor_dt.DatetimeAccessor.days_in_month
core.accessor_dt.DatetimeAccessor.daysinmonth
core.accessor_dt.DatetimeAccessor.hour
core.accessor_dt.DatetimeAccessor.is_leap_year
core.accessor_dt.DatetimeAccessor.is_month_end
core.accessor_dt.DatetimeAccessor.is_month_start
core.accessor_dt.DatetimeAccessor.is_quarter_end
core.accessor_dt.DatetimeAccessor.is_quarter_start
core.accessor_dt.DatetimeAccessor.is_year_end
core.accessor_dt.DatetimeAccessor.is_year_start
core.accessor_dt.DatetimeAccessor.microsecond
core.accessor_dt.DatetimeAccessor.minute
core.accessor_dt.DatetimeAccessor.month
Expand All @@ -291,6 +312,14 @@
core.accessor_dt.DatetimeAccessor.weekofyear
core.accessor_dt.DatetimeAccessor.year

core.accessor_dt.TimedeltaAccessor.ceil
core.accessor_dt.TimedeltaAccessor.floor
core.accessor_dt.TimedeltaAccessor.round
core.accessor_dt.TimedeltaAccessor.days
core.accessor_dt.TimedeltaAccessor.microseconds
core.accessor_dt.TimedeltaAccessor.nanoseconds
core.accessor_dt.TimedeltaAccessor.seconds

core.accessor_str.StringAccessor.capitalize
core.accessor_str.StringAccessor.center
core.accessor_str.StringAccessor.contains
Expand Down Expand Up @@ -365,6 +394,7 @@
Variable.min
Variable.no_conflicts
Variable.notnull
Variable.pad
Variable.prod
Variable.quantile
Variable.rank
Expand Down Expand Up @@ -407,6 +437,8 @@

IndexVariable.all
IndexVariable.any
IndexVariable.argmax
IndexVariable.argmin
IndexVariable.argsort
IndexVariable.astype
IndexVariable.broadcast_equals
Expand Down Expand Up @@ -436,6 +468,7 @@
IndexVariable.min
IndexVariable.no_conflicts
IndexVariable.notnull
IndexVariable.pad
IndexVariable.prod
IndexVariable.quantile
IndexVariable.rank
Expand Down Expand Up @@ -538,6 +571,16 @@
ufuncs.tanh
ufuncs.trunc

plot.plot
plot.line
plot.step
plot.hist
plot.contour
plot.contourf
plot.imshow
plot.pcolormesh
plot.scatter

plot.FacetGrid.map_dataarray
plot.FacetGrid.set_titles
plot.FacetGrid.set_ticks
Expand All @@ -547,11 +590,16 @@
CFTimeIndex.any
CFTimeIndex.append
CFTimeIndex.argsort
CFTimeIndex.argmax
CFTimeIndex.argmin
CFTimeIndex.asof
CFTimeIndex.asof_locs
CFTimeIndex.astype
CFTimeIndex.calendar
CFTimeIndex.ceil
CFTimeIndex.contains
CFTimeIndex.copy
CFTimeIndex.days_in_month
CFTimeIndex.delete
CFTimeIndex.difference
CFTimeIndex.drop
Expand All @@ -562,6 +610,7 @@
CFTimeIndex.equals
CFTimeIndex.factorize
CFTimeIndex.fillna
CFTimeIndex.floor
CFTimeIndex.format
CFTimeIndex.get_indexer
CFTimeIndex.get_indexer_for
Expand Down Expand Up @@ -602,6 +651,7 @@
CFTimeIndex.reindex
CFTimeIndex.rename
CFTimeIndex.repeat
CFTimeIndex.round
CFTimeIndex.searchsorted
CFTimeIndex.set_names
CFTimeIndex.set_value
Expand Down Expand Up @@ -688,15 +738,20 @@
backends.NetCDF4DataStore.is_remote
backends.NetCDF4DataStore.lock

backends.H5NetCDFStore.autoclose
backends.H5NetCDFStore.close
backends.H5NetCDFStore.encode
backends.H5NetCDFStore.encode_attribute
backends.H5NetCDFStore.encode_variable
backends.H5NetCDFStore.format
backends.H5NetCDFStore.get_attrs
backends.H5NetCDFStore.get_dimensions
backends.H5NetCDFStore.get_encoding
backends.H5NetCDFStore.get_variables
backends.H5NetCDFStore.is_remote
backends.H5NetCDFStore.load
backends.H5NetCDFStore.lock
backends.H5NetCDFStore.open
backends.H5NetCDFStore.open_store_variable
backends.H5NetCDFStore.prepare_variable
backends.H5NetCDFStore.set_attribute
Expand Down
10 changes: 0 additions & 10 deletions doc/combining.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,6 @@ in this manner.
Combining along multiple dimensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. note::

There are currently three combining functions with similar names:
:py:func:`~xarray.auto_combine`, :py:func:`~xarray.combine_by_coords`, and
:py:func:`~xarray.combine_nested`. This is because
``auto_combine`` is in the process of being deprecated in favour of the other
two functions, which are more general. If your code currently relies on
``auto_combine``, then you will be able to get similar functionality by using
``combine_nested``.

For combining many objects along multiple dimensions xarray provides
:py:func:`~xarray.combine_nested` and :py:func:`~xarray.combine_by_coords`. These
functions use a combination of ``concat`` and ``merge`` across different
Expand Down
82 changes: 66 additions & 16 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,58 @@
autosummary_generate = True
autodoc_typehints = "none"

napoleon_use_param = True
napoleon_use_param = False
napoleon_use_rtype = True
napoleon_preprocess_types = True
napoleon_type_aliases = {
# general terms
"sequence": ":term:`sequence`",
"iterable": ":term:`iterable`",
"callable": ":py:func:`callable`",
"dict_like": ":term:`dict-like <mapping>`",
"dict-like": ":term:`dict-like <mapping>`",
"mapping": ":term:`mapping`",
"file-like": ":term:`file-like <file-like object>`",
# special terms
# "same type as caller": "*same type as caller*", # does not work, yet
# "same type as values": "*same type as values*", # does not work, yet
# stdlib type aliases
"MutableMapping": "~collections.abc.MutableMapping",
"sys.stdout": ":obj:`sys.stdout`",
"timedelta": "~datetime.timedelta",
"string": ":class:`string <str>`",
# numpy terms
"array_like": ":term:`array_like`",
"array-like": ":term:`array-like <array_like>`",
"scalar": ":term:`scalar`",
"array": ":term:`array`",
"hashable": ":term:`hashable <name>`",
# matplotlib terms
"color-like": ":py:func:`color-like <matplotlib.colors.is_color_like>`",
"matplotlib colormap name": ":doc:matplotlib colormap name <Colormap reference>",
"matplotlib axes object": ":py:class:`matplotlib axes object <matplotlib.axes.Axes>`",
"colormap": ":py:class:`colormap <matplotlib.colors.Colormap>`",
# objects without namespace
"DataArray": "~xarray.DataArray",
"Dataset": "~xarray.Dataset",
"Variable": "~xarray.Variable",
"ndarray": "~numpy.ndarray",
"MaskedArray": "~numpy.ma.MaskedArray",
"dtype": "~numpy.dtype",
"ComplexWarning": "~numpy.ComplexWarning",
"Index": "~pandas.Index",
"MultiIndex": "~pandas.MultiIndex",
"CategoricalIndex": "~pandas.CategoricalIndex",
"TimedeltaIndex": "~pandas.TimedeltaIndex",
"DatetimeIndex": "~pandas.DatetimeIndex",
"Series": "~pandas.Series",
"DataFrame": "~pandas.DataFrame",
"Categorical": "~pandas.Categorical",
"Path": "~~pathlib.Path",
# objects with abbreviated namespace (from pandas)
"pd.Index": "~pandas.Index",
"pd.NaT": "~pandas.NaT",
}

numpydoc_class_members_toctree = True
numpydoc_show_class_members = False
Expand Down Expand Up @@ -284,9 +334,9 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
("index", "xarray.tex", "xarray Documentation", "xarray Developers", "manual")
]
# latex_documents = [
# ("index", "xarray.tex", "xarray Documentation", "xarray Developers", "manual")
# ]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
Expand All @@ -313,7 +363,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "xarray", "xarray Documentation", ["xarray Developers"], 1)]
# man_pages = [("index", "xarray", "xarray Documentation", ["xarray Developers"], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -324,17 +374,17 @@
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
"index",
"xarray",
"xarray Documentation",
"xarray Developers",
"xarray",
"N-D labeled arrays and datasets in Python.",
"Miscellaneous",
)
]
# texinfo_documents = [
# (
# "index",
# "xarray",
# "xarray Documentation",
# "xarray Developers",
# "xarray",
# "N-D labeled arrays and datasets in Python.",
# "Miscellaneous",
# )
# ]

# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
Expand Down
4 changes: 3 additions & 1 deletion doc/dask.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. currentmodule:: xarray

.. _dask:

Parallel computing with Dask
Expand Down Expand Up @@ -90,7 +92,7 @@ use :py:func:`~xarray.open_mfdataset`::
xr.open_mfdataset('my/files/*.nc', parallel=True)

This function will automatically concatenate and merge datasets into one in
the simple cases that it understands (see :py:func:`~xarray.auto_combine`
the simple cases that it understands (see :py:func:`~xarray.combine_by_coords`
dcherian marked this conversation as resolved.
Show resolved Hide resolved
for the full disclaimer). By default, :py:meth:`~xarray.open_mfdataset` will chunk each
netCDF file into a single Dask array; again, supply the ``chunks`` argument to
control the size of the resulting Dask arrays. In more complex cases, you can
Expand Down
Loading