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
|
|
|
import os |
14
|
|
|
import re |
15
|
|
|
import sys |
16
|
|
|
import mock |
17
|
|
|
|
18
|
|
|
sys.path.insert(0, os.path.abspath(r"../../src")) |
19
|
|
|
|
20
|
|
|
# -- Project information ----------------------------------------------------- |
21
|
|
|
|
22
|
|
|
project = "average-minimum-distance" |
23
|
|
|
copyright = "2025, Daniel Widdowson" |
24
|
|
|
author = "Daniel Widdowson" |
25
|
|
|
|
26
|
|
|
with open(r"../../src/amd/__init__.py") as f: |
27
|
|
|
version = re.search('__version__ = "(.*)"', f.read()).group(1) |
28
|
|
|
|
29
|
|
|
for mod_name in ["ccdc", "ccdc.io", "ccdc.search"]: |
30
|
|
|
sys.modules[mod_name] = mock.Mock() |
31
|
|
|
|
32
|
|
|
# -- General configuration --------------------------------------------------- |
33
|
|
|
|
34
|
|
|
# Add any Sphinx extension module names here, as strings. They can be |
35
|
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
36
|
|
|
# ones. |
37
|
|
|
extensions = [ |
38
|
|
|
"sphinx.ext.autodoc", |
39
|
|
|
"sphinx.ext.coverage", |
40
|
|
|
"sphinx.ext.napoleon", |
41
|
|
|
"sphinx.ext.intersphinx", |
42
|
|
|
"sphinx_rtd_theme", |
43
|
|
|
"sphinx_rtd_dark_mode", |
44
|
|
|
"sphinx_mdinclude", |
45
|
|
|
] |
46
|
|
|
|
47
|
|
|
intersphinx_mapping = { |
48
|
|
|
"numpy": ("https://numpy.org/doc/stable/", None), |
49
|
|
|
# 'numba': ('https://numba.pydata.org/numba-doc/latest/', None), |
50
|
|
|
"scipy": ("https://docs.scipy.org/doc/scipy/", None), |
51
|
|
|
"pandas": ("https://pandas.pydata.org/docs/", None), |
52
|
|
|
"gemmi": ("https://gemmi.readthedocs.io/en/latest/", None), |
53
|
|
|
"pymatgen": ("https://pymatgen.org/", None), |
54
|
|
|
"ase": ("https://wiki.fysik.dtu.dk/ase/", None), |
55
|
|
|
"joblib": ("https://joblib.readthedocs.io/en/latest/", None), |
56
|
|
|
# 'tqdm': ('https://tqdm.github.io/', None), |
57
|
|
|
"ccdc": ("https://downloads.ccdc.cam.ac.uk/documentation/API/", None), |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
# autodoc_typehints = "description" |
61
|
|
|
source_suffix = [".rst", ".md"] |
62
|
|
|
|
63
|
|
|
# Puts functions in order of source instead of alphabetical |
64
|
|
|
autodoc_member_order = "bysource" |
65
|
|
|
# autodoc_default_flags = ['members'] |
66
|
|
|
# autosummary_generate = True |
67
|
|
|
|
68
|
|
|
# Add any paths that contain templates here, relative to this directory. |
69
|
|
|
templates_path = ["_templates"] |
70
|
|
|
|
71
|
|
|
# List of patterns, relative to source directory, that match files and |
72
|
|
|
# directories to ignore when looking for source files. |
73
|
|
|
# This pattern also affects html_static_path and html_extra_path. |
74
|
|
|
exclude_patterns = [] |
75
|
|
|
|
76
|
|
|
# -- Options for HTML output ------------------------------------------------- |
77
|
|
|
|
78
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for |
79
|
|
|
# a list of builtin themes. |
80
|
|
|
|
81
|
|
|
html_theme = "sphinx_rtd_theme" |
82
|
|
|
default_dark_mode = True |
83
|
|
|
|
84
|
|
|
html_sidebars = { |
85
|
|
|
"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"] |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
# # Add any paths that contain custom static files (such as style sheets) here, |
89
|
|
|
# # relative to this directory. They are copied after the builtin static files, |
90
|
|
|
# # so a file named "default.css" will overwrite the builtin "default.css". |
91
|
|
|
# html_static_path = ['_static'] |
92
|
|
|
|