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 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
1diff --git a/.gitignore b/.gitignore
2index 6cd08b9..3b2e7d2 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -74,3 +74,4 @@ callgrind.out.*
6 yarn/node_modules
7 /wheels
8 requirements/combined.txt
9+.tox/
10diff --git a/.readthedocs.yaml b/.readthedocs.yaml
11new file mode 100644
12index 0000000..91b6a9c
13--- /dev/null
14+++ b/.readthedocs.yaml
15@@ -0,0 +1,5 @@
16+version: 2
17+
18+python:
19+ install:
20+ - requirements: requirements/docs.txt
21diff --git a/doc/README b/doc/README
22index 84de5de..bacd86a 100644
23--- a/doc/README
24+++ b/doc/README
25@@ -1,5 +1,7 @@
26 This directory contains general system-level documentation for Launchpad.
27
28+To build the documentation locally just run ``tox -e docs``.
29+
30 You can also find general documentation on <https://dev.launchpad.net> and
31 documentation on specific parts of the system in doctests (look for *.txt
32 files) or in docstrings.
33diff --git a/doc/conf.py b/doc/conf.py
34index c4a73e4..038ab03 100644
35--- a/doc/conf.py
36+++ b/doc/conf.py
37@@ -39,8 +39,8 @@ source_suffix = '.txt'
38 master_doc = 'index'
39
40 # General information about the project.
41-project = u'Launchpad'
42-copyright = u'2004-2019, Canonical Ltd.'
43+project = 'Launchpad'
44+copyright = '2004-2021, Canonical Ltd.'
45
46 # The version info for the project you're documenting, acts as replacement for
47 # |version| and |release|, also used in various other places throughout the
48@@ -120,7 +120,7 @@ html_theme = 'default'
49 # Add any paths that contain custom static files (such as style sheets) here,
50 # relative to this directory. They are copied after the builtin static files,
51 # so a file named "default.css" will overwrite the builtin "default.css".
52-html_static_path = ['_static']
53+html_static_path = []
54
55 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
56 # using the given strftime format.
57@@ -178,10 +178,6 @@ htmlhelp_basename = 'Launchpaddoc'
58 # Grouping the document tree into LaTeX files. List of tuples
59 # (source start file, target name, title, author,
60 # documentclass [howto/manual]).
61-latex_documents = [
62- ('index', 'Launchpad.tex', u'Launchpad Documentation',
63- u'The Launchpad Developers', 'manual'),
64-]
65
66 # The name of an image file (relative to this directory) to place at the top of
67 # the title page.
68@@ -211,11 +207,6 @@ latex_documents = [
69
70 # One entry per manual page. List of tuples
71 # (source start file, name, description, authors, manual section).
72-man_pages = [
73- ('index', 'launchpad', u'Launchpad Documentation',
74- [u'The Launchpad Developers'], 1)
75-]
76-
77
78 # Example configuration for intersphinx: refer to the Python standard library.
79 intersphinx_mapping = {'http://docs.python.org/': None}
80diff --git a/requirements/docs.in b/requirements/docs.in
81new file mode 100644
82index 0000000..2806c16
83--- /dev/null
84+++ b/requirements/docs.in
85@@ -0,0 +1 @@
86+Sphinx
87diff --git a/requirements/docs.txt b/requirements/docs.txt
88new file mode 100644
89index 0000000..eefeb0f
90--- /dev/null
91+++ b/requirements/docs.txt
92@@ -0,0 +1,55 @@
93+#
94+# This file is autogenerated by pip-compile with python 3.8
95+# To update, run:
96+#
97+# pip-compile --output-file=requirements/docs.txt requirements/docs.in
98+#
99+alabaster==0.7.12
100+ # via sphinx
101+babel==2.9.1
102+ # via sphinx
103+certifi==2021.10.8
104+ # via requests
105+charset-normalizer==2.0.7
106+ # via requests
107+docutils==0.17.1
108+ # via sphinx
109+idna==3.3
110+ # via requests
111+imagesize==1.2.0
112+ # via sphinx
113+jinja2==3.0.2
114+ # via sphinx
115+markupsafe==2.0.1
116+ # via jinja2
117+packaging==21.2
118+ # via sphinx
119+pygments==2.10.0
120+ # via sphinx
121+pyparsing==2.4.7
122+ # via packaging
123+pytz==2021.3
124+ # via babel
125+requests==2.26.0
126+ # via sphinx
127+snowballstemmer==2.1.0
128+ # via sphinx
129+sphinx==4.2.0
130+ # via -r requirements/docs.in
131+sphinxcontrib-applehelp==1.0.2
132+ # via sphinx
133+sphinxcontrib-devhelp==1.0.2
134+ # via sphinx
135+sphinxcontrib-htmlhelp==2.0.0
136+ # via sphinx
137+sphinxcontrib-jsmath==1.0.1
138+ # via sphinx
139+sphinxcontrib-qthelp==1.0.3
140+ # via sphinx
141+sphinxcontrib-serializinghtml==1.1.5
142+ # via sphinx
143+urllib3==1.26.7
144+ # via requests
145+
146+# The following packages are considered to be unsafe in a requirements file:
147+# setuptools
148diff --git a/tox.ini b/tox.ini
149new file mode 100644
150index 0000000..35da8b5
151--- /dev/null
152+++ b/tox.ini
153@@ -0,0 +1,16 @@
154+[tox]
155+
156+[testenv:docs]
157+basepython = python3
158+skip_install = true
159+deps =
160+ -r {toxinidir}/requirements/docs.txt
161+commands =
162+ sphinx-build -b html {toxinidir}/doc/ {toxinidir}/doc/_build/html
163+
164+[testenv:update-docs]
165+skip_install = true
166+deps =
167+ pip-tools
168+commands =
169+ 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: