Passed
Branch develop (3588bd)
by Christophe
12:24
created

conf   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 215
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 50
dl 0
loc 215
rs 10
c 0
b 0
f 0
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/master/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
# import os
16
# import sys
17
# sys.path.insert(0, os.path.abspath('.'))
18
19
import os
20
21
import subprocess
22
23
# Doxygen
24
subprocess.call('doxygen Doxyfile', shell=True)
25
26
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
27
28
# -- Project information -----------------------------------------------------
29
30
project = 'PHP Sorted Collections'
31
copyright = '2023, Ch. Demko'
32
author = 'Ch. Demko'
33
34
# The short X.Y version
35
version = '1.0'
36
# The full version, including alpha/beta/rc tags
37
release = '1.0.6'
38
39
40
# -- General configuration ---------------------------------------------------
41
42
# If your documentation needs a minimal Sphinx version, state it here.
43
#
44
# needs_sphinx = '1.0'
45
needs_sphinx = '6.0'
46
47
# Add any Sphinx extension module names here, as strings. They can be
48
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
49
# ones.
50
51
extensions = [
52
    'sphinx.ext.autodoc',
53
    'sphinxcontrib.phpdomain',
54
    'breathe',
55
    'myst_parser'
56
]
57
58
# Add any paths that contain templates here, relative to this directory.
59
templates_path = ['_templates']
60
61
# List of patterns, relative to source directory, that match files and
62
# directories to ignore when looking for source files.
63
# This pattern also affects html_static_path and html_extra_path.
64
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
65
66
highlight_language = 'php'
67
68
from sphinx.highlighting import lexers
69
from pygments.lexers.web import PhpLexer
70
lexers['php'] = PhpLexer(startinline=True, linenos=1)
71
lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
72
primary_domain = 'php'
73
74
# Add any paths that contain templates here, relative to this directory.
75
#templates_path = ['_templates']
76
77
# The suffix(es) of source filenames.
78
# You can specify multiple suffix as a list of string:
79
#
80
# source_suffix = ['.rst', '.md']
81
source_suffix = {
82
    '.rst': 'restructuredtext',
83
    '.md': 'markdown',
84
}
85
86
# The master toctree document.
87
master_doc = 'index'
88
89
# The language for content autogenerated by Sphinx. Refer to documentation
90
# for a list of supported languages.
91
#
92
# This is also used if you do content translation via gettext catalogs.
93
# Usually you set "language" from the command line for these cases.
94
language = 'en'
95
96
# List of patterns, relative to source directory, that match files and
97
# directories to ignore when looking for source files.
98
# This pattern also affects html_static_path and html_extra_path.
99
exclude_patterns = []
100
101
# The name of the Pygments (syntax highlighting) style to use.
102
pygments_style = None
103
104
105
# -- Options for HTML output -------------------------------------------------
106
107
# The theme to use for HTML and HTML Help pages.  See the documentation for
108
# a list of builtin themes.
109
#
110
#html_theme = 'alabaster'
111
if not on_rtd:  # only import and set the theme if we're building docs locally
112
    import sphinx_rtd_theme
113
    html_theme = 'sphinx_rtd_theme'
114
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
115
116
from sphinx.highlighting import lexers
117
from pygments.lexers.web import PhpLexer
118
lexers['php'] = PhpLexer(startinline=True, linenos=1)
119
lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
120
121
# Set domain
122
primary_domain = 'php'
123
124
125
# -- Breathe configuration -------------------------------------------------
126
127
breathe_projects = {
128
    'SortedCollection': '_build/xml/'
129
}
130
breathe_default_project = 'SortedCollection'
131
breathe_default_members = ('members', 'undoc-members')
132
breathe_domain_by_extension = {
133
    'php' : 'php',
134
}
135
136
# Theme options are theme-specific and customize the look and feel of a theme
137
# further.  For a list of options available for each theme, see the
138
# documentation.
139
#
140
# html_theme_options = {}
141
142
# Add any paths that contain custom static files (such as style sheets) here,
143
# relative to this directory. They are copied after the builtin static files,
144
# so a file named "default.css" will overwrite the builtin "default.css".
145
#html_static_path = ['_static']
146
147
# Custom sidebar templates, must be a dictionary that maps document names
148
# to template names.
149
#
150
# The default sidebars (for documents that don't match any pattern) are
151
# defined by theme itself.  Builtin themes are using these templates by
152
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
153
# 'searchbox.html']``.
154
#
155
# html_sidebars = {}
156
157
158
# -- Options for HTMLHelp output ---------------------------------------------
159
160
# Output file base name for HTML help builder.
161
htmlhelp_basename = 'PHPSortedCollectionsdoc'
162
163
164
# -- Options for LaTeX output ------------------------------------------------
165
166
latex_elements = {
167
    # The paper size ('letterpaper' or 'a4paper').
168
    #
169
    # 'papersize': 'letterpaper',
170
171
    # The font size ('10pt', '11pt' or '12pt').
172
    #
173
    # 'pointsize': '10pt',
174
175
    # Additional stuff for the LaTeX preamble.
176
    #
177
    # 'preamble': '',
178
179
    # Latex figure (float) alignment
180
    #
181
    # 'figure_align': 'htbp',
182
}
183
184
# Grouping the document tree into LaTeX files. List of tuples
185
# (source start file, target name, title,
186
#  author, documentclass [howto, manual, or own class]).
187
188
# -- Options for manual page output ------------------------------------------
189
190
# One entry per manual page. List of tuples
191
# (source start file, name, description, authors, manual section).
192
193
# -- Options for Texinfo output ----------------------------------------------
194
195
# Grouping the document tree into Texinfo files. List of tuples
196
# (source start file, target name, title, author,
197
#  dir menu entry, description, category)
198
199
# -- Options for Epub output -------------------------------------------------
200
201
# Bibliographic Dublin Core info.
202
epub_title = project
203
204
# The unique identifier of the text. This can be a ISBN number
205
# or the project homepage.
206
#
207
# epub_identifier = ''
208
209
# A unique identification for the text.
210
#
211
# epub_uid = ''
212
213
# A list of files that should not be packed into the epub file.
214
epub_exclude_files = ['search.html']
215