|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | +# |
| 7 | + |
| 8 | +import datetime |
| 9 | +from importlib.metadata import version as get_version |
| 10 | + |
| 11 | +# -- Path setup -------------------------------------------------------------- |
| 12 | + |
| 13 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 14 | +# add these directories to sys.path here. If the directory is relative to the |
| 15 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 16 | +# |
| 17 | +# import os |
| 18 | +# import sys |
| 19 | +# sys.path.insert(0, os.path.abspath('.')) |
| 20 | + |
| 21 | +# General information about the project. |
| 22 | +project = "xarray-regrid" |
| 23 | +current_year = datetime.datetime.now().year |
| 24 | +copyright = f"2023-{current_year}, Bart Schilperoort" |
| 25 | +author = "Bart Schilperoort" |
| 26 | + |
| 27 | +# The version info for the project you're documenting, acts as replacement for |
| 28 | +# |version| and |release|, also used in various other places throughout the |
| 29 | +# built documents. |
| 30 | + |
| 31 | +# The version info for the project you're documenting, acts as replacement for |
| 32 | +# |version| and |release|, also used in various other places throughout the |
| 33 | +# built documents. |
| 34 | +# The short X.Y version. |
| 35 | +version = get_version("xarray_regrid").split("+")[0] |
| 36 | +# The full version, including alpha/beta/rc tags. |
| 37 | +release = get_version("xarray_regrid") |
| 38 | + |
| 39 | +# -- General configuration ------------------------------------------------ |
| 40 | + |
| 41 | +# Add any Sphinx extension module names here, as strings. They can be |
| 42 | +# extensions coming with Sphinx (named "sphinx.ext.*") or your custom |
| 43 | +# ones. |
| 44 | +extensions = [ |
| 45 | + "sphinx.ext.autodoc", |
| 46 | + "sphinx.ext.coverage", |
| 47 | + "sphinx.ext.doctest", |
| 48 | + "sphinx.ext.intersphinx", |
| 49 | + "sphinx.ext.mathjax", |
| 50 | + "sphinx.ext.napoleon", |
| 51 | + "sphinx.ext.todo", |
| 52 | + "sphinx.ext.viewcode", |
| 53 | + "autoapi.extension", |
| 54 | + #"myst_parser", |
| 55 | + "myst_nb", |
| 56 | +] |
| 57 | + |
| 58 | +extlinks = { |
| 59 | + "issue": ("https://github.com/excited-CO2/xarray-regrid/issues/%s", "GH#%s"), |
| 60 | + "pr": ("https://github.com/excited-CO2/xarray-regrid/pull/%s", "PR#%s"), |
| 61 | +} |
| 62 | + |
| 63 | +# Add any paths that contain templates here, relative to this directory. |
| 64 | +templates_path = ["_templates"] |
| 65 | + |
| 66 | +# List of patterns, relative to source directory, that match files and |
| 67 | +# directories to ignore when looking for source files. |
| 68 | +# This patterns also effect to html_static_path and html_extra_path |
| 69 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "data"] |
| 70 | + |
| 71 | +# If true, `todo` and `todoList` produce output, else they produce nothing. |
| 72 | +todo_include_todos = False |
| 73 | + |
| 74 | +# Myst_nb options |
| 75 | +nb_execution_mode = "off" |
| 76 | + |
| 77 | +# -- Use autoapi.extension to run sphinx-apidoc ------- |
| 78 | + |
| 79 | +autoapi_dirs = ["../src"] |
| 80 | + |
| 81 | +# -- Options for HTML output ---------------------------------------------- |
| 82 | + |
| 83 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 84 | +# a list of builtin themes. |
| 85 | +# |
| 86 | +html_theme = "sphinx_rtd_theme" |
| 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 | +# |
| 92 | +# html_theme_options = {} |
| 93 | + |
| 94 | +# Custom sidebar templates, must be a dictionary that maps document names |
| 95 | +# to template names. |
| 96 | +# |
| 97 | +# This is required for the alabaster theme |
| 98 | +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars |
| 99 | +html_sidebars = { |
| 100 | + "**": [ |
| 101 | + "globaltoc.html", |
| 102 | + "relations.html", # needs 'show_related': True theme option to display |
| 103 | + "searchbox.html", |
| 104 | + ] |
| 105 | +} |
| 106 | + |
| 107 | +html_logo = "./assets/logo.png" |
| 108 | + |
| 109 | +# -- Options for Intersphinx |
| 110 | + |
| 111 | +intersphinx_mapping = { |
| 112 | + "python": ("https://docs.python.org/3", None), |
| 113 | + "numpy": ("https://numpy.org/doc/stable/", None), |
| 114 | + "xarray": ("https://docs.xarray.dev/en/stable/", None), |
| 115 | +} |
0 commit comments