Repository navigation
Closed
Description
I had a few problems building the documentation while preparing #2953:
- when starting from a clean virtualenv, after
pip install numpy,pip install -e ., andpip install -e .[docs], I still need to manually installjupyter_client,ipykernel, andmatplotlibfor the build to run completely. - building the docs spits out thousands of
SEVERE: Unexpected section title.; this happens whenever it sees a section title like
Parameters
----------
(...)
which seems to say my environment setup doesn't recognize the numpy docstring format (note numpydoc did get installed in the virtualenv). In fact the section titles don't appear in the rendered html.
- although building with
nbconvert4.1.0 works fine, building withnbconvert4.2.0 (which is what comes by default withpip install -e .[docs]at this date) fails with the following trace:
Executeing /home/sl/Code/Research/statsmodels/examples/notebooks/pca_fertility_factors.ipynb to /home/sl/Code/Research/statsmodels/examples/executed/pca_fertility_factors.ipynb
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib64/python3.5/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/lib64/python3.5/concurrent/futures/process.py", line 153, in _process_chunk
return [fn(*args) for args in chunk]
File "/usr/lib64/python3.5/concurrent/futures/process.py", line 153, in <listcomp>
return [fn(*args) for args in chunk]
File "../tools/nbgenerate.py", line 93, in do_one
kernel_name=kernel_name)
File "../tools/nbgenerate.py", line 53, in execute_nb
kernel_name=kernel_name)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/nbconvert/preprocessors/base.py", line 41, in __init__
super(Preprocessor, self).__init__(**kw)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/nbconvert/utils/base.py", line 29, in __init__
super(NbConvertBase, self).__init__(**kw)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/config/configurable.py", line 74, in __init__
super(Configurable, self).__init__(**kwargs)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 949, in __init__
setattr(self, key, value)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 558, in __set__
self.set(obj, value)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 532, in set
new_value = self._validate(obj, value)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 564, in _validate
value = self.validate(obj, value)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 1927, in validate
self.error(obj, value)
File "/home/sl/.virtualenvs/statsmodels/lib/python3.5/site-packages/traitlets/traitlets.py", line 598, in error
raise TraitError(e)
traitlets.traitlets.TraitError: The 'kernel_name' trait of an ExecutePreprocessor instance must be a unicode string, but a value of None <class 'NoneType'> was specified.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "../tools/nbgenerate.py", line 140, in <module>
main()
File "../tools/nbgenerate.py", line 137, in main
kernel_name=args.kernel_name)
File "../tools/nbgenerate.py", line 109, in do
for dst in pool.map(func, nbs):
File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 556, in result_iterator
yield future.result()
File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 405, in result
return self.__get_result()
File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 357, in __get_result
raise self._exception
traitlets.traitlets.TraitError: The 'kernel_name' trait of an ExecutePreprocessor instance must be a unicode string, but a value of None <class 'NoneType'> was specified.
Makefile:61: recipe for target 'html' failed
make: *** [html] Error 1
Metadata
Metadata
Assignees
Labels
No labels
Activity
TomAugspurger commentedon May 17, 2016
nbcovert 4.2 wasn't released when I overhauled the doc build system a couple months back. It'd be good to pin that version along with adding jupyter_client, ipykernel, and matplotlib in the
setup.py.I'm getting the section header warnings as well.
For the last one, that's nbconvert letting you specify the kernel. I'll see if we have something to change now that 4.2 is available.
josef-pkt commentedon May 17, 2016
@wehlutyk What sphinx version are your using? It needs the most recent because the few previous once had bugs for docstring standard, AFAIR.
wehlutyk commentedon May 17, 2016
Thanks all for the swift responses!
@josef-pkt Sphinx 1.4.1 which came from
pip install -e .[docs]I think. Here's the output ofpip freezein my virtualenv (python 3.5):josef-pkt commentedon May 17, 2016
sphinx 1.4.1 That's a fast increase in sphinx version numbers
the last one I used was 1.3.5 which looked better than the once before that
#2312 (comment)
TomAugspurger commentedon May 17, 2016
Whoops, looks like I forgot to include
numpydocin thedocs/source/conf.pyspihnx extensions. Added that and the section headers show up. I'll send along a PR tonight.