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