https://hackmd.io/@melissawm/SkjCa3OkO#/
https://github.com/melissawm/minimalsphinx
https://numpy.org/doc/stable
reStructuredText
, and outputs HTML.conf.py
sphinx
(for example, pip install sphinx
)conf.py
file and initial directory structure by running$ sphinx-quickstart
conf.py
, index.rst
and any other files you wish_build/html/
)$ make html
sphinx-quickstart
, an index.rst
file is created*text*
for emphasis (italics),**text**
for strong emphasis (boldface)``text``
for code samples.Sphinx supports the inclusion of docstrings from your modules with an extension called autodoc.
You can then document whole classes or even modules automatically, using member options for the auto directives, like
.. automodule:: io
:members:
$ make doctest
With thanks to Fatma Tarlaci!
In our Quickstart guide, there is a typo in the following sentence:
In general, for arrays with more than two
dimensions, hstack stacks along their second axes,
vstack stacks along their first axes, and
concatenate allows for **an** optional arguments
giving the number of the axis along which the
concatenation should happen.
We'll fix this now.
Most of the steps are described in this page of the NumPy documentation.
upstream
remote​​​​$ git clone git@github.com:melissawm/numpy.git
​​​​$ git remote add upstream http://github.com/numpy/numpy.git
​​​​$ git checkout -b doc_fix
Now we can build NumPy. Using pip+venv:
​​​​$ virtualenv venv
​​​​$ source venv/bin/activate
​​​​$ pip install -r doc_requirements.txt
​​​​$ pip install cython
​​​​$ python setup.py build_ext -i -j4
Finally, we can build the documentation:
​​​$ make -C doc/ html
Submit a Pull Request
@melissawm