|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# Configuration file for the Sphinx documentation builder. |
| 4 | +# |
| 5 | +# This file does only contain a selection of the most common options. For a |
| 6 | +# full list see the documentation: |
| 7 | +# http://www.sphinx-doc.org/en/stable/config |
| 8 | + |
| 9 | +# -- Path setup -------------------------------------------------------------- |
| 10 | + |
| 11 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 12 | +# add these directories to sys.path here. If the directory is relative to the |
| 13 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 14 | + |
| 15 | +# Incase the project was not installed |
| 16 | +import os |
| 17 | +import sys |
| 18 | +import time |
| 19 | + |
| 20 | +sys.path.insert(0, os.path.abspath("..")) |
| 21 | + |
| 22 | +# -- Project information ----------------------------------------------------- |
| 23 | + |
| 24 | +project = "ccpbiosim dev" |
| 25 | +copyright_first_year = "2025" |
| 26 | +copyright_owners = "CCPBioSim" |
| 27 | +author = "James Gebbie-Rayet" |
| 28 | +current_year = str(time.localtime().tm_year) |
| 29 | +copyright_year_string = ( |
| 30 | + current_year |
| 31 | + if current_year == copyright_first_year |
| 32 | + else f"{copyright_first_year}-{current_year}" |
| 33 | +) |
| 34 | +copyright = f"{copyright_year_string}, {copyright_owners}. All rights reserved" |
| 35 | + |
| 36 | +# The short X.Y version |
| 37 | +version = "" |
| 38 | +# The full version, including alpha/beta/rc tags |
| 39 | +release = "" |
| 40 | + |
| 41 | + |
| 42 | +# -- General configuration --------------------------------------------------- |
| 43 | + |
| 44 | +# If your documentation needs a minimal Sphinx version, state it here. |
| 45 | +# |
| 46 | +# needs_sphinx = '1.0' |
| 47 | + |
| 48 | +# Add any Sphinx extension module names here, as strings. They can be |
| 49 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 50 | +# ones. |
| 51 | +extensions = [ |
| 52 | + "sphinx.ext.autosummary", |
| 53 | + "sphinx.ext.autodoc", |
| 54 | + "sphinx.ext.mathjax", |
| 55 | + "sphinx.ext.viewcode", |
| 56 | + "sphinx.ext.napoleon", |
| 57 | + "sphinx.ext.intersphinx", |
| 58 | + "sphinx.ext.extlinks", |
| 59 | + "sphinx_copybutton", |
| 60 | + "myst_parser", |
| 61 | +] |
| 62 | + |
| 63 | +autosummary_generate = True |
| 64 | +napoleon_google_docstring = False |
| 65 | +napoleon_use_param = False |
| 66 | +napoleon_use_ivar = True |
| 67 | + |
| 68 | +# Add any paths that contain templates here, relative to this directory. |
| 69 | +# templates_path = ["_templates"] |
| 70 | + |
| 71 | +# The suffix(es) of source filenames. |
| 72 | +# You can specify multiple suffix as a list of string: |
| 73 | +# |
| 74 | +source_suffix = ['.rst', '.md'] |
| 75 | +#source_suffix = ".md" |
| 76 | + |
| 77 | +# The master toctree document. |
| 78 | +master_doc = "index" |
| 79 | + |
| 80 | +# The language for content autogenerated by Sphinx. Refer to documentation |
| 81 | +# for a list of supported languages. |
| 82 | +# |
| 83 | +# This is also used if you do content translation via gettext catalogs. |
| 84 | +# Usually you set "language" from the command line for these cases. |
| 85 | +language = "en" |
| 86 | + |
| 87 | +# List of patterns, relative to source directory, that match files and |
| 88 | +# directories to ignore when looking for source files. |
| 89 | +# This pattern also affects html_static_path and html_extra_path . |
| 90 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 91 | + |
| 92 | +# The name of the Pygments (syntax highlighting) style to use. |
| 93 | +pygments_style = "default" |
| 94 | + |
| 95 | + |
| 96 | +# -- Options for HTML output ------------------------------------------------- |
| 97 | + |
| 98 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 99 | +# a list of builtin themes. |
| 100 | +# |
| 101 | +html_theme = "furo" |
| 102 | +# html_logo = "images/blaah" |
| 103 | + |
| 104 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 105 | +# further. For a list of options available for each theme, see the |
| 106 | +# documentation. |
| 107 | +# |
| 108 | +# html_theme_options = {} |
| 109 | +html_theme_options = { |
| 110 | +"light_logo": "ccpbiosim-dark-sq.png", # Your light mode logo file |
| 111 | +"dark_logo": "ccpbiosim-light-sq.png", # Your dark mode logo file |
| 112 | +} |
| 113 | + |
| 114 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 115 | +# relative to this directory. They are copied after the builtin static files, |
| 116 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 117 | +html_static_path = ["_static"] |
| 118 | + |
| 119 | +# Custom sidebar templates, must be a dictionary that maps document names |
| 120 | +# to template names. |
| 121 | +# |
| 122 | +# The default sidebars (for documents that don't match any pattern) are |
| 123 | +# defined by theme itself. Builtin themes are using these templates by |
| 124 | +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
| 125 | +# 'searchbox.html']``. |
| 126 | +# |
| 127 | +# html_sidebars = {} |
| 128 | + |
| 129 | + |
| 130 | +# -- Options for HTMLHelp output --------------------------------------------- |
| 131 | + |
| 132 | +# Output file base name for HTML help builder. |
| 133 | +htmlhelp_basename = "ccpbiosim_doc" |
| 134 | + |
| 135 | + |
| 136 | +# -- Options for LaTeX output ------------------------------------------------ |
| 137 | + |
| 138 | +latex_elements = { |
| 139 | + # The paper size ('letterpaper' or 'a4paper'). |
| 140 | + # |
| 141 | + # 'papersize': 'letterpaper', |
| 142 | + # The font size ('10pt', '11pt' or '12pt'). |
| 143 | + # |
| 144 | + # 'pointsize': '10pt', |
| 145 | + # Additional stuff for the LaTeX preamble. |
| 146 | + # |
| 147 | + # 'preamble': '', |
| 148 | + # Latex figure (float) alignment |
| 149 | + # |
| 150 | + # 'figure_align': 'htbp', |
| 151 | +} |
| 152 | + |
| 153 | +# Grouping the document tree into LaTeX files. List of tuples |
| 154 | +# (source start file, target name, title, |
| 155 | +# author, documentclass [howto, manual, or own class]). |
| 156 | +latex_documents = [ |
| 157 | + ( |
| 158 | + master_doc, |
| 159 | + "ccpbiosim.tex", |
| 160 | + "CCPBioSim Developers Documentation", |
| 161 | + "CCPBioSim", |
| 162 | + "manual", |
| 163 | + ), |
| 164 | +] |
| 165 | + |
| 166 | + |
| 167 | +# -- Options for manual page output ------------------------------------------ |
| 168 | + |
| 169 | +# One entry per manual page. List of tuples |
| 170 | +# (source start file, name, description, authors, manual section). |
| 171 | +man_pages = [(master_doc, "CCPBioSim", "CCPBioSim Developers Documentation", [author], 1)] |
| 172 | + |
| 173 | + |
| 174 | +# -- Options for Texinfo output ---------------------------------------------- |
| 175 | + |
| 176 | +# Grouping the document tree into Texinfo files. List of tuples |
| 177 | +# (source start file, target name, title, author, |
| 178 | +# dir menu entry, description, category) |
| 179 | +texinfo_documents = [ |
| 180 | + ( |
| 181 | + master_doc, |
| 182 | + "CCPBioSim", |
| 183 | + "CCPBioSim Developers Documentation", |
| 184 | + author, |
| 185 | + "CCPBioSim", |
| 186 | + "CCPBioSim developer pages for its GitHub organisation.", |
| 187 | + ), |
| 188 | +] |
| 189 | + |
| 190 | + |
| 191 | +# -- Extension configuration ------------------------------------------------- |
| 192 | +def setup(app): |
| 193 | + app.add_css_file("custom.css") |
0 commit comments