Re: [sphinx-dev] Contributions in TODO, autodoc and general

2012-07-25 Thread Kevin Horn
On Wed, Jul 25, 2012 at 12:58 AM, Kevin Hunter hunt...@gmail.com wrote:


 Without directions suggesting otherwise, here's my best guess at how best
 to contribute: submit a pull request[2] on bitbucket.org.  The main
 repository behind Sphinx::

 https://bitbucket.org/**birkenfeld/sphinxhttps://bitbucket.org/birkenfeld/sphinx

 Cheers,

 Kevin


That would be my suggestion as well.

Kevin Horn

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



Re: [sphinx-dev] Contributions in TODO, autodoc and general

2012-07-24 Thread Kevin Hunter

At 11:48am -0400 Wed, 11 Jul 2012, Mario  wrote:

Unfortunately my first problem point is, that in the documentation
of the project there is no real documentation on how to contribute.


I feel your pain.  I asked a similar question on this list a couple of 
weeks ago to the tune of crickets.  After some Googling, my hunch is 
that the quiet on this front is because the main developers of the 
project are on the university schedule.  In particular, the maintainer 
of the main repository behind Sphinx, Georg, is a Physics academic, and 
his about page on pocoo suggests that he might be in crunch time for his 
dissertation[1].


Without directions suggesting otherwise, here's my best guess at how 
best to contribute: submit a pull request[2] on bitbucket.org.  The main 
repository behind Sphinx::


https://bitbucket.org/birkenfeld/sphinx

Cheers,

Kevin

[1] http://pythonic.pocoo.org/about
[2] http://blog.bitbucket.org/2011/06/17/pull-request-revamp/

--
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Contributions in TODO, autodoc and general

2012-07-12 Thread Mario
Dear Sphinx developers,


I'm a great fan of the framework and would like to contribute.

Documentation
-

Unfortunately my first problem point is, that in the documentation of the 
project there is no real documentation on how to contribute. So I simply 
decided to send my ideas on that way and hopefully get into discussion. On 
one page it was suggested to send an email to the group, which is 
impossible as a non member.

Another point is, that the interface for changing the plotting of class 
documentation is not enough documented. I still don't know where and how to 
change it. Since I am having up to 10 parameters in the init function of a 
class and up to 10 classes in one module, the normal highlighting of the 
class documentation headline is insufficient.

TODO extension bug
-

The easier point is, that there is a bug or conflict between autosummary 
and the `todo` extension.
In some of my docstrings, I was beginning with::

..  todo:: To document!!

This makes the whole compiling process crash, with a useless error message. 
I tried to catch this error and give a better warning. I'm pretty sure the 
format I used is wrong, but at least you will get the idea. The relevant 
change is at line 127::

   try:
   newnode['refuri'] = app.builder.get_relative_uri(
   fromdocname, todo_info['docname'])
   newnode['refuri'] += '#' + todo_info['target']['refid']
   except NoUri:
   # ignore if no URI can be determined, e.g. for LaTeX output
   pass
+except:
+print Wrong todo entry:
+for key in todo_info.keys():
+print key,' : ',todo_info[key]
   newnode.append(innernode)
   para += newnode

My error log file is also attached. Autosummary seems to produce no 'refid' 
entry but an 'id' entry with different syntax.


autodoc file generation for each module!
---

The most important change I made, and which I would like to have integrated 
in the official software is to the autodoc.py. When the software is 
generating rst-files automatically all modules of one package get one rst 
file and so  in my use case only one web page, which is nearly unreadable. 
So I added the option to generate one file for each module and only have an 
auto-summary of the modules.
I also preferred having an auto-summary of the sub packages instead of a 
toctree, but this could be made optional or discussed. :)

Further improvement could be also one file per class, but maybe that is to 
detailed.



I would be glad, if I could improve the software for everybody with my 
changes. If you have any question, just ask. Probably I did not explain 
some of my problems in an understandable way.

Thank you for your time


Mario Michael Krell


-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sphinx-dev/-/eWbnNTe6F_IJ.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

# -*- coding: utf-8 -*-

sphinx.apidoc
~

Parses a directory tree looking for Python modules and packages and creates
ReST files appropriately to create code documentation with Sphinx.  It also
creates a modules index (named modules.suffix).

This is derived from the sphinx-autopackage script, which is:
Copyright 2008 Soci?t? des arts technologiques (SAT),
http://www.sat.qc.ca/

:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.

import os
import sys
import optparse
from os import path

# automodule options
if 'SPHINX_APIDOC_OPTIONS' in os.environ:
OPTIONS = os.environ['SPHINX_APIDOC_OPTIONS'].split(',')
else:
OPTIONS = [
'members',
'undoc-members',
# 'inherited-members', # disabled because there's a bug in sphinx
'show-inheritance',
]

INITPY = '__init__.py'


def makename(package, module):
Join package and module with a dot.
# Both package and module can be None/empty.
if package:
name = package
if module:
name += '.' + module
else:
name = module
return name


def write_file(name, text, opts):
Write the output file for module/package name.
fname = path.join(opts.destdir, '%s.%s' % (name, opts.suffix))
if opts.dryrun:
print 'Would create file %s.' % fname
return
if not opts.force and path.isfile(fname):
print 'File %s already exists, skipping.' % fname
else:
print 'Creating file %s.' % fname
f = open(fname, 'w')
try: