Skip to content

Treat Sphinx warnings as errors when building docs on Travis #3770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 12, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use argparse to parse input in make.py
  • Loading branch information
jenshnielsen committed Nov 10, 2014
commit 162f89bbfbd19fff39d87323ff49a6aba2ddc75f
26 changes: 16 additions & 10 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import shutil
import sys
import re

import argparse

def copy_if_out_of_date(original, derived):
if (not os.path.exists(derived) or
Expand Down Expand Up @@ -174,17 +174,23 @@ def all():
'as spurious changes in your \'git status\':\n\t{}'
.format('\n\t'.join(symlink_warnings)))

if len(sys.argv)>1:
if '--small' in sys.argv[1:]:
small_docs = True
sys.argv.remove('--small')
for arg in sys.argv[1:]:
func = funcd.get(arg)
parser = argparse.ArgumentParser(description='Build matplotlib docs')
parser.add_argument("cmd", help=("Command to execute. Can be multiple. "
"Valid options are: %s" % (funcd.keys())), nargs='*')
parser.add_argument("--small",
help="Smaller docs with only low res png figures",
action="store_true")
args = parser.parse_args()
if args.small:
small_docs = True

if args.cmd:
for command in args.cmd:
func = funcd.get(command)
if func is None:
raise SystemExit('Do not know how to handle %s; valid args are %s'%(
arg, funcd.keys()))
raise SystemExit(('Do not know how to handle %s; valid commands'
' are %s' % (command, funcd.keys())))
func()
else:
small_docs = False
all()
os.chdir(current_dir)