[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Using reStructuredText for document sources



great work!

On Tue, Mar 29, 2011 at 8:31 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I have added C header file generation. There are some issues with generated C macro names. Currently makeref.py and the Sphinx header writer I wrote derive the names from different sources in the original Pygame .doc files. But I'm sure I can get around that.

Attached a report generated with the Sphinx document coverage extension. It looks thorough. The  missing pygame.mixer.music module is understandable as "import pygame.mixer.music" fails. Can this be fixed?

All that is left to check out is automated document generation. Sphinx relies on reST markup in the doc strings. The existing pygame util/create_doc_from_py.py could be adapted to output reST instead of Pygame .doc.

Lenard Lindstrom


On 05/03/11 09:40 AM, Lenard Lindstrom wrote:
Hi,

Now there are comparison tools to consider :-). I'm not trying to push anyone into a move to reST. It's just that I was planning to go through the docs and standardize things like function protocols. Then the thread about user contributions to the docs came up, and I figured now would be the time to change to reST if that is desirable. For me, I will confirm everything we can currently do with makeref.py and helpers can also be done with docutils/Sphinx before continuing. I've already committed to SVN incarnation 2 of a doc to reST translator, makerst.py, as a starting point to see what can be done with reST. It already produces Python markup that compiles, without errors, using jug's Pygame reST build tools (https://bitbucket.org/schlangen/pygame-docs/). So now we can play around and see what is possible before committing to reST.

Lenard

On 05/03/11 01:34 AM, René Dudfield wrote:
On Sat, Mar 5, 2011 at 7:00 AM, Peter Shinners <pete@xxxxxxxxxxxx <mailto:pete@xxxxxxxxxxxx>> wrote:

   [snip...]
   Doing a one time conversion from the current Pygame docs should be
   easy, it was always meant to be.  One current feature is that
   function signatures and summaries are translated into header files
   that are built into the extension source. One big missing feature
   is that reference docs do not pull docstrings from of the .py
   files, which was always desired.


Hey ya,

There's a tool to create .doc files from modules that were made for the last release.
   python create_doc_from_py.py pygame.sprite

There's also a tool to help find out what is not documented:
   python compare_docs.py pygame.sprite sprite.doc

They're hidden in the test/util/ directory... but I've documented them in the Hacking guide with the rest of the documentation on writing docs for pygame lives.
http://pygame.org/wiki/Hacking


cya!