Merge ~jugmac00/lazr.delegates:publish-docs-on-rtd into lazr.delegates:main

Proposed by Jürgen Gmach
Status: Merged
Merged at revision: 04d366a5b4632f653297e21dcb93fcf61d6c6321
Proposed branch: ~jugmac00/lazr.delegates:publish-docs-on-rtd
Merge into: lazr.delegates:main
Diff against target: 290 lines (+45/-83)
9 files modified
.gitignore (+1/-0)
CONTRIBUTING.rst (+10/-12)
README.rst (+0/-20)
lazr/delegates/docs/CONTRIBUTING.rst (+1/-0)
lazr/delegates/docs/NEWS.rst (+1/-0)
lazr/delegates/docs/conf.py (+14/-51)
lazr/delegates/docs/index.rst (+7/-0)
setup.py (+3/-0)
tox.ini (+8/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+411358@code.launchpad.net

Commit message

Publish documentation on Read the Docs

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 8271f5a..daeb903 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -13,3 +13,4 @@ __pycache__
6 .coverage
7 .tox
8 *.pyc
9+lazr/delegates/docs/_build
10diff --git a/HACKING.rst b/CONTRIBUTING.rst
11similarity index 78%
12rename from HACKING.rst
13rename to CONTRIBUTING.rst
14index 55984d8..5421a96 100644
15--- a/HACKING.rst
16+++ b/CONTRIBUTING.rst
17@@ -23,6 +23,16 @@ please see the common hacking guidelines at:
18 http://dev.launchpad.net/Hacking
19
20
21+============
22+Contributing
23+============
24+
25+To run this project's tests, use `tox <https://tox.readthedocs.io/en/latest/>`_.
26+
27+To update the `project's documentation
28+<https://lazrdelegates.readthedocs.io/en/latest/>`_ you need to trigger a manual
29+build on the project's dashboard on https://readthedocs.org.
30+
31 Getting help
32 ------------
33
34@@ -37,15 +47,3 @@ If you want to discuss this package, join the team and mailing list here:
35 or send a message to:
36
37 lazr-developers@lists.launchpad.net
38-
39-
40-Running the tests
41-=================
42-
43-The tests suite requires tox_ and nose_ and is compatible with both Python 2
44-and Python 3. To run the full test suite::
45-
46- $ tox
47-
48-.. _nose: https://nose.readthedocs.org/en/latest/
49-.. _tox: https://testrun.org/tox/latest/
50diff --git a/README.rst b/README.rst
51index d7cdc5d..82e28dd 100644
52--- a/README.rst
53+++ b/README.rst
54@@ -1,21 +1 @@
55-=========================
56 Welcome to lazr.delegates
57-=========================
58-
59-Contents:
60-
61-.. toctree::
62- :maxdepth: 2
63-
64- lazr/delegates/docs/usage
65- NEWS
66- HACKING
67-
68-
69-
70-Indices and tables
71-==================
72-
73-* :ref:`genindex`
74-* :ref:`modindex`
75-* :ref:`search`
76diff --git a/lazr/delegates/docs/CONTRIBUTING.rst b/lazr/delegates/docs/CONTRIBUTING.rst
77new file mode 120000
78index 0000000..ac9338f
79--- /dev/null
80+++ b/lazr/delegates/docs/CONTRIBUTING.rst
81@@ -0,0 +1 @@
82+../../../CONTRIBUTING.rst
83\ No newline at end of file
84diff --git a/lazr/delegates/docs/NEWS.rst b/lazr/delegates/docs/NEWS.rst
85new file mode 120000
86index 0000000..c95df2b
87--- /dev/null
88+++ b/lazr/delegates/docs/NEWS.rst
89@@ -0,0 +1 @@
90+../../../NEWS.rst
91\ No newline at end of file
92diff --git a/conf.py b/lazr/delegates/docs/conf.py
93similarity index 79%
94rename from conf.py
95rename to lazr/delegates/docs/conf.py
96index 4b9d3d4..e6ba426 100644
97--- a/conf.py
98+++ b/lazr/delegates/docs/conf.py
99@@ -11,9 +11,6 @@
100 # All configuration values have a default; values that are commented out
101 # serve to show the default.
102
103-from __future__ import print_function
104-import sys, os
105-
106 # If extensions (or modules to document with autodoc) are in another directory,
107 # add these directories to sys.path here. If the directory is relative to the
108 # documentation root, use os.path.abspath to make it absolute, like shown here.
109@@ -38,19 +35,18 @@ source_suffix = '.rst'
110 #source_encoding = 'utf-8-sig'
111
112 # The master toctree document.
113-master_doc = 'README'
114+master_doc = 'index'
115
116 # General information about the project.
117-project = u'lazr.delegates'
118-copyright = u'2013-2015, LAZR developers'
119+project = 'lazr.delegates'
120+copyright = '2013-2021, LAZR developers'
121
122 # The version info for the project you're documenting, acts as replacement for
123 # |version| and |release|, also used in various other places throughout the
124 # built documents.
125 #
126 # The short X.Y version.
127-with open('lazr/delegates/_version.py') as version_file:
128- exec(version_file.read()) # sets __version__
129+from lazr.delegates import __version__
130 version = __version__
131 # The full version, including alpha/beta/rc tags.
132 release = version
133@@ -94,7 +90,7 @@ pygments_style = 'sphinx'
134
135 # The theme to use for HTML and HTML Help pages. See the documentation for
136 # a list of builtin themes.
137-html_theme = 'default'
138+html_theme = 'alabaster'
139
140 # Theme options are theme-specific and customize the look and feel of a theme
141 # further. For a list of options available for each theme, see the
142@@ -123,7 +119,7 @@ html_theme = 'default'
143 # Add any paths that contain custom static files (such as style sheets) here,
144 # relative to this directory. They are copied after the builtin static files,
145 # so a file named "default.css" will overwrite the builtin "default.css".
146-html_static_path = ['_static']
147+html_static_path = []
148
149 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
150 # using the given strftime format.
151@@ -134,8 +130,11 @@ html_static_path = ['_static']
152 #html_use_smartypants = True
153
154 # Custom sidebar templates, maps document names to template names.
155-#html_sidebars = {}
156-
157+html_sidebars = {
158+ '**': [
159+ 'globaltoc.html',
160+ ]
161+}
162 # Additional templates that should be rendered to pages, maps page names to
163 # template names.
164 #html_additional_pages = {}
165@@ -172,7 +171,7 @@ htmlhelp_basename = 'lazrdelegatesdoc'
166
167 # -- Options for LaTeX output --------------------------------------------------
168
169-latex_elements = {
170+# latex_elements = {
171 # The paper size ('letterpaper' or 'a4paper').
172 #'papersize': 'letterpaper',
173
174@@ -181,14 +180,10 @@ latex_elements = {
175
176 # Additional stuff for the LaTeX preamble.
177 #'preamble': '',
178-}
179+# }
180
181 # Grouping the document tree into LaTeX files. List of tuples
182 # (source start file, target name, title, author, documentclass [howto/manual]).
183-latex_documents = [
184- ('index', 'lazrdelegates.tex', u'lazr.delegates Documentation',
185- u'LAZR developers', 'manual'),
186-]
187
188 # The name of an image file (relative to this directory) to place at the top of
189 # the title page.
190@@ -215,10 +210,6 @@ latex_documents = [
191
192 # One entry per manual page. List of tuples
193 # (source start file, name, description, authors, manual section).
194-man_pages = [
195- ('index', 'lazrdelegates', u'lazr.delegates Documentation',
196- [u'LAZR developers'], 1)
197-]
198
199 # If true, show URL addresses after external links.
200 #man_show_urls = False
201@@ -229,11 +220,6 @@ man_pages = [
202 # Grouping the document tree into Texinfo files. List of tuples
203 # (source start file, target name, title, author,
204 # dir menu entry, description, category)
205-texinfo_documents = [
206- ('index', 'lazrdelegates', u'lazr.delegates Documentation',
207- u'LAZR developers', 'lazrdelegates', 'One line description of project.',
208- 'Miscellaneous'),
209-]
210
211 # Documents to append as an appendix to all manuals.
212 #texinfo_appendices = []
213@@ -242,27 +228,4 @@ texinfo_documents = [
214 #texinfo_domain_indices = True
215
216 # How to display URL addresses: 'footnote', 'no', or 'inline'.
217-#texinfo_show_urls = 'footnote'
218-
219-# Make upload to packages.python.org happy.
220-def index_html():
221- import errno
222- cwd = os.getcwd()
223- try:
224- try:
225- os.makedirs('build/sphinx/html')
226- except OSError as error:
227- if error.errno != errno.EEXIST:
228- raise
229- os.chdir('build/sphinx/html')
230- try:
231- os.symlink('README.html', 'index.html')
232- print('index.html -> README.html')
233- except OSError as error:
234- if error.errno != errno.EEXIST:
235- raise
236- finally:
237- os.chdir(cwd)
238-
239-import atexit
240-atexit.register(index_html)
241+#texinfo_show_urls = 'footnote'
242\ No newline at end of file
243diff --git a/lazr/delegates/docs/usage.rst b/lazr/delegates/docs/index.rst
244similarity index 97%
245rename from lazr/delegates/docs/usage.rst
246rename to lazr/delegates/docs/index.rst
247index 82dc85e..b593f9e 100644
248--- a/lazr/delegates/docs/usage.rst
249+++ b/lazr/delegates/docs/index.rst
250@@ -134,3 +134,10 @@ the expected interfaces.
251 True
252 >>> IFoo2.providedBy(s)
253 True
254+
255+
256+.. toctree::
257+
258+ self
259+ Contributing <CONTRIBUTING>
260+ News <NEWS>
261diff --git a/setup.py b/setup.py
262index 0bdcee8..f0fe050 100755
263--- a/setup.py
264+++ b/setup.py
265@@ -61,6 +61,9 @@ delegating behavior.
266 'Programming Language :: Python :: 3.7',
267 'Programming Language :: Python :: 3.8',
268 ],
269+ extras_require={
270+ "docs": ["Sphinx"],
271+ },
272 # nose plugins don't really work with `python setup.py test` so use
273 # `python setup.py nosetests` instead, or just `tox`. Gosh, we really
274 # should switch to nose2. :/ - BAW 2014-08-20
275diff --git a/tox.ini b/tox.ini
276index 9afcac5..76a9117 100644
277--- a/tox.ini
278+++ b/tox.ini
279@@ -3,3 +3,11 @@ envlist = py27,py32,py33,py34,py35,py36,py37,py38
280
281 [testenv]
282 commands = python setup.py nosetests
283+
284+[testenv:docs]
285+basepython =
286+ python3
287+commands =
288+ sphinx-build -b html -d lazr/delegates/docs/_build/doctrees lazr/delegates/docs lazr/delegates/docs/_build/html
289+deps =
290+ .[docs]

Subscribers

People subscribed via source and target branches

to all changes: