Merge lp:~cjwatson/lazr.batchnavigator/tox into lp:lazr.batchnavigator
- tox
- Merge into trunk
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | 59 |
Proposed branch: | lp:~cjwatson/lazr.batchnavigator/tox |
Merge into: | lp:lazr.batchnavigator |
Diff against target: |
656 lines (+263/-227) 14 files modified
.bzrignore (+9/-10) HACKING.rst (+1/-6) MANIFEST.in (+5/-3) _bootstrap/COPYRIGHT.txt (+0/-9) _bootstrap/LICENSE.txt (+0/-54) _bootstrap/bootstrap.py (+0/-78) buildout.cfg (+0/-33) setup.py (+15/-11) src/lazr/batchnavigator/docs/Makefile (+20/-0) src/lazr/batchnavigator/docs/NEWS.rst (+5/-0) src/lazr/batchnavigator/docs/conf.py (+171/-0) src/lazr/batchnavigator/docs/index.rst (+9/-10) src/lazr/batchnavigator/tests/test_docs.py (+11/-13) tox.ini (+17/-0) |
To merge this branch: | bzr merge lp:~cjwatson/lazr.batchnavigator/tox |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+345223@code.launchpad.net |
Commit message
Add tox testing support and drop buildout.
Description of the change
To post a comment you must log in.
Revision history for this message
William Grant (wgrant) : | # |
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2011-04-05 02:29:05 +0000 | |||
3 | +++ .bzrignore 2018-05-08 10:25:49 +0000 | |||
4 | @@ -1,13 +1,12 @@ | |||
5 | 1 | *.egg-info | ||
6 | 2 | *.pyc | ||
7 | 3 | __pycache__ | ||
8 | 4 | .testrepository | ||
9 | 5 | .tox | ||
10 | 1 | bin | 6 | bin |
16 | 2 | develop-eggs | 7 | build |
17 | 3 | .installed.cfg | 8 | dist |
18 | 4 | develop-eggs | 9 | MANIFEST |
14 | 5 | parts | ||
15 | 6 | *.egg-info | ||
19 | 7 | tags | 10 | tags |
20 | 8 | TAGS | 11 | TAGS |
26 | 9 | build | 12 | src/lazr/batchnavigator/docs/_build |
22 | 10 | *.egg | ||
23 | 11 | dist | ||
24 | 12 | eggs | ||
25 | 13 | .testrepository | ||
27 | 14 | 13 | ||
28 | === renamed file 'HACKING.txt' => 'HACKING.rst' | |||
29 | --- HACKING.txt 2011-04-03 22:07:03 +0000 | |||
30 | +++ HACKING.rst 2018-05-08 10:25:49 +0000 | |||
31 | @@ -14,16 +14,11 @@ | |||
32 | 14 | along with lazr.batchnavigator. If not, see | 14 | along with lazr.batchnavigator. If not, see |
33 | 15 | <http://www.gnu.org/licenses/>. | 15 | <http://www.gnu.org/licenses/>. |
34 | 16 | 16 | ||
35 | 17 | This project uses zc.buildout for development. | ||
36 | 18 | |||
37 | 19 | ============ | 17 | ============ |
38 | 20 | Introduction | 18 | Introduction |
39 | 21 | ============ | 19 | ============ |
40 | 22 | 20 | ||
45 | 23 | These are guidelines for hacking on the lazr.batchnavigator project. But first, | 21 | To run this project's tests, use `tox <https://tox.readthedocs.io/en/latest/>`. |
42 | 24 | please see the common hacking guidelines at: | ||
43 | 25 | |||
44 | 26 | http://dev.launchpad.net/Hacking | ||
46 | 27 | 22 | ||
47 | 28 | 23 | ||
48 | 29 | Getting help | 24 | Getting help |
49 | 30 | 25 | ||
50 | === modified file 'MANIFEST.in' | |||
51 | --- MANIFEST.in 2015-07-08 11:03:54 +0000 | |||
52 | +++ MANIFEST.in 2018-05-08 10:25:49 +0000 | |||
53 | @@ -1,3 +1,5 @@ | |||
57 | 1 | recursive-include src *.txt *.pt *.zcml *.xsd | 1 | include COPYING.txt HACKING.rst |
58 | 2 | exclude MANIFEST.in buildout.cfg bootstrap.py .bzrignore | 2 | recursive-include src *.txt *.rst *.pt *.zcml *.xsd |
59 | 3 | prune _bootstrap | 3 | include src/lazr/batchnavigator/docs/Makefile |
60 | 4 | prune src/lazr/batchnavigator/docs/_build | ||
61 | 5 | exclude MANIFEST.in .bzrignore | ||
62 | 4 | 6 | ||
63 | === renamed file 'README.txt' => 'README.rst' | |||
64 | === removed directory '_bootstrap' | |||
65 | === removed file '_bootstrap/COPYRIGHT.txt' | |||
66 | --- _bootstrap/COPYRIGHT.txt 2009-03-24 15:07:42 +0000 | |||
67 | +++ _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000 | |||
68 | @@ -1,9 +0,0 @@ | |||
69 | 1 | Copyright (c) 2004-2009 Zope Corporation and Contributors. | ||
70 | 2 | All Rights Reserved. | ||
71 | 3 | |||
72 | 4 | This software is subject to the provisions of the Zope Public License, | ||
73 | 5 | Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
74 | 6 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
75 | 7 | WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
76 | 8 | WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
77 | 9 | FOR A PARTICULAR PURPOSE. | ||
78 | 10 | 0 | ||
79 | === removed file '_bootstrap/LICENSE.txt' | |||
80 | --- _bootstrap/LICENSE.txt 2009-03-24 15:07:42 +0000 | |||
81 | +++ _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000 | |||
82 | @@ -1,54 +0,0 @@ | |||
83 | 1 | Zope Public License (ZPL) Version 2.1 | ||
84 | 2 | ------------------------------------- | ||
85 | 3 | |||
86 | 4 | A copyright notice accompanies this license document that | ||
87 | 5 | identifies the copyright holders. | ||
88 | 6 | |||
89 | 7 | This license has been certified as open source. It has also | ||
90 | 8 | been designated as GPL compatible by the Free Software | ||
91 | 9 | Foundation (FSF). | ||
92 | 10 | |||
93 | 11 | Redistribution and use in source and binary forms, with or | ||
94 | 12 | without modification, are permitted provided that the | ||
95 | 13 | following conditions are met: | ||
96 | 14 | |||
97 | 15 | 1. Redistributions in source code must retain the | ||
98 | 16 | accompanying copyright notice, this list of conditions, | ||
99 | 17 | and the following disclaimer. | ||
100 | 18 | |||
101 | 19 | 2. Redistributions in binary form must reproduce the accompanying | ||
102 | 20 | copyright notice, this list of conditions, and the | ||
103 | 21 | following disclaimer in the documentation and/or other | ||
104 | 22 | materials provided with the distribution. | ||
105 | 23 | |||
106 | 24 | 3. Names of the copyright holders must not be used to | ||
107 | 25 | endorse or promote products derived from this software | ||
108 | 26 | without prior written permission from the copyright | ||
109 | 27 | holders. | ||
110 | 28 | |||
111 | 29 | 4. The right to distribute this software or to use it for | ||
112 | 30 | any purpose does not give you the right to use | ||
113 | 31 | Servicemarks (sm) or Trademarks (tm) of the copyright | ||
114 | 32 | holders. Use of them is covered by separate agreement | ||
115 | 33 | with the copyright holders. | ||
116 | 34 | |||
117 | 35 | 5. If any files are modified, you must cause the modified | ||
118 | 36 | files to carry prominent notices stating that you changed | ||
119 | 37 | the files and the date of any change. | ||
120 | 38 | |||
121 | 39 | Disclaimer | ||
122 | 40 | |||
123 | 41 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' | ||
124 | 42 | AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
125 | 43 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
126 | 44 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
127 | 45 | NO EVENT SHALL THE COPYRIGHT HOLDERS BE | ||
128 | 46 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
129 | 47 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
130 | 48 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
131 | 49 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
132 | 50 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
133 | 51 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
134 | 52 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
135 | 53 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
136 | 54 | DAMAGE. | ||
137 | 55 | \ No newline at end of file | 0 | \ No newline at end of file |
138 | 56 | 1 | ||
139 | === removed file '_bootstrap/bootstrap.py' | |||
140 | --- _bootstrap/bootstrap.py 2011-04-03 21:35:55 +0000 | |||
141 | +++ _bootstrap/bootstrap.py 1970-01-01 00:00:00 +0000 | |||
142 | @@ -1,78 +0,0 @@ | |||
143 | 1 | #!/usr/bin/env python | ||
144 | 2 | ############################################################################## | ||
145 | 3 | # | ||
146 | 4 | # Copyright (c) 2006 Zope Corporation and Contributors. | ||
147 | 5 | # All Rights Reserved. | ||
148 | 6 | # | ||
149 | 7 | # This software is subject to the provisions of the Zope Public License, | ||
150 | 8 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
151 | 9 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
152 | 10 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
153 | 11 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
154 | 12 | # FOR A PARTICULAR PURPOSE. | ||
155 | 13 | # | ||
156 | 14 | ############################################################################## | ||
157 | 15 | """Bootstrap a buildout-based project | ||
158 | 16 | |||
159 | 17 | Simply run this script in a directory containing a buildout.cfg. | ||
160 | 18 | The script accepts buildout command-line options, so you can | ||
161 | 19 | use the -c option to specify an alternate configuration file. | ||
162 | 20 | |||
163 | 21 | $Id$ | ||
164 | 22 | """ | ||
165 | 23 | |||
166 | 24 | import os, shutil, sys, tempfile, urllib2 | ||
167 | 25 | |||
168 | 26 | tmpeggs = tempfile.mkdtemp() | ||
169 | 27 | |||
170 | 28 | is_jython = sys.platform.startswith('java') | ||
171 | 29 | |||
172 | 30 | try: | ||
173 | 31 | import pkg_resources | ||
174 | 32 | except ImportError: | ||
175 | 33 | ez = {} | ||
176 | 34 | exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' | ||
177 | 35 | ).read() in ez | ||
178 | 36 | ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) | ||
179 | 37 | |||
180 | 38 | import pkg_resources | ||
181 | 39 | |||
182 | 40 | if sys.platform == 'win32': | ||
183 | 41 | def quote(c): | ||
184 | 42 | if ' ' in c: | ||
185 | 43 | return '"%s"' % c # work around spawn lamosity on windows | ||
186 | 44 | else: | ||
187 | 45 | return c | ||
188 | 46 | else: | ||
189 | 47 | def quote (c): | ||
190 | 48 | return c | ||
191 | 49 | |||
192 | 50 | cmd = 'from setuptools.command.easy_install import main; main()' | ||
193 | 51 | ws = pkg_resources.working_set | ||
194 | 52 | |||
195 | 53 | if is_jython: | ||
196 | 54 | import subprocess | ||
197 | 55 | |||
198 | 56 | assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', | ||
199 | 57 | quote(tmpeggs), 'zc.buildout'], | ||
200 | 58 | env=dict(os.environ, | ||
201 | 59 | PYTHONPATH= | ||
202 | 60 | ws.find(pkg_resources.Requirement.parse('setuptools')).location | ||
203 | 61 | ), | ||
204 | 62 | ).wait() == 0 | ||
205 | 63 | |||
206 | 64 | else: | ||
207 | 65 | assert os.spawnle( | ||
208 | 66 | os.P_WAIT, sys.executable, quote (sys.executable), | ||
209 | 67 | '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout', | ||
210 | 68 | dict(os.environ, | ||
211 | 69 | PYTHONPATH= | ||
212 | 70 | ws.find(pkg_resources.Requirement.parse('setuptools')).location | ||
213 | 71 | ), | ||
214 | 72 | ) == 0 | ||
215 | 73 | |||
216 | 74 | ws.add_entry(tmpeggs) | ||
217 | 75 | ws.require('zc.buildout') | ||
218 | 76 | import zc.buildout.buildout | ||
219 | 77 | zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) | ||
220 | 78 | shutil.rmtree(tmpeggs) | ||
221 | 79 | 0 | ||
222 | === removed symlink 'bootstrap.py' | |||
223 | === target was u'_bootstrap/bootstrap.py' | |||
224 | === removed file 'buildout.cfg' | |||
225 | --- buildout.cfg 2011-04-03 23:07:50 +0000 | |||
226 | +++ buildout.cfg 1970-01-01 00:00:00 +0000 | |||
227 | @@ -1,33 +0,0 @@ | |||
228 | 1 | [buildout] | ||
229 | 2 | parts = | ||
230 | 3 | interpreter | ||
231 | 4 | test | ||
232 | 5 | docs | ||
233 | 6 | tags | ||
234 | 7 | unzip = true | ||
235 | 8 | |||
236 | 9 | develop = . | ||
237 | 10 | |||
238 | 11 | newest = false | ||
239 | 12 | |||
240 | 13 | [test] | ||
241 | 14 | recipe = zc.recipe.testrunner | ||
242 | 15 | eggs = lazr.batchnavigator | ||
243 | 16 | defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split() | ||
244 | 17 | |||
245 | 18 | [docs] | ||
246 | 19 | recipe = z3c.recipe.sphinxdoc | ||
247 | 20 | eggs = lazr.batchnavigator [docs] | ||
248 | 21 | index-doc = README | ||
249 | 22 | default.css = | ||
250 | 23 | layout.html = | ||
251 | 24 | |||
252 | 25 | [interpreter] | ||
253 | 26 | recipe = zc.recipe.egg | ||
254 | 27 | interpreter=py | ||
255 | 28 | eggs = lazr.batchnavigator | ||
256 | 29 | docutils | ||
257 | 30 | |||
258 | 31 | [tags] | ||
259 | 32 | recipe = z3c.recipe.tag:tags | ||
260 | 33 | eggs = lazr.batchnavigator | ||
261 | 34 | 0 | ||
262 | === modified file 'setup.py' | |||
263 | --- setup.py 2015-07-08 11:04:14 +0000 | |||
264 | +++ setup.py 2018-05-08 10:25:49 +0000 | |||
265 | @@ -22,7 +22,7 @@ | |||
266 | 22 | def generate(*docname_or_string): | 22 | def generate(*docname_or_string): |
267 | 23 | res = [] | 23 | res = [] |
268 | 24 | for value in docname_or_string: | 24 | for value in docname_or_string: |
270 | 25 | if value.endswith('.txt'): | 25 | if value.endswith('.rst'): |
271 | 26 | f = open(value) | 26 | f = open(value) |
272 | 27 | value = f.read() | 27 | value = f.read() |
273 | 28 | f.close() | 28 | f.close() |
274 | @@ -34,40 +34,44 @@ | |||
275 | 34 | 34 | ||
276 | 35 | __version__ = open("src/lazr/batchnavigator/version.txt").read().strip() | 35 | __version__ = open("src/lazr/batchnavigator/version.txt").read().strip() |
277 | 36 | 36 | ||
278 | 37 | tests_require = [ | ||
279 | 38 | 'testtools', | ||
280 | 39 | 'zope.publisher', | ||
281 | 40 | 'zope.testrunner', | ||
282 | 41 | ] | ||
283 | 42 | |||
284 | 37 | setup( | 43 | setup( |
285 | 38 | name='lazr.batchnavigator', | 44 | name='lazr.batchnavigator', |
286 | 39 | version=__version__, | 45 | version=__version__, |
287 | 40 | namespace_packages=['lazr'], | 46 | namespace_packages=['lazr'], |
288 | 41 | packages=find_packages('src'), | 47 | packages=find_packages('src'), |
290 | 42 | package_dir={'':'src'}, | 48 | package_dir={'': 'src'}, |
291 | 43 | include_package_data=True, | 49 | include_package_data=True, |
292 | 44 | zip_safe=False, | 50 | zip_safe=False, |
293 | 45 | maintainer='LAZR Developers', | 51 | maintainer='LAZR Developers', |
294 | 46 | maintainer_email='lazr-users@lists.launchpad.net', | 52 | maintainer_email='lazr-users@lists.launchpad.net', |
296 | 47 | description=open('README.txt').readline().strip(), | 53 | description=open('README.rst').readline().strip(), |
297 | 48 | long_description=generate( | 54 | long_description=generate( |
300 | 49 | 'src/lazr/batchnavigator/README.txt', | 55 | 'src/lazr/batchnavigator/docs/index.rst', |
301 | 50 | 'src/lazr/batchnavigator/NEWS.txt'), | 56 | 'src/lazr/batchnavigator/docs/NEWS.rst'), |
302 | 51 | license='LGPL v3', | 57 | license='LGPL v3', |
303 | 52 | install_requires=[ | 58 | install_requires=[ |
304 | 53 | 'fixtures', | ||
305 | 54 | 'setuptools', | 59 | 'setuptools', |
306 | 55 | 'testtools', | ||
307 | 56 | 'zope.cachedescriptors', | 60 | 'zope.cachedescriptors', |
308 | 57 | 'zope.interface', | 61 | 'zope.interface', |
309 | 58 | 'zope.publisher', | ||
310 | 59 | ], | 62 | ], |
311 | 60 | url='https://launchpad.net/lazr.batchnavigator', | 63 | url='https://launchpad.net/lazr.batchnavigator', |
313 | 61 | download_url= 'https://launchpad.net/lazr.batchnavigator/+download', | 64 | download_url='https://launchpad.net/lazr.batchnavigator/+download', |
314 | 62 | classifiers=[ | 65 | classifiers=[ |
315 | 63 | "Development Status :: 5 - Production/Stable", | 66 | "Development Status :: 5 - Production/Stable", |
316 | 64 | "Intended Audience :: Developers", | 67 | "Intended Audience :: Developers", |
317 | 65 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", | 68 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", |
318 | 66 | "Operating System :: OS Independent", | 69 | "Operating System :: OS Independent", |
319 | 67 | "Programming Language :: Python"], | 70 | "Programming Language :: Python"], |
320 | 71 | tests_require=tests_require, | ||
321 | 68 | extras_require=dict( | 72 | extras_require=dict( |
324 | 69 | docs=['Sphinx', | 73 | docs=['Sphinx'], |
325 | 70 | 'z3c.recipe.sphinxdoc'] | 74 | test=tests_require, |
326 | 71 | ), | 75 | ), |
327 | 72 | test_suite='lazr.batchnavigator.tests', | 76 | test_suite='lazr.batchnavigator.tests', |
328 | 73 | ) | 77 | ) |
329 | 74 | 78 | ||
330 | === added directory 'src/lazr/batchnavigator/docs' | |||
331 | === added file 'src/lazr/batchnavigator/docs/Makefile' | |||
332 | --- src/lazr/batchnavigator/docs/Makefile 1970-01-01 00:00:00 +0000 | |||
333 | +++ src/lazr/batchnavigator/docs/Makefile 2018-05-08 10:25:49 +0000 | |||
334 | @@ -0,0 +1,20 @@ | |||
335 | 1 | # Minimal makefile for Sphinx documentation | ||
336 | 2 | # | ||
337 | 3 | |||
338 | 4 | # You can set these variables from the command line. | ||
339 | 5 | SPHINXOPTS = | ||
340 | 6 | SPHINXBUILD = sphinx-build | ||
341 | 7 | SPHINXPROJ = lazrbatchnavigator | ||
342 | 8 | SOURCEDIR = . | ||
343 | 9 | BUILDDIR = _build | ||
344 | 10 | |||
345 | 11 | # Put it first so that "make" without argument is like "make help". | ||
346 | 12 | help: | ||
347 | 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
348 | 14 | |||
349 | 15 | .PHONY: help Makefile | ||
350 | 16 | |||
351 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new | ||
352 | 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
353 | 19 | %: Makefile | ||
354 | 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
355 | 0 | \ No newline at end of file | 21 | \ No newline at end of file |
356 | 1 | 22 | ||
357 | === renamed file 'src/lazr/batchnavigator/NEWS.txt' => 'src/lazr/batchnavigator/docs/NEWS.rst' | |||
358 | --- src/lazr/batchnavigator/NEWS.txt 2015-04-09 13:48:10 +0000 | |||
359 | +++ src/lazr/batchnavigator/docs/NEWS.rst 2018-05-08 10:25:49 +0000 | |||
360 | @@ -2,6 +2,11 @@ | |||
361 | 2 | NEWS for lazr.batchnavigator | 2 | NEWS for lazr.batchnavigator |
362 | 3 | ============================ | 3 | ============================ |
363 | 4 | 4 | ||
364 | 5 | 1.2.12 | ||
365 | 6 | ====== | ||
366 | 7 | |||
367 | 8 | - Switch from buildout to tox. | ||
368 | 9 | |||
369 | 5 | 1.2.11 (2015-04-09) | 10 | 1.2.11 (2015-04-09) |
370 | 6 | =================== | 11 | =================== |
371 | 7 | 12 | ||
372 | 8 | 13 | ||
373 | === added file 'src/lazr/batchnavigator/docs/conf.py' | |||
374 | --- src/lazr/batchnavigator/docs/conf.py 1970-01-01 00:00:00 +0000 | |||
375 | +++ src/lazr/batchnavigator/docs/conf.py 2018-05-08 10:25:49 +0000 | |||
376 | @@ -0,0 +1,171 @@ | |||
377 | 1 | # -*- coding: utf-8 -*- | ||
378 | 2 | # | ||
379 | 3 | # lazr.batchnavigator documentation build configuration file, created by | ||
380 | 4 | # sphinx-quickstart on Tue May 8 08:57:03 2018. | ||
381 | 5 | # | ||
382 | 6 | # This file is execfile()d with the current directory set to its | ||
383 | 7 | # containing dir. | ||
384 | 8 | # | ||
385 | 9 | # Note that not all possible configuration values are present in this | ||
386 | 10 | # autogenerated file. | ||
387 | 11 | # | ||
388 | 12 | # All configuration values have a default; values that are commented out | ||
389 | 13 | # serve to show the default. | ||
390 | 14 | |||
391 | 15 | with open('../version.txt') as version_file: | ||
392 | 16 | _version = version_file.read().strip() | ||
393 | 17 | |||
394 | 18 | # If extensions (or modules to document with autodoc) are in another directory, | ||
395 | 19 | # add these directories to sys.path here. If the directory is relative to the | ||
396 | 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
397 | 21 | # | ||
398 | 22 | # import os | ||
399 | 23 | # import sys | ||
400 | 24 | # sys.path.insert(0, os.path.abspath('.')) | ||
401 | 25 | |||
402 | 26 | |||
403 | 27 | # -- General configuration ------------------------------------------------ | ||
404 | 28 | |||
405 | 29 | # If your documentation needs a minimal Sphinx version, state it here. | ||
406 | 30 | # | ||
407 | 31 | # needs_sphinx = '1.0' | ||
408 | 32 | |||
409 | 33 | # Add any Sphinx extension module names here, as strings. They can be | ||
410 | 34 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
411 | 35 | # ones. | ||
412 | 36 | extensions = [] | ||
413 | 37 | |||
414 | 38 | # Add any paths that contain templates here, relative to this directory. | ||
415 | 39 | templates_path = ['_templates'] | ||
416 | 40 | |||
417 | 41 | # The suffix(es) of source filenames. | ||
418 | 42 | # You can specify multiple suffix as a list of string: | ||
419 | 43 | # | ||
420 | 44 | # source_suffix = ['.rst', '.md'] | ||
421 | 45 | source_suffix = '.rst' | ||
422 | 46 | |||
423 | 47 | # The master toctree document. | ||
424 | 48 | master_doc = 'index' | ||
425 | 49 | |||
426 | 50 | # General information about the project. | ||
427 | 51 | project = u'lazr.batchnavigator' | ||
428 | 52 | copyright = u'2004-2018, Canonical Ltd.' | ||
429 | 53 | author = u'LAZR Developers <lazr-developers@lists.launchpad.net>' | ||
430 | 54 | |||
431 | 55 | # The version info for the project you're documenting, acts as replacement for | ||
432 | 56 | # |version| and |release|, also used in various other places throughout the | ||
433 | 57 | # built documents. | ||
434 | 58 | # | ||
435 | 59 | # The short X.Y version. | ||
436 | 60 | version = _version | ||
437 | 61 | # The full version, including alpha/beta/rc tags. | ||
438 | 62 | release = _version | ||
439 | 63 | |||
440 | 64 | # The language for content autogenerated by Sphinx. Refer to documentation | ||
441 | 65 | # for a list of supported languages. | ||
442 | 66 | # | ||
443 | 67 | # This is also used if you do content translation via gettext catalogs. | ||
444 | 68 | # Usually you set "language" from the command line for these cases. | ||
445 | 69 | language = None | ||
446 | 70 | |||
447 | 71 | # List of patterns, relative to source directory, that match files and | ||
448 | 72 | # directories to ignore when looking for source files. | ||
449 | 73 | # This patterns also effect to html_static_path and html_extra_path | ||
450 | 74 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
451 | 75 | |||
452 | 76 | # The name of the Pygments (syntax highlighting) style to use. | ||
453 | 77 | pygments_style = 'sphinx' | ||
454 | 78 | |||
455 | 79 | # If true, `todo` and `todoList` produce output, else they produce nothing. | ||
456 | 80 | todo_include_todos = False | ||
457 | 81 | |||
458 | 82 | |||
459 | 83 | # -- Options for HTML output ---------------------------------------------- | ||
460 | 84 | |||
461 | 85 | # The theme to use for HTML and HTML Help pages. See the documentation for | ||
462 | 86 | # a list of builtin themes. | ||
463 | 87 | # | ||
464 | 88 | html_theme = 'alabaster' | ||
465 | 89 | |||
466 | 90 | # Theme options are theme-specific and customize the look and feel of a theme | ||
467 | 91 | # further. For a list of options available for each theme, see the | ||
468 | 92 | # documentation. | ||
469 | 93 | # | ||
470 | 94 | # html_theme_options = {} | ||
471 | 95 | |||
472 | 96 | # Add any paths that contain custom static files (such as style sheets) here, | ||
473 | 97 | # relative to this directory. They are copied after the builtin static files, | ||
474 | 98 | # so a file named "default.css" will overwrite the builtin "default.css". | ||
475 | 99 | #html_static_path = ['_static'] | ||
476 | 100 | |||
477 | 101 | # Custom sidebar templates, must be a dictionary that maps document names | ||
478 | 102 | # to template names. | ||
479 | 103 | # | ||
480 | 104 | # This is required for the alabaster theme | ||
481 | 105 | # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars | ||
482 | 106 | html_sidebars = { | ||
483 | 107 | '**': [ | ||
484 | 108 | 'relations.html', # needs 'show_related': True theme option to display | ||
485 | 109 | 'searchbox.html', | ||
486 | 110 | ] | ||
487 | 111 | } | ||
488 | 112 | |||
489 | 113 | |||
490 | 114 | # -- Options for HTMLHelp output ------------------------------------------ | ||
491 | 115 | |||
492 | 116 | # Output file base name for HTML help builder. | ||
493 | 117 | htmlhelp_basename = 'lazrbatchnavigatordoc' | ||
494 | 118 | |||
495 | 119 | |||
496 | 120 | # -- Options for LaTeX output --------------------------------------------- | ||
497 | 121 | |||
498 | 122 | latex_elements = { | ||
499 | 123 | # The paper size ('letterpaper' or 'a4paper'). | ||
500 | 124 | # | ||
501 | 125 | # 'papersize': 'letterpaper', | ||
502 | 126 | |||
503 | 127 | # The font size ('10pt', '11pt' or '12pt'). | ||
504 | 128 | # | ||
505 | 129 | # 'pointsize': '10pt', | ||
506 | 130 | |||
507 | 131 | # Additional stuff for the LaTeX preamble. | ||
508 | 132 | # | ||
509 | 133 | # 'preamble': '', | ||
510 | 134 | |||
511 | 135 | # Latex figure (float) alignment | ||
512 | 136 | # | ||
513 | 137 | # 'figure_align': 'htbp', | ||
514 | 138 | } | ||
515 | 139 | |||
516 | 140 | # Grouping the document tree into LaTeX files. List of tuples | ||
517 | 141 | # (source start file, target name, title, | ||
518 | 142 | # author, documentclass [howto, manual, or own class]). | ||
519 | 143 | latex_documents = [ | ||
520 | 144 | (master_doc, 'lazrbatchnavigator.tex', u'lazr.batchnavigator Documentation', | ||
521 | 145 | u'LAZR Developers \\textless{}lazr-developers@lists.launchpad.net\\textgreater{}\'', 'manual'), | ||
522 | 146 | ] | ||
523 | 147 | |||
524 | 148 | |||
525 | 149 | # -- Options for manual page output --------------------------------------- | ||
526 | 150 | |||
527 | 151 | # One entry per manual page. List of tuples | ||
528 | 152 | # (source start file, name, description, authors, manual section). | ||
529 | 153 | man_pages = [ | ||
530 | 154 | (master_doc, 'lazrbatchnavigator', u'lazr.batchnavigator Documentation', | ||
531 | 155 | [author], 1) | ||
532 | 156 | ] | ||
533 | 157 | |||
534 | 158 | |||
535 | 159 | # -- Options for Texinfo output ------------------------------------------- | ||
536 | 160 | |||
537 | 161 | # Grouping the document tree into Texinfo files. List of tuples | ||
538 | 162 | # (source start file, target name, title, author, | ||
539 | 163 | # dir menu entry, description, category) | ||
540 | 164 | texinfo_documents = [ | ||
541 | 165 | (master_doc, 'lazrbatchnavigator', u'lazr.batchnavigator Documentation', | ||
542 | 166 | author, 'lazrbatchnavigator', 'One line description of project.', | ||
543 | 167 | 'Miscellaneous'), | ||
544 | 168 | ] | ||
545 | 169 | |||
546 | 170 | |||
547 | 171 | |||
548 | 0 | 172 | ||
549 | === renamed file 'src/lazr/batchnavigator/README.txt' => 'src/lazr/batchnavigator/docs/index.rst' | |||
550 | --- src/lazr/batchnavigator/README.txt 2011-04-06 03:14:16 +0000 | |||
551 | +++ src/lazr/batchnavigator/docs/index.rst 2018-05-08 10:25:49 +0000 | |||
552 | @@ -24,17 +24,17 @@ | |||
553 | 24 | It uses four query/POST arguments to control the batching: | 24 | It uses four query/POST arguments to control the batching: |
554 | 25 | 25 | ||
555 | 26 | - memo: A record of the underlying storage index pointer for the position of | 26 | - memo: A record of the underlying storage index pointer for the position of |
557 | 27 | the batch. | 27 | the batch. |
558 | 28 | - direction: Indicates whether the memo is at the start or end of the batch. | 28 | - direction: Indicates whether the memo is at the start or end of the batch. |
559 | 29 | - start: Cosmetic - used to calculate the apparent location (but note that | 29 | - start: Cosmetic - used to calculate the apparent location (but note that |
565 | 30 | due to the concurrent nature of repeated visits to batches that the | 30 | due to the concurrent nature of repeated visits to batches that the |
566 | 31 | true offset may differ - however the collection won't skip or show | 31 | true offset may differ - however the collection won't skip or show |
567 | 32 | items twice. For compatibility with saved URLs, if memo and | 32 | items twice. For compatibility with saved URLs, if memo and |
568 | 33 | direction are both missing then start is used to do list slicing | 33 | direction are both missing then start is used to do list slicing |
569 | 34 | into the collection. | 34 | into the collection. |
570 | 35 | - batch: Controls the amount of items we are showing per batch. It will only | 35 | - batch: Controls the amount of items we are showing per batch. It will only |
573 | 36 | appear if it's different from the default value set when the batch | 36 | appear if it's different from the default value set when the batch |
574 | 37 | is created. | 37 | is created. |
575 | 38 | 38 | ||
576 | 39 | These values can be overriden in the request, unless you also pass | 39 | These values can be overriden in the request, unless you also pass |
577 | 40 | force_start=True, which will make the start argument (again, defaulting to 0) | 40 | force_start=True, which will make the start argument (again, defaulting to 0) |
578 | @@ -524,5 +524,4 @@ | |||
579 | 524 | .. toctree:: | 524 | .. toctree:: |
580 | 525 | :glob: | 525 | :glob: |
581 | 526 | 526 | ||
584 | 527 | * | 527 | NEWS |
583 | 528 | docs/* | ||
585 | 529 | 528 | ||
586 | === modified file 'src/lazr/batchnavigator/tests/test_docs.py' | |||
587 | --- src/lazr/batchnavigator/tests/test_docs.py 2009-03-23 16:14:28 +0000 | |||
588 | +++ src/lazr/batchnavigator/tests/test_docs.py 2018-05-08 10:25:49 +0000 | |||
589 | @@ -17,14 +17,13 @@ | |||
590 | 17 | 17 | ||
591 | 18 | __metaclass__ = type | 18 | __metaclass__ = type |
592 | 19 | __all__ = [ | 19 | __all__ = [ |
594 | 20 | 'additional_tests', | 20 | 'load_tests', |
595 | 21 | ] | 21 | ] |
596 | 22 | 22 | ||
597 | 23 | import atexit | 23 | import atexit |
598 | 24 | import doctest | 24 | import doctest |
599 | 25 | import os | 25 | import os |
600 | 26 | import pkg_resources | 26 | import pkg_resources |
601 | 27 | import unittest | ||
602 | 28 | 27 | ||
603 | 29 | DOCTEST_FLAGS = ( | 28 | DOCTEST_FLAGS = ( |
604 | 30 | doctest.ELLIPSIS | | 29 | doctest.ELLIPSIS | |
605 | @@ -32,19 +31,18 @@ | |||
606 | 32 | doctest.REPORT_NDIFF) | 31 | doctest.REPORT_NDIFF) |
607 | 33 | 32 | ||
608 | 34 | 33 | ||
614 | 35 | def additional_tests(): | 34 | def load_tests(loader, tests, pattern): |
615 | 36 | "Run the doc tests (README.txt and docs/*, if any exist)" | 35 | """Load all the doctests.""" |
616 | 37 | doctest_files = [ | 36 | atexit.register(pkg_resources.cleanup_resources) |
617 | 38 | os.path.abspath( | 37 | doctest_files = [] |
613 | 39 | pkg_resources.resource_filename('lazr.batchnavigator', 'README.txt'))] | ||
618 | 40 | if pkg_resources.resource_exists('lazr.batchnavigator', 'docs'): | 38 | if pkg_resources.resource_exists('lazr.batchnavigator', 'docs'): |
621 | 41 | for name in pkg_resources.resource_listdir('lazr.batchnavigator', 'docs'): | 39 | for name in pkg_resources.resource_listdir( |
622 | 42 | if name.endswith('.txt'): | 40 | 'lazr.batchnavigator', 'docs'): |
623 | 41 | if name.endswith('.rst'): | ||
624 | 43 | doctest_files.append( | 42 | doctest_files.append( |
625 | 44 | os.path.abspath( | 43 | os.path.abspath( |
626 | 45 | pkg_resources.resource_filename( | 44 | pkg_resources.resource_filename( |
627 | 46 | 'lazr.batchnavigator', 'docs/%s' % name))) | 45 | 'lazr.batchnavigator', 'docs/%s' % name))) |
632 | 47 | kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS) | 46 | tests.addTest(doctest.DocFileSuite( |
633 | 48 | atexit.register(pkg_resources.cleanup_resources) | 47 | *doctest_files, module_relative=False, optionflags=DOCTEST_FLAGS)) |
634 | 49 | return unittest.TestSuite(( | 48 | return tests |
631 | 50 | doctest.DocFileSuite(*doctest_files, **kwargs))) | ||
635 | 51 | 49 | ||
636 | === added file 'tox.ini' | |||
637 | --- tox.ini 1970-01-01 00:00:00 +0000 | |||
638 | +++ tox.ini 2018-05-08 10:25:49 +0000 | |||
639 | @@ -0,0 +1,17 @@ | |||
640 | 1 | [tox] | ||
641 | 2 | envlist = | ||
642 | 3 | py27,docs | ||
643 | 4 | |||
644 | 5 | [testenv] | ||
645 | 6 | commands = | ||
646 | 7 | zope-testrunner --test-path src --tests-pattern ^tests {posargs} | ||
647 | 8 | deps = | ||
648 | 9 | .[test] | ||
649 | 10 | |||
650 | 11 | [testenv:docs] | ||
651 | 12 | basepython = | ||
652 | 13 | python2.7 | ||
653 | 14 | commands = | ||
654 | 15 | sphinx-build -b html -d src/lazr/batchnavigator/docs/_build/doctrees src/lazr/batchnavigator/docs src/lazr/batchnavigator/docs/_build/html | ||
655 | 16 | deps = | ||
656 | 17 | .[docs] |