-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconf.py
More file actions
96 lines (75 loc) · 2.45 KB
/
conf.py
File metadata and controls
96 lines (75 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Configuration file for the Sphinx documentation builder.
# -- Project information
import datetime
import os
import sys
from unittest.mock import Mock
MOCK_MODULES = ["raffle._raffle"] # List any other modules if needed
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# sys.path.insert(0, os.path.abspath(os.path.join('..', '..', 'src', 'raffle'))) # Sets the base path to find your modules
sys.path.insert(0, os.path.abspath(os.path.join('..', '..', 'src'))) # Sets the base path to find your modules
project = 'RAFFLE'
copyright = f'{datetime.date.today().year}, RAFFLE-developers'
# release = '1.0'
# version = '1.0.0'
# -- General configuration
master_doc = 'index'
# Identify the branch of the documentation
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
git_branch = os.environ.get("READTHEDOCS_GIT_IDENTIFIER", "main")
else:
git_branch = "main" # or get from git directly with subprocess
extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinxcontrib.bibtex',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_rtd_theme',
'sphinx.ext.extlinks',
]
extlinks = {
'git': ('https://github.com/ExeQuantCode/RAFFLE/blob/' + git_branch + '/%s', 'git: %s')
}
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
}
intersphinx_disabled_domains = ['std']
templates_path = ['_templates']
exclude_patterns = ['_build', '.DS_Store', 'build']
# -- Options for HTML output
html_theme = 'sphinx_rtd_theme'
# -- Options for EPUB output
epub_show_urls = 'footnote'
html_logo = "RAFFLE_logo_no_background.png"
# html_favicon = 'favicon.ico'
html_theme_options = {
'logo_only': False,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
# 'style_nav_header_background': 'white',
'flyout_display': 'hidden',
'version_selector': True,
'language_selector': True,
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
}
html_context = {
"display_github": True,
"github_repo": "RAFFLE",
"github_user": "ExeQuantCode",
"github_version": "main",
"conf_py_path": "/docs/source/",
}
autoclass_content="both"
bibtex_bibfiles = ['references.bib']