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