Merge lp:~javier.collado/utah/bug1076437 into lp:utah

Proposed by Javier Collado
Status: Merged
Approved by: Javier Collado
Approved revision: 738
Merged at revision: 737
Proposed branch: lp:~javier.collado/utah/bug1076437
Merge into: lp:utah
Diff against target: 103 lines (+22/-22)
1 file modified
docs/source/conf.py (+22/-22)
To merge this branch: bzr merge lp:~javier.collado/utah/bug1076437
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Review via email: mp+133513@code.launchpad.net

Description of the change

This branch fixes the problem to build the documentation in readthedocs.org

Aside from that, version has been updated to be in sync with debian/changelog and a few pep8 errors in the configuration file have been fixed.

To make sure that the documentation now builds fine I created a temporary project that you can take a look at it here:

https://utah-test.readthedocs.org/en/latest/

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

Looks good to me.

As a question, on lines 17-20, it looks like general parenthesis continuation is done with 4 spaces rather than 8. Is that the standard we should be using elsewhere if we're not trying to line things up with the parenthesis?

review: Approve
Revision history for this message
Javier Collado (javier.collado) wrote :

@Max

Yes, there are some warnings/errors in the new version of the pep8 (tool)
that address over/under-indentation.

What PEP8 (document) says, with regard to that is:
---
Use 4 spaces per indentation level.

For really old code that you don't want to mess up, you can continue to use 8-space tabs.

Continuation lines should align wrapped elements either vertically using Python's implicit line joining inside parentheses, brackets and braces, or using a hanging indent. When using a hanging indent the following considerations should be applied; there should be no arguments on the first line and further indentation should be used to clearly distinguish itself as a continuation line.
---

To get some small examples you can use: "pep8 --show-pep8 <file>". Anyway, as usual,
my advice is to integrate that tool (or pyflakes) into your preferred editor
and get the warnings/errors as you write.

Once all those issues are continuously highlighted, they get so annoying that you end up
fixing them sooner or later.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/source/conf.py'
--- docs/source/conf.py 2012-11-07 09:15:44 +0000
+++ docs/source/conf.py 2012-11-08 16:27:04 +0000
@@ -64,7 +64,7 @@
64# Mock all third party modules not available in the readthedocs.org environment64# Mock all third party modules not available in the readthedocs.org environment
65for mod_name in ('psutil', 'yaml', 'paramiko', 'jsonschema', 'libvirt',65for mod_name in ('psutil', 'yaml', 'paramiko', 'jsonschema', 'libvirt',
66 'bzrlib', 'bzrlib.builtins', 'bzrlib.plugin', 'bzrlib.errors',66 'bzrlib', 'bzrlib.builtins', 'bzrlib.plugin', 'bzrlib.errors',
67 'apt', 'apt.cache'):67 'apt', 'apt.cache', 'netifaces'):
68 sys.modules[mod_name] = ModuleMock(mod_name)68 sys.modules[mod_name] = ModuleMock(mod_name)
6969
7070
@@ -74,11 +74,11 @@
7474
75 help_lines = parser.format_help().splitlines()75 help_lines = parser.format_help().splitlines()
76 options_lines = itertools.dropwhile(76 options_lines = itertools.dropwhile(
77 lambda l: l != 'optional arguments:',77 lambda l: l != 'optional arguments:',
78 help_lines) # Drop usage78 help_lines) # Drop usage
79 options_lines = itertools.takewhile(79 options_lines = itertools.takewhile(
80 lambda l: bool(l),80 lambda l: bool(l),
81 options_lines) # Drop epilog81 options_lines) # Drop epilog
82 options_lines.next() # Drop first line82 options_lines.next() # Drop first line
8383
84 def fix_line(line):84 def fix_line(line):
@@ -169,9 +169,9 @@
169# built documents.169# built documents.
170#170#
171# The short X.Y version.171# The short X.Y version.
172version = '0.4'172version = '0.5'
173# The full version, including alpha/beta/rc tags.173# The full version, including alpha/beta/rc tags.
174release = '0.4'174release = '0.5'
175175
176# The language for content autogenerated by Sphinx. Refer to documentation176# The language for content autogenerated by Sphinx. Refer to documentation
177# for a list of supported languages.177# for a list of supported languages.
@@ -292,22 +292,22 @@
292# -- Options for LaTeX output -------------------------------------------------292# -- Options for LaTeX output -------------------------------------------------
293293
294latex_elements = {294latex_elements = {
295# The paper size ('letterpaper' or 'a4paper').295 # The paper size ('letterpaper' or 'a4paper').
296#'papersize': 'letterpaper',296 #'papersize': 'letterpaper',
297297
298# The font size ('10pt', '11pt' or '12pt').298 # The font size ('10pt', '11pt' or '12pt').
299#'pointsize': '10pt',299 #'pointsize': '10pt',
300300
301# Additional stuff for the LaTeX preamble.301 # Additional stuff for the LaTeX preamble.
302#'preamble': '',302 #'preamble': '',
303}303}
304304
305# Grouping the document tree into LaTeX files. List of tuples305# Grouping the document tree into LaTeX files. List of tuples
306# (source start file, target name, title, author,306# (source start file, target name, title, author,
307# documentclass [howto/manual]).307# documentclass [howto/manual]).
308latex_documents = [308latex_documents = [
309 ('index', 'UTAH.tex', u'UTAH Documentation',309 ('index', 'UTAH.tex', u'UTAH Documentation',
310 u'Canonical Ltd', 'manual'),310 u'Canonical Ltd', 'manual'),
311]311]
312312
313# The name of an image file (relative to this directory) to place at the top of313# The name of an image file (relative to this directory) to place at the top of
@@ -339,14 +339,14 @@
339 ('man/utah', 'utah', u'UTAH client test runner',339 ('man/utah', 'utah', u'UTAH client test runner',
340 [u'Canonical Ltd'], 1),340 [u'Canonical Ltd'], 1),
341 ('man/run_install_test.py', 'run_install_test.py',341 ('man/run_install_test.py', 'run_install_test.py',
342 u'UTAH server test runner (provisioning)', [u'Canonical Ltd'], 1),342 u'UTAH server test runner (provisioning)', [u'Canonical Ltd'], 1),
343 ('man/run_test_cobbler.py', 'run_test_cobbler.py',343 ('man/run_test_cobbler.py', 'run_test_cobbler.py',
344 u'UTAH server test runner (physical hardware)', [u'Canonical Ltd'], 1),344 u'UTAH server test runner (physical hardware)', [u'Canonical Ltd'], 1),
345 ('man/run_test_vm.py', 'run_test_vm.py',345 ('man/run_test_vm.py', 'run_test_vm.py',
346 u'UTAH server test runner (virtual hardware)',346 u'UTAH server test runner (virtual hardware)',
347 [u'Canonical Ltd'], 1),347 [u'Canonical Ltd'], 1),
348 ('man/run_utah_tests.py', 'run_utah_tests.py',348 ('man/run_utah_tests.py', 'run_utah_tests.py',
349 u'UTAH server test runner (any hardware)', [u'Canonical Ltd'], 1),349 u'UTAH server test runner (any hardware)', [u'Canonical Ltd'], 1),
350]350]
351351
352# If true, show URL addresses after external links.352# If true, show URL addresses after external links.
@@ -359,9 +359,9 @@
359# (source start file, target name, title, author,359# (source start file, target name, title, author,
360# dir menu entry, description, category)360# dir menu entry, description, category)
361texinfo_documents = [361texinfo_documents = [
362 ('index', 'UTAH', u'UTAH Documentation',362 ('index', 'UTAH', u'UTAH Documentation',
363 u'Canonical Ltd', 'UTAH', 'One line description of project.',363 u'Canonical Ltd', 'UTAH', 'One line description of project.',
364 'Miscellaneous'),364 'Miscellaneous'),
365]365]
366366
367# Documents to append as an appendix to all manuals.367# Documents to append as an appendix to all manuals.

Subscribers

People subscribed via source and target branches