summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-26 17:30:41 -0500
committerGitHub <noreply@github.com>2020-01-26 17:30:41 -0500
commit3d19fc9d525929904e64c8c31ba914bfd8c868a4 (patch)
treeacab882c27707818b644d1d5c778436d9131c2c0 /tasks.py
parent91ab799f293f0789bbb2759aaabc13c00da36b03 (diff)
parent8e33bed3f57c7667e132148af76fe646d837e232 (diff)
downloadcmd2-git-3d19fc9d525929904e64c8c31ba914bfd8c868a4.tar.gz
Merge pull request #859 from python-cmd2/doc_links
Fixed broken links in Sphinx docs
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index f7df006b..ed0004a6 100644
--- a/tasks.py
+++ b/tasks.py
@@ -45,7 +45,7 @@ namespace.add_collection(namespace_clean, 'clean')
@invoke.task
def pytest(context):
"Run tests and code coverage using pytest"
- context.run("pytest --cov=cmd2 --cov-report=term --cov-report=html")
+ context.run("pytest --cov=cmd2 --cov-report=term --cov-report=html", pty=True)
namespace.add_task(pytest)
@invoke.task
@@ -98,7 +98,7 @@ SPHINX_OPTS = '-nvWT' # Be nitpicky, verbose, and treat warnings as errors
def docs(context, builder='html'):
"Build documentation using sphinx"
cmdline = 'python -msphinx -M {} {} {} {}'.format(builder, DOCS_SRCDIR, DOCS_BUILDDIR, SPHINX_OPTS)
- context.run(cmdline)
+ context.run(cmdline, pty=True)
namespace.add_task(docs)
@invoke.task()
@@ -114,6 +114,12 @@ def docs_clean(context):
rmrf(DOCS_BUILDDIR)
namespace_clean.add_task(docs_clean, name='docs')
+@invoke.task()
+def linkcheck(context):
+ """Check external links in Sphinx documentation for integrity."""
+ context.run('cd docs && make linkcheck', pty=True)
+namespace.add_task(linkcheck)
+
@invoke.task
def livehtml(context):
"Launch webserver on http://localhost:8000 with rendered documentation"