making docstrings using sphinx -- need a bit of help

asked 2012-09-30 23:29:46 -0600

SLOtoSF gravatar image

updated 2012-10-01 00:42:51 -0600

Hi,

I've done the following:

1) Downloaded `sudo apt-get install python-setuptools

2) Downloaded easy_install -U sphinx then navigated to my project directory ...sage/<project-name>

3) Ran sage -sh and sphinx-quickstart and followed the defaults except I chose separate directories for my build and source files.

4) Ran make latex andmake latexpdf

It's blank! Please advise.

How can I ensure it picks up certain .py files? Any tips?

edit retag flag offensive close merge delete

Comments

I don't have an answer per se, but I'll note that sphinx itself probably only picks up .rst files. I don't know how Sage "converts" its .py to .rst files, but I think we have something that does this. When I've used this workflow, I only had .rst files to contend with.

kcrisman gravatar imagekcrisman ( 2012-10-01 02:16:15 -0600 )edit

Sphinx is already installed as part of Sage, so I think you can skip steps 1 and 2.

John Palmieri gravatar imageJohn Palmieri ( 2012-10-01 04:27:15 -0600 )edit

@John Palmieri I can't seems to find anything on the online documentation.

SLOtoSF gravatar imageSLOtoSF ( 2012-10-01 07:28:33 -0600 )edit
1

When you install Sage, there is a file `SAGE_ROOT/local/bin/sphinx-quickstart`, for example, as well as Python files in `SAGE_ROOT/local/lib/python/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/`. The former will be run if you do `sage -sh` and then `sphinx-quickstart`.

John Palmieri gravatar imageJohn Palmieri ( 2012-10-01 07:48:33 -0600 )edit
1

I think that many of the components of Sage are not explicitly documented in the Sage documentation, like gap, Singular, matplotlib, etc. Sphinx is no different, but it should be at least suggestive that the bottom of every page of Sage documentation says "Created using Sphinx 1.1.2."

John Palmieri gravatar imageJohn Palmieri ( 2012-10-01 07:50:52 -0600 )edit