Merge ~jugmac00/launchpad:create-documentation-via-tox into launchpad:master

Proposed by Jürgen Gmach
Status: Merged
Approved by: Jürgen Gmach
Approved revision: 07d5b55b4575725c4569dc94e6a794d028e30270
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~jugmac00/launchpad:create-documentation-via-tox
Merge into: launchpad:master
Diff against target: 169 lines (+83/-12)
7 files modified
.gitignore (+1/-0)
.readthedocs.yaml (+5/-0)
doc/README (+2/-0)
doc/conf.py (+3/-12)
requirements/docs.in (+1/-0)
requirements/docs.txt (+55/-0)
tox.ini (+16/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+411456@code.launchpad.net

Commit message

Update documentation building

- build documentation via `tox -e docs`
- pin documentation dependencies (requirements/docs.txt)
- update dependencies via `tox -e update-docs`
- fix broken Read the Docs build by pinning documentation dependencies

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
index 6cd08b9..3b2e7d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,3 +74,4 @@ callgrind.out.*
74yarn/node_modules74yarn/node_modules
75/wheels75/wheels
76requirements/combined.txt76requirements/combined.txt
77.tox/
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
77new file mode 10064478new file mode 100644
index 0000000..91b6a9c
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,5 @@
1version: 2
2
3python:
4 install:
5 - requirements: requirements/docs.txt
diff --git a/doc/README b/doc/README
index 84de5de..bacd86a 100644
--- a/doc/README
+++ b/doc/README
@@ -1,5 +1,7 @@
1This directory contains general system-level documentation for Launchpad.1This directory contains general system-level documentation for Launchpad.
22
3To build the documentation locally just run ``tox -e docs``.
4
3You can also find general documentation on <https://dev.launchpad.net> and5You can also find general documentation on <https://dev.launchpad.net> and
4documentation on specific parts of the system in doctests (look for *.txt6documentation on specific parts of the system in doctests (look for *.txt
5files) or in docstrings.7files) or in docstrings.
diff --git a/doc/conf.py b/doc/conf.py
index c4a73e4..038ab03 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -39,8 +39,8 @@ source_suffix = '.txt'
39master_doc = 'index'39master_doc = 'index'
4040
41# General information about the project.41# General information about the project.
42project = u'Launchpad'42project = 'Launchpad'
43copyright = u'2004-2019, Canonical Ltd.'43copyright = '2004-2021, Canonical Ltd.'
4444
45# The version info for the project you're documenting, acts as replacement for45# The version info for the project you're documenting, acts as replacement for
46# |version| and |release|, also used in various other places throughout the46# |version| and |release|, also used in various other places throughout the
@@ -120,7 +120,7 @@ html_theme = 'default'
120# Add any paths that contain custom static files (such as style sheets) here,120# Add any paths that contain custom static files (such as style sheets) here,
121# relative to this directory. They are copied after the builtin static files,121# relative to this directory. They are copied after the builtin static files,
122# so a file named "default.css" will overwrite the builtin "default.css".122# so a file named "default.css" will overwrite the builtin "default.css".
123html_static_path = ['_static']123html_static_path = []
124124
125# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,125# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126# using the given strftime format.126# using the given strftime format.
@@ -178,10 +178,6 @@ htmlhelp_basename = 'Launchpaddoc'
178# Grouping the document tree into LaTeX files. List of tuples178# Grouping the document tree into LaTeX files. List of tuples
179# (source start file, target name, title, author,179# (source start file, target name, title, author,
180# documentclass [howto/manual]).180# documentclass [howto/manual]).
181latex_documents = [
182 ('index', 'Launchpad.tex', u'Launchpad Documentation',
183 u'The Launchpad Developers', 'manual'),
184]
185181
186# The name of an image file (relative to this directory) to place at the top of182# The name of an image file (relative to this directory) to place at the top of
187# the title page.183# the title page.
@@ -211,11 +207,6 @@ latex_documents = [
211207
212# One entry per manual page. List of tuples208# One entry per manual page. List of tuples
213# (source start file, name, description, authors, manual section).209# (source start file, name, description, authors, manual section).
214man_pages = [
215 ('index', 'launchpad', u'Launchpad Documentation',
216 [u'The Launchpad Developers'], 1)
217]
218
219210
220# Example configuration for intersphinx: refer to the Python standard library.211# Example configuration for intersphinx: refer to the Python standard library.
221intersphinx_mapping = {'http://docs.python.org/': None}212intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/requirements/docs.in b/requirements/docs.in
222new file mode 100644213new file mode 100644
index 0000000..2806c16
--- /dev/null
+++ b/requirements/docs.in
@@ -0,0 +1 @@
1Sphinx
diff --git a/requirements/docs.txt b/requirements/docs.txt
0new file mode 1006442new file mode 100644
index 0000000..eefeb0f
--- /dev/null
+++ b/requirements/docs.txt
@@ -0,0 +1,55 @@
1#
2# This file is autogenerated by pip-compile with python 3.8
3# To update, run:
4#
5# pip-compile --output-file=requirements/docs.txt requirements/docs.in
6#
7alabaster==0.7.12
8 # via sphinx
9babel==2.9.1
10 # via sphinx
11certifi==2021.10.8
12 # via requests
13charset-normalizer==2.0.7
14 # via requests
15docutils==0.17.1
16 # via sphinx
17idna==3.3
18 # via requests
19imagesize==1.2.0
20 # via sphinx
21jinja2==3.0.2
22 # via sphinx
23markupsafe==2.0.1
24 # via jinja2
25packaging==21.2
26 # via sphinx
27pygments==2.10.0
28 # via sphinx
29pyparsing==2.4.7
30 # via packaging
31pytz==2021.3
32 # via babel
33requests==2.26.0
34 # via sphinx
35snowballstemmer==2.1.0
36 # via sphinx
37sphinx==4.2.0
38 # via -r requirements/docs.in
39sphinxcontrib-applehelp==1.0.2
40 # via sphinx
41sphinxcontrib-devhelp==1.0.2
42 # via sphinx
43sphinxcontrib-htmlhelp==2.0.0
44 # via sphinx
45sphinxcontrib-jsmath==1.0.1
46 # via sphinx
47sphinxcontrib-qthelp==1.0.3
48 # via sphinx
49sphinxcontrib-serializinghtml==1.1.5
50 # via sphinx
51urllib3==1.26.7
52 # via requests
53
54# The following packages are considered to be unsafe in a requirements file:
55# setuptools
diff --git a/tox.ini b/tox.ini
0new file mode 10064456new file mode 100644
index 0000000..35da8b5
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,16 @@
1[tox]
2
3[testenv:docs]
4basepython = python3
5skip_install = true
6deps =
7 -r {toxinidir}/requirements/docs.txt
8commands =
9 sphinx-build -b html {toxinidir}/doc/ {toxinidir}/doc/_build/html
10
11[testenv:update-docs]
12skip_install = true
13deps =
14 pip-tools
15commands =
16 pip-compile --upgrade {toxinidir}/requirements/docs.in --output-file {toxinidir}/requirements/docs.txt

Subscribers

People subscribed via source and target branches

to status/vote changes: