|
| 1 | +# |
| 2 | +# complexity documentation build configuration file, created by |
| 3 | +# sphinx-quickstart on Tue Jul 9 22:26:36 2013. |
| 4 | +# |
| 5 | +# This file is execfile()d with the current directory set to its containing dir. |
| 6 | +# |
| 7 | +# Note that not all possible configuration values are present in this |
| 8 | +# autogenerated file. |
| 9 | +# |
| 10 | +# All configuration values have a default; values that are commented out |
| 11 | +# serve to show the default. |
| 12 | + |
| 13 | +import datetime |
| 14 | +import os |
| 15 | +import sys |
| 16 | + |
| 17 | +import rasterix |
| 18 | + |
| 19 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 20 | +# add these directories to sys.path here. If the directory is relative to the |
| 21 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 22 | +# sys.path.insert(0, os.path.abspath('.')) |
| 23 | + |
| 24 | +cwd = os.getcwd() |
| 25 | +parent = os.path.dirname(cwd) |
| 26 | +sys.path.insert(0, parent) |
| 27 | + |
| 28 | + |
| 29 | +# -- General configuration ----------------------------------------------------- |
| 30 | +extensions = [ |
| 31 | + "sphinx.ext.autodoc", |
| 32 | + "sphinx.ext.viewcode", |
| 33 | + "sphinx.ext.autosummary", |
| 34 | + "sphinx.ext.intersphinx", |
| 35 | + "sphinx.ext.extlinks", |
| 36 | + "numpydoc", |
| 37 | + "sphinx.ext.napoleon", |
| 38 | + "myst_nb", |
| 39 | + "sphinx_codeautolink", |
| 40 | + "sphinx_remove_toctrees", |
| 41 | +] |
| 42 | + |
| 43 | +codeautolink_concat_default = True |
| 44 | + |
| 45 | +extlinks = { |
| 46 | + "issue": ("https://github.com/dcherian/rasterix/issues/%s", "GH#%s"), |
| 47 | + "pr": ("https://github.com/dcherian/rasterix/pull/%s", "PR#%s"), |
| 48 | +} |
| 49 | + |
| 50 | +templates_path = ["_templates"] |
| 51 | +source_suffix = [".rst"] |
| 52 | +master_doc = "index" |
| 53 | +language = "en" |
| 54 | + |
| 55 | +remove_from_toctrees = ["generated/*"] |
| 56 | + |
| 57 | +# General information about the project. |
| 58 | +project = "rasterix" |
| 59 | +current_year = datetime.datetime.now().year |
| 60 | +copyright = f"2021-{current_year}, rasterix contributors" |
| 61 | +author = "Rasterix Contributors" |
| 62 | + |
| 63 | +# Myst_nb options |
| 64 | +nb_execution_excludepatterns = [] |
| 65 | +nb_execution_raise_on_error = True |
| 66 | +nb_execution_mode = "cache" |
| 67 | + |
| 68 | +# The version info for the project you're documenting, acts as replacement for |
| 69 | +# |version| and |release|, also used in various other places throughout the |
| 70 | +# built documents. |
| 71 | +# The short X.Y version. |
| 72 | +version = rasterix.__version__.split("+")[0] |
| 73 | +# The full version, including alpha/beta/rc tags. |
| 74 | +release = rasterix.__version__ |
| 75 | + |
| 76 | +# List of patterns, relative to source directory, that match files and |
| 77 | +# directories to ignore when looking for source files. |
| 78 | +exclude_patterns = ["_build"] |
| 79 | + |
| 80 | +# The name of the Pygments (syntax highlighting) style to use. |
| 81 | +pygments_style = "igor" |
| 82 | + |
| 83 | + |
| 84 | +# -- Options for HTML output --------------------------------------------------- |
| 85 | + |
| 86 | +html_theme = "furo" |
| 87 | + |
| 88 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 89 | +# further. For a list of options available for each theme, see the |
| 90 | +# documentation. |
| 91 | +css_vars = { |
| 92 | + "admonition-font-size": "0.9rem", |
| 93 | + "font-size--small": "92%", |
| 94 | + "font-size--small--2": "87.5%", |
| 95 | +} |
| 96 | +html_theme_options = dict( |
| 97 | + sidebar_hide_name=True, |
| 98 | + light_css_variables=css_vars, |
| 99 | + dark_css_variables=css_vars, |
| 100 | +) |
| 101 | + |
| 102 | +html_context = { |
| 103 | + "github_user": "dcherian", |
| 104 | + "github_repo": "rasterix", |
| 105 | + "github_version": "main", |
| 106 | + "doc_path": "doc", |
| 107 | +} |
| 108 | +html_title = "rasterix" |
| 109 | +html_static_path = ["_static"] |
| 110 | +html_css_files = ["style.css"] |
| 111 | +htmlhelp_basename = "rasterixdoc" |
| 112 | + |
| 113 | +intersphinx_mapping = { |
| 114 | + "python": ("https://docs.python.org/3/", None), |
| 115 | + "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), |
| 116 | + "numpy": ("https://numpy.org/doc/stable", None), |
| 117 | + "xarray": ("https://docs.xarray.dev/en/stable/", None), |
| 118 | + "xproj": ("https://xproj.readthedocs.io/en/stable/", None), |
| 119 | +} |
| 120 | + |
| 121 | +autosummary_generate = True |
| 122 | +autodoc_typehints = "none" |
| 123 | + |
| 124 | +# Napoleon configurations |
| 125 | +napoleon_google_docstring = False |
| 126 | +napoleon_numpy_docstring = True |
| 127 | +napoleon_use_param = False |
| 128 | +napoleon_use_rtype = False |
| 129 | +napoleon_preprocess_types = True |
| 130 | +napoleon_type_aliases = { |
| 131 | + # general terms |
| 132 | + "sequence": ":term:`sequence`", |
| 133 | + "iterable": ":term:`iterable`", |
| 134 | + "callable": ":py:func:`callable`", |
| 135 | + "dict_like": ":term:`dict-like <mapping>`", |
| 136 | + "dict-like": ":term:`dict-like <mapping>`", |
| 137 | + "path-like": ":term:`path-like <path-like object>`", |
| 138 | + "mapping": ":term:`mapping`", |
| 139 | + "file-like": ":term:`file-like <file-like object>`", |
| 140 | + # special terms |
| 141 | + # "same type as caller": "*same type as caller*", # does not work, yet |
| 142 | + # "same type as values": "*same type as values*", # does not work, yet |
| 143 | + # stdlib type aliases |
| 144 | + "MutableMapping": "~collections.abc.MutableMapping", |
| 145 | + "sys.stdout": ":obj:`sys.stdout`", |
| 146 | + "timedelta": "~datetime.timedelta", |
| 147 | + "string": ":class:`string <str>`", |
| 148 | + # numpy terms |
| 149 | + "array_like": ":term:`array_like`", |
| 150 | + "array-like": ":term:`array-like <array_like>`", |
| 151 | + "scalar": ":term:`scalar`", |
| 152 | + "array": ":term:`array`", |
| 153 | + "hashable": ":term:`hashable <name>`", |
| 154 | + # matplotlib terms |
| 155 | + "color-like": ":py:func:`color-like <matplotlib.colors.is_color_like>`", |
| 156 | + "matplotlib colormap name": ":doc:`matplotlib colormap name <matplotlib:gallery/color/colormap_reference>`", |
| 157 | + "matplotlib axes object": ":py:class:`matplotlib axes object <matplotlib.axes.Axes>`", |
| 158 | + "colormap": ":py:class:`colormap <matplotlib.colors.Colormap>`", |
| 159 | + # objects without namespace: xarray |
| 160 | + "DataArray": "~xarray.DataArray", |
| 161 | + "Dataset": "~xarray.Dataset", |
| 162 | + "Variable": "~xarray.Variable", |
| 163 | + "DatasetGroupBy": "~xarray.core.groupby.DatasetGroupBy", |
| 164 | + "DataArrayGroupBy": "~xarray.core.groupby.DataArrayGroupBy", |
| 165 | + # objects without namespace: numpy |
| 166 | + "ndarray": "~numpy.ndarray", |
| 167 | + "DaskArray": "~dask.array.Array", |
| 168 | + "MaskedArray": "~numpy.ma.MaskedArray", |
| 169 | + "dtype": "~numpy.dtype", |
| 170 | + "ComplexWarning": "~numpy.ComplexWarning", |
| 171 | + # objects without namespace: pandas |
| 172 | + "Index": "~pandas.Index", |
| 173 | + "MultiIndex": "~pandas.MultiIndex", |
| 174 | + "CategoricalIndex": "~pandas.CategoricalIndex", |
| 175 | + "TimedeltaIndex": "~pandas.TimedeltaIndex", |
| 176 | + "DatetimeIndex": "~pandas.DatetimeIndex", |
| 177 | + "Series": "~pandas.Series", |
| 178 | + "DataFrame": "~pandas.DataFrame", |
| 179 | + "Categorical": "~pandas.Categorical", |
| 180 | + "Path": "~~pathlib.Path", |
| 181 | + # objects with abbreviated namespace (from pandas) |
| 182 | + "pd.Index": "~pandas.Index", |
| 183 | + "pd.NaT": "~pandas.NaT", |
| 184 | +} |
0 commit comments