|
10 | 10 | import sphinx_autosummary_accessors
|
11 | 11 |
|
12 | 12 | project = "cupy-xarray"
|
13 |
| -copyright = "2022, cupy-xarray developers" |
| 13 | +copyright = "2023, cupy-xarray developers" |
14 | 14 | author = "cupy-xarray developers"
|
15 | 15 | release = "v0.1"
|
16 | 16 |
|
|
20 | 20 | extensions = [
|
21 | 21 | # "sphinx.ext.autodoc",
|
22 | 22 | "sphinx.ext.viewcode",
|
23 |
| - # "sphinx.ext.autosummary", |
| 23 | + "sphinx.ext.autosummary", |
24 | 24 | "sphinx.ext.doctest",
|
25 | 25 | "sphinx.ext.intersphinx",
|
26 | 26 | "sphinx.ext.extlinks",
|
27 | 27 | "numpydoc",
|
28 | 28 | # "sphinx_autosummary_accessors",
|
29 | 29 | "IPython.sphinxext.ipython_directive",
|
| 30 | + "sphinx.ext.napoleon", |
30 | 31 | "myst_nb",
|
| 32 | + # "nbsphinx", |
31 | 33 | "sphinx_copybutton",
|
| 34 | + "sphinx_design", |
32 | 35 | ]
|
33 | 36 |
|
34 | 37 |
|
|
56 | 59 | "cupy": ("https://docs.cupy.dev/en/latest", None),
|
57 | 60 | "xarray": ("http://docs.xarray.dev/en/latest/", None),
|
58 | 61 | }
|
| 62 | + |
| 63 | +autosummary_generate = True |
| 64 | +autodoc_typehints = "none" |
| 65 | + |
| 66 | +# Napoleon configurations |
| 67 | +napoleon_google_docstring = False |
| 68 | +napoleon_numpy_docstring = True |
| 69 | +napoleon_use_param = False |
| 70 | +napoleon_use_rtype = False |
| 71 | +napoleon_preprocess_types = True |
| 72 | +napoleon_type_aliases = { |
| 73 | + # general terms |
| 74 | + "sequence": ":term:`sequence`", |
| 75 | + "iterable": ":term:`iterable`", |
| 76 | + "callable": ":py:func:`callable`", |
| 77 | + "dict_like": ":term:`dict-like <mapping>`", |
| 78 | + "dict-like": ":term:`dict-like <mapping>`", |
| 79 | + "path-like": ":term:`path-like <path-like object>`", |
| 80 | + "mapping": ":term:`mapping`", |
| 81 | + "file-like": ":term:`file-like <file-like object>`", |
| 82 | + # special terms |
| 83 | + # "same type as caller": "*same type as caller*", # does not work, yet |
| 84 | + # "same type as values": "*same type as values*", # does not work, yet |
| 85 | + # stdlib type aliases |
| 86 | + "MutableMapping": "~collections.abc.MutableMapping", |
| 87 | + "sys.stdout": ":obj:`sys.stdout`", |
| 88 | + "timedelta": "~datetime.timedelta", |
| 89 | + "string": ":class:`string <str>`", |
| 90 | + # numpy terms |
| 91 | + "array_like": ":term:`array_like`", |
| 92 | + "array-like": ":term:`array-like <array_like>`", |
| 93 | + "scalar": ":term:`scalar`", |
| 94 | + "array": ":term:`array`", |
| 95 | + "hashable": ":term:`hashable <name>`", |
| 96 | + # matplotlib terms |
| 97 | + "color-like": ":py:func:`color-like <matplotlib.colors.is_color_like>`", |
| 98 | + "matplotlib colormap name": ":doc:`matplotlib colormap name <matplotlib:gallery/color/colormap_reference>`", |
| 99 | + "matplotlib axes object": ":py:class:`matplotlib axes object <matplotlib.axes.Axes>`", |
| 100 | + "colormap": ":py:class:`colormap <matplotlib.colors.Colormap>`", |
| 101 | + # objects without namespace: xarray |
| 102 | + "DataArray": "~xarray.DataArray", |
| 103 | + "Dataset": "~xarray.Dataset", |
| 104 | + "Variable": "~xarray.Variable", |
| 105 | + "DatasetGroupBy": "~xarray.core.groupby.DatasetGroupBy", |
| 106 | + "DataArrayGroupBy": "~xarray.core.groupby.DataArrayGroupBy", |
| 107 | + # objects without namespace: numpy |
| 108 | + "ndarray": "~numpy.ndarray", |
| 109 | + "DaskArray": "~dask.array.Array", |
| 110 | + "MaskedArray": "~numpy.ma.MaskedArray", |
| 111 | + "dtype": "~numpy.dtype", |
| 112 | + "ComplexWarning": "~numpy.ComplexWarning", |
| 113 | + # objects without namespace: pandas |
| 114 | + "Index": "~pandas.Index", |
| 115 | + "MultiIndex": "~pandas.MultiIndex", |
| 116 | + "CategoricalIndex": "~pandas.CategoricalIndex", |
| 117 | + "TimedeltaIndex": "~pandas.TimedeltaIndex", |
| 118 | + "DatetimeIndex": "~pandas.DatetimeIndex", |
| 119 | + "Series": "~pandas.Series", |
| 120 | + "DataFrame": "~pandas.DataFrame", |
| 121 | + "Categorical": "~pandas.Categorical", |
| 122 | + "Path": "~~pathlib.Path", |
| 123 | + # objects with abbreviated namespace (from pandas) |
| 124 | + "pd.Index": "~pandas.Index", |
| 125 | + "pd.NaT": "~pandas.NaT", |
| 126 | +} |
0 commit comments