Skip to content

Commit 5324d2d

Browse files
Merge pull request #165 from source-foundry/fix-rtfd-doc-build
Fix Read the Docs builds
2 parents 7a279f6 + e57b377 commit 5324d2d

File tree

4 files changed

+68
-39
lines changed

4 files changed

+68
-39
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ tests/profiler.py
7575
scratchpad.py
7676

7777
.venv
78+
.vscode

.readthedocs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.9"
13+
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/conf.py
17+
builder: html
18+
# If using Sphinx, optionally build your docs in additional formats such as PDF
19+
# formats:
20+
# - pdf
21+
22+
# Optionally declare the Python requirements required to build your docs
23+
python:
24+
install:
25+
- requirements: docs/requirements.txt
26+
- requirements: requirements.txt
27+
- method: pip
28+
path: .

docs/conf.py

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,44 @@
2525

2626
# If your documentation needs a minimal Sphinx version, state it here.
2727
#
28-
# needs_sphinx = '1.0'
28+
needs_sphinx = "4.2.0"
2929

3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ['sphinx.ext.autodoc',
34-
'sphinx.ext.intersphinx',
35-
'sphinx.ext.coverage',
36-
'sphinx.ext.imgmath',
37-
'sphinx.ext.viewcode']
33+
extensions = [
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.intersphinx",
36+
"sphinx.ext.coverage",
37+
"sphinx.ext.imgmath",
38+
"sphinx.ext.viewcode",
39+
]
3840

3941
# Add any paths that contain templates here, relative to this directory.
40-
templates_path = ['_templates']
42+
templates_path = ["_templates"]
4143

4244
# The suffix(es) of source filenames.
4345
# You can specify multiple suffix as a list of string:
4446
#
4547
# source_suffix = ['.rst', '.md']
46-
source_suffix = '.rst'
48+
source_suffix = ".rst"
4749

4850
# The master toctree document.
49-
master_doc = 'index'
51+
master_doc = "index"
5052

5153
# General information about the project.
52-
project = u'libfv'
53-
copyright = u'2018, Christopher Simpkins. CC BY 4.0'
54-
author = u'Christopher Simpkins'
54+
project = u"libfv"
55+
copyright = u"2018, Christopher Simpkins. CC BY 4.0"
56+
author = u"Christopher Simpkins"
5557

5658
# The version info for the project you're documenting, acts as replacement for
5759
# |version| and |release|, also used in various other places throughout the
5860
# built documents.
5961
#
6062
# The short X.Y version.
61-
version = u'v0.7.0'
63+
version = u"v2.0.0"
6264
# The full version, including alpha/beta/rc tags.
63-
release = u'v0.7.0'
65+
release = u"v2.0.0"
6466

6567
# The language for content autogenerated by Sphinx. Refer to documentation
6668
# for a list of supported languages.
@@ -72,23 +74,23 @@
7274
# List of patterns, relative to source directory, that match files and
7375
# directories to ignore when looking for source files.
7476
# This patterns also effect to html_static_path and html_extra_path
75-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
77+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7678

7779
# The name of the Pygments (syntax highlighting) style to use.
78-
pygments_style = 'sphinx'
80+
pygments_style = "sphinx"
7981

8082
# If true, `todo` and `todoList` produce output, else they produce nothing.
8183
todo_include_todos = False
8284

8385

84-
autodoc_member_order = 'bysource'
86+
autodoc_member_order = "bysource"
8587

8688
# -- Options for HTML output ----------------------------------------------
8789

8890
# The theme to use for HTML and HTML Help pages. See the documentation for
8991
# a list of builtin themes.
9092
#
91-
html_theme = 'sphinx_rtd_theme'
93+
html_theme = "sphinx_rtd_theme"
9294

9395
# Theme options are theme-specific and customize the look and feel of a theme
9496
# further. For a list of options available for each theme, see the
@@ -99,25 +101,25 @@
99101
# Add any paths that contain custom static files (such as style sheets) here,
100102
# relative to this directory. They are copied after the builtin static files,
101103
# so a file named "default.css" will overwrite the builtin "default.css".
102-
html_static_path = ['_static']
104+
html_static_path = ["_static"]
103105

104106
# Custom sidebar templates, must be a dictionary that maps document names
105107
# to template names.
106108
#
107109
# This is required for the alabaster theme
108110
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
109111
html_sidebars = {
110-
'**': [
111-
'relations.html', # needs 'show_related': True theme option to display
112-
'searchbox.html',
112+
"**": [
113+
"relations.html", # needs 'show_related': True theme option to display
114+
"searchbox.html",
113115
]
114116
}
115117

116118

117119
# -- Options for HTMLHelp output ------------------------------------------
118120

119121
# Output file base name for HTML help builder.
120-
htmlhelp_basename = 'libfvdoc'
122+
htmlhelp_basename = "libfvdoc"
121123

122124

123125
# -- Options for LaTeX output ---------------------------------------------
@@ -126,15 +128,12 @@
126128
# The paper size ('letterpaper' or 'a4paper').
127129
#
128130
# 'papersize': 'letterpaper',
129-
130131
# The font size ('10pt', '11pt' or '12pt').
131132
#
132133
# 'pointsize': '10pt',
133-
134134
# Additional stuff for the LaTeX preamble.
135135
#
136136
# 'preamble': '',
137-
138137
# Latex figure (float) alignment
139138
#
140139
# 'figure_align': 'htbp',
@@ -144,19 +143,15 @@
144143
# (source start file, target name, title,
145144
# author, documentclass [howto, manual, or own class]).
146145
latex_documents = [
147-
(master_doc, 'libfv.tex', u'libfv Documentation',
148-
u'Christopher Simpkins', 'manual'),
146+
(master_doc, "libfv.tex", u"libfv Documentation", u"Christopher Simpkins", "manual"),
149147
]
150148

151149

152150
# -- Options for manual page output ---------------------------------------
153151

154152
# One entry per manual page. List of tuples
155153
# (source start file, name, description, authors, manual section).
156-
man_pages = [
157-
(master_doc, 'libfv', u'libfv Documentation',
158-
[author], 1)
159-
]
154+
man_pages = [(master_doc, "libfv", u"libfv Documentation", [author], 1)]
160155

161156

162157
# -- Options for Texinfo output -------------------------------------------
@@ -165,13 +160,18 @@
165160
# (source start file, target name, title, author,
166161
# dir menu entry, description, category)
167162
texinfo_documents = [
168-
(master_doc, 'libfv', u'libfv Documentation',
169-
author, 'font-v', 'One line description of project.',
170-
'Miscellaneous'),
163+
(
164+
master_doc,
165+
"libfv",
166+
u"libfv Documentation",
167+
author,
168+
"font-v",
169+
"One line description of project.",
170+
"Miscellaneous",
171+
),
171172
]
172173

173174

174-
175175
# -- Options for Epub output ----------------------------------------------
176176

177177
# Bibliographic Dublin Core info.
@@ -190,9 +190,8 @@
190190
# epub_uid = ''
191191

192192
# A list of files that should not be packed into the epub file.
193-
epub_exclude_files = ['search.html']
194-
193+
epub_exclude_files = ["search.html"]
195194

196195

197196
# Example configuration for intersphinx: refer to the Python standard library.
198-
intersphinx_mapping = {'https://docs.python.org/': None}
197+
intersphinx_mapping = {"https://docs.python.org/": None}

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx==4.2.0

0 commit comments

Comments
 (0)