Merge pull request #1712 from IanLee1521/qs_todo

Add todo_include_todo into generated quickstart config
This commit is contained in:
Georg Brandl 2015-02-08 09:57:51 +01:00
commit 39bcd5157e
6 changed files with 16 additions and 2 deletions

View File

@ -31,6 +31,7 @@ Other contributors, listed alphabetically, are:
* Blaise Laflamme -- pyramid theme * Blaise Laflamme -- pyramid theme
* Thomas Lamb -- linkcheck builder * Thomas Lamb -- linkcheck builder
* Łukasz Langa -- partial support for autodoc * Łukasz Langa -- partial support for autodoc
* Ian Lee -- quickstart improvements
* Robert Lehmann -- gettext builder (GSOC project) * Robert Lehmann -- gettext builder (GSOC project)
* Dan MacKinlay -- metadata fixes * Dan MacKinlay -- metadata fixes
* Martin Mahner -- nature theme * Martin Mahner -- nature theme

View File

@ -13,6 +13,8 @@ Features added
* The ``language`` config value is now available in the HTML templates. * The ``language`` config value is now available in the HTML templates.
* The ``env-updated`` event can now return a value, which is interpreted * The ``env-updated`` event can now return a value, which is interpreted
as an iterable of additional docnames that need to be rewritten. as an iterable of additional docnames that need to be rewritten.
* Add ``todo_include_todos`` config option to quickstart conf file, handled as
described in documentation.
Bugs fixed Bugs fixed
---------- ----------

View File

@ -363,6 +363,7 @@ Note: By default this script will not overwrite already created files.""")
epub = True, epub = True,
ext_autodoc = True, ext_autodoc = True,
ext_viewcode = True, ext_viewcode = True,
ext_todo = True,
makefile = True, makefile = True,
batchfile = True, batchfile = True,
mastertocmaxdepth = opts.maxdepth, mastertocmaxdepth = opts.maxdepth,

View File

@ -53,6 +53,7 @@ DEFAULT_VALUE = {
'epub': False, 'epub': False,
'ext_autodoc': False, 'ext_autodoc': False,
'ext_doctest': False, 'ext_doctest': False,
'ext_todo': False,
'makefile': True, 'makefile': True,
'batchfile': True, 'batchfile': True,
} }
@ -168,6 +169,9 @@ pygments_style = 'sphinx'
# If true, keep warnings as "system message" paragraphs in the built documents. # If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False #keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = %(ext_todo)s
# -- Options for HTML output ---------------------------------------------- # -- Options for HTML output ----------------------------------------------

View File

@ -1,3 +1,5 @@
nose
mock
six>=1.4 six>=1.4
Jinja2>=2.3 Jinja2>=2.3
Pygments>=2.0 Pygments>=2.0

View File

@ -150,6 +150,7 @@ def test_quickstart_defaults(tempdir):
assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y') assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y')
assert ns['version'] == '0.1' assert ns['version'] == '0.1'
assert ns['release'] == '0.1' assert ns['release'] == '0.1'
assert ns['todo_include_todos'] is False
assert ns['html_static_path'] == ['_static'] assert ns['html_static_path'] == ['_static']
assert ns['latex_documents'] == [ assert ns['latex_documents'] == [
('index', 'SphinxTest.tex', 'Sphinx Test Documentation', ('index', 'SphinxTest.tex', 'Sphinx Test Documentation',
@ -178,7 +179,7 @@ def test_quickstart_all_answers(tempdir):
'autodoc': 'y', 'autodoc': 'y',
'doctest': 'yes', 'doctest': 'yes',
'intersphinx': 'no', 'intersphinx': 'no',
'todo': 'n', 'todo': 'y',
'coverage': 'no', 'coverage': 'no',
'pngmath': 'N', 'pngmath': 'N',
'mathjax': 'no', 'mathjax': 'no',
@ -198,7 +199,9 @@ def test_quickstart_all_answers(tempdir):
assert conffile.isfile() assert conffile.isfile()
ns = {} ns = {}
execfile_(conffile, ns) execfile_(conffile, ns)
assert ns['extensions'] == ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] assert ns['extensions'] == [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'
]
assert ns['templates_path'] == ['.templates'] assert ns['templates_path'] == ['.templates']
assert ns['source_suffix'] == '.txt' assert ns['source_suffix'] == '.txt'
assert ns['master_doc'] == 'contents' assert ns['master_doc'] == 'contents'
@ -207,6 +210,7 @@ def test_quickstart_all_answers(tempdir):
time.strftime('%Y') time.strftime('%Y')
assert ns['version'] == '2.0' assert ns['version'] == '2.0'
assert ns['release'] == '2.0.1' assert ns['release'] == '2.0.1'
assert ns['todo_include_todos'] is True
assert ns['html_static_path'] == ['.static'] assert ns['html_static_path'] == ['.static']
assert ns['latex_documents'] == [ assert ns['latex_documents'] == [
('contents', 'STASI.tex', u'STASI™ Documentation', ('contents', 'STASI.tex', u'STASI™ Documentation',