提交 75cbdac1 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Don't treat warnings as errors by default.

上级 d3dee214
...@@ -65,8 +65,8 @@ script: ...@@ -65,8 +65,8 @@ script:
- echo "$PART" - echo "$PART"
- cd -; cd Theano - cd -; cd Theano
- theano-nose -v $PART - theano-nose -v $PART
- if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --nopdf; fi - if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --nopdf --check; fi
# - if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --test; fi # - if [[ $DOC == "1" ]]; then python doc/scripts/docgen.py --test --check; fi
after_failure: after_failure:
- cat /home/travis/.pip/pip.log - cat /home/travis/.pip/pip.log
...@@ -16,7 +16,7 @@ if __name__ == '__main__': ...@@ -16,7 +16,7 @@ if __name__ == '__main__':
opts, args = getopt.getopt( opts, args = getopt.getopt(
sys.argv[1:], sys.argv[1:],
'o:f:', 'o:f:',
['rst', 'help', 'nopdf', 'cache', 'test']) ['rst', 'help', 'nopdf', 'cache', 'check', 'test'])
options.update(dict([x, y or True] for x, y in opts)) options.update(dict([x, y or True] for x, y in opts))
if options['--help']: if options['--help']:
print('Usage: %s [OPTIONS] [files...]' % sys.argv[0]) print('Usage: %s [OPTIONS] [files...]' % sys.argv[0])
...@@ -25,6 +25,7 @@ if __name__ == '__main__': ...@@ -25,6 +25,7 @@ if __name__ == '__main__':
print(' --rst: only compile the doc (requires sphinx)') print(' --rst: only compile the doc (requires sphinx)')
print(' --nopdf: do not produce a PDF file from the doc, only HTML') print(' --nopdf: do not produce a PDF file from the doc, only HTML')
print(' --test: run all the code samples in the documentaton') print(' --test: run all the code samples in the documentaton')
print(' --check: treat warnings as errors')
print(' --help: this help') print(' --help: this help')
print('If one or more files are specified after the options then only ' print('If one or more files are specified after the options then only '
'those files will be built. Otherwise the whole tree is ' 'those files will be built. Otherwise the whole tree is '
...@@ -54,10 +55,12 @@ if __name__ == '__main__': ...@@ -54,10 +55,12 @@ if __name__ == '__main__':
pythonpath = os.pathsep.join([throot, pythonpath]) pythonpath = os.pathsep.join([throot, pythonpath])
sys.path[0:0] = [throot] # We must not use os.environ. sys.path[0:0] = [throot] # We must not use os.environ.
def call_sphinx(builder, workdir, extraopts=None): def call_sphinx(builder, workdir):
import sphinx import sphinx
if extraopts is None: if options['--check']:
extraopts = ['-W'] extraopts = ['-W']
else:
extraopts = []
if not options['--cache'] and files is None: if not options['--cache'] and files is None:
extraopts.append('-E') extraopts.append('-E')
docpath = os.path.join(throot, 'doc') docpath = os.path.join(throot, 'doc')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论