|
| 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 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | +project = 'Kessler' |
| 14 | +copyright = "2020, 2021, 2022, 2023, 2024, 2025, Kessler contributors" |
| 15 | +author = 'Giacomo Acciarini, Atılım Güneş Baydin, Francesco Pinto' |
| 16 | + |
| 17 | + |
| 18 | +# The full version, including alpha/beta/rc tags |
| 19 | +import kessler |
| 20 | +import sys |
| 21 | +import os |
| 22 | +sys.path.insert(0, os.path.abspath('../')) # Add the root directory of your repo |
| 23 | + |
| 24 | +release = kessler.__version__ |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +# -- General configuration --------------------------------------------------- |
| 29 | + |
| 30 | +# Add any Sphinx extension module names here, as strings. They can be |
| 31 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 32 | +# ones. |
| 33 | +extensions = ["myst_nb", "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.autosummary","sphinx.ext.napoleon"] |
| 34 | + |
| 35 | + |
| 36 | +# build the templated autosummary files |
| 37 | +autosummary_generate = True |
| 38 | +autosummary_imported_members = False |
| 39 | +napoleon_google_docstring = True |
| 40 | +numpydoc_show_class_members = False |
| 41 | +panels_add_bootstrap_css = False |
| 42 | + |
| 43 | +autosectionlabel_prefix_document = True |
| 44 | + |
| 45 | +# katex options |
| 46 | +# |
| 47 | +# |
| 48 | +katex_prerender = True |
| 49 | + |
| 50 | +napoleon_use_ivar = True |
| 51 | + |
| 52 | +# Add any paths that contain templates here, relative to this directory. |
| 53 | +templates_path = ["_templates"] |
| 54 | + |
| 55 | +intersphinx_mapping = { |
| 56 | + "numpy": ("https://numpy.org/doc/stable/", None), |
| 57 | + "python": ("https://docs.python.org/3", None), |
| 58 | + "matplotlib": ("https://matplotlib.org/stable/", None), |
| 59 | +} |
| 60 | + |
| 61 | + |
| 62 | +autoclass_content = 'both' |
| 63 | + |
| 64 | +# List of patterns, relative to source directory, that match files and |
| 65 | +# directories to ignore when looking for source files. |
| 66 | +# This pattern also affects html_static_path and html_extra_path. |
| 67 | +exclude_patterns = ["_build", ".DS_Store",'jupyter_execute/**/*.ipynb','jupyter_execute/*.ipynb'] |
| 68 | + |
| 69 | + |
| 70 | +# -- Options for HTML output ------------------------------------------------- |
| 71 | + |
| 72 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 73 | +# a list of builtin themes. |
| 74 | +# |
| 75 | +html_theme = "sphinx_book_theme" |
| 76 | + |
| 77 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 78 | +# relative to this directory. They are copied after the builtin static files, |
| 79 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 80 | +html_static_path = ["_static"] |
| 81 | + |
| 82 | +html_logo = "_static/kessler_logo.png" |
| 83 | + |
| 84 | +html_theme_options = { |
| 85 | + "repository_url": "https://github.com/kesslerlib/kessler/", |
| 86 | + "repository_branch": "master", |
| 87 | + "path_to_docs": "docs", |
| 88 | + "use_repository_button": True, |
| 89 | + "use_issues_button": True, |
| 90 | + "launch_buttons": { |
| 91 | + "binderhub_url": "https://mybinder.org", |
| 92 | + "notebook_interface": "jupyterlab" |
| 93 | + }, |
| 94 | + "navigation_with_keys": False, |
| 95 | +} |
| 96 | + |
| 97 | +nb_execution_mode = "force" |
| 98 | + |
| 99 | +nb_execution_excludepatterns = ['basics.ipynb','cdms_analysis_and_plotting.ipynb','LSTM_training.ipynb'] |
| 100 | +#autosummary_ignore_module = [''] |
| 101 | + |
| 102 | +latex_engine = "xelatex" |
| 103 | + |
| 104 | +myst_enable_extensions = [ |
| 105 | + "amsmath", |
| 106 | + "colon_fence", |
| 107 | + "deflist", |
| 108 | + "dollarmath", |
| 109 | + "html_image", |
| 110 | +] |
0 commit comments