Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-12 Thread Baiju M
On Tue, Jan 12, 2010 at 12:35 PM, Chris Withers wrote: > Martijn Faassen wrote: >> I am interested in creating sphinx-driven documentation for Zope Toolkit >> packages. I'd like to maintain the documentation for a package (say, >> zope.component) in that package, in a 'doc' directory. > > I have a

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-12 Thread Chris Withers
Martijn Faassen wrote: > I am interested in creating sphinx-driven documentation for Zope Toolkit > packages. I'd like to maintain the documentation for a package (say, > zope.component) in that package, in a 'doc' directory. I have a couple of packages that make good use of the my current patt

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-04 Thread Chris McDonough
Benji York wrote: > On Sun, Jan 3, 2010 at 6:43 PM, Chris McDonough wrote: >> Yeah. I haven't thought about this much, so it might be bollocks, but I >> think something like this is what I'm after: >> >> .. code-block-setup:: >> >> import sys >> from somepackage.testing import DummyModule >>

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-04 Thread Lennart Regebro
On Mon, Jan 4, 2010 at 00:43, Chris McDonough wrote: > Yeah.  I haven't thought about this much, so it might be bollocks, but I > think something like this is what I'm after: > > .. code-block-setup:: > ... > > .. code-block:: python >   :linenos: > > > .. code-block-teardown:: >   del sys.mo

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Martin Aspeli
Martijn Faassen wrote: > Martin Aspeli wrote: > [snip] >> We've had good success with >> http://pypi.python.org/pypi/collective.recipe.sphinxbuilder > > I'm having trouble with this. I'm trying to set up a "narrative_docs" > directory in a package but: > > * the documentation on collective.recipe.s

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Benji York
On Sun, Jan 3, 2010 at 6:43 PM, Chris McDonough wrote: > Yeah.  I haven't thought about this much, so it might be bollocks, but I > think something like this is what I'm after: > > .. code-block-setup:: > >   import sys >   from somepackage.testing import DummyModule >   sys.modules['models'] = Du

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Chris McDonough
Lennart Regebro wrote: > On Sun, Jan 3, 2010 at 23:14, Benji York wrote: >> In both of those cases normal doctest blocks seem appropriate. > > Not if you don't want the output in the formatting, or if you don't > want the >>> brackets. > Yeah. I haven't thought about this much, so it might be

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Lennart Regebro
On Sun, Jan 3, 2010 at 23:38, Benji York wrote: > I just took a stab at removing all references to zope.testing.doctest > from Manuel and got it to work using the zope.testing trunk (Manuel > needs DocTestFailureException). Awesome! That would make it easy to port to Python 3, which I need. --

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Lennart Regebro
On Sun, Jan 3, 2010 at 23:14, Benji York wrote: > In both of those cases normal doctest blocks seem appropriate. Not if you don't want the output in the formatting, or if you don't want the >>> brackets. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 6

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Benji York
On Sun, Jan 3, 2010 at 6:53 AM, Martijn Faassen wrote: > Lennart Regebro wrote: > [snip] >> Also if the above code is deemed as being a Good Idea, I will remove >> all the usage of zope.testing.doctest from Manuel. This is necessary, >> as one of the things I need from Manuel is a Python 3 port, a

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Benji York
On Sun, Jan 3, 2010 at 4:48 PM, Lennart Regebro wrote: > On Sun, Jan 3, 2010 at 22:08, Benji York wrote: >> Occasionally you want to show some code but hide the assertions about >> the effects of the code.  You can do that by putting the tests in a reST >> comment after the code. >> >> .. code-bl

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Hanno Schlichting
On Sun, Jan 3, 2010 at 10:27 PM, Martijn Faassen wrote: > This is definitely frustrating. :) I want to document something about > this so that people have more guidance and that our ZTK packages have a > similar documentation structure,... So far it seems manuel, the ztk docs and Zope2 all basica

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Lennart Regebro
On Sun, Jan 3, 2010 at 22:08, Benji York wrote: > Occasionally you want to show some code but hide the assertions about > the effects of the code.  You can do that by putting the tests in a reST > comment after the code. > > .. code-block:: python > >    a = Foo() >    b = a.bar() > > .. make sure

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Martijn Faassen
Martin Aspeli wrote: [snip] > We've had good success with > http://pypi.python.org/pypi/collective.recipe.sphinxbuilder I'm having trouble with this. I'm trying to set up a "narrative_docs" directory in a package but: * the documentation on collective.recipe.sphinxbuilder pypi talks about a bi

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Benji York
On Sat, Jan 2, 2010 at 8:44 PM, Chris McDonough wrote: > Python samples in Sphinx docs are generated like so: > > .. code-block:: python > >     a == 1 > > I did a bit of fooling around with Manuel, because I wanted to make sure that > the code blocks in my documentation actually worked, but I wou

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Benji York
On Sat, Jan 2, 2010 at 2:21 PM, Martijn Faassen wrote: > It'd also be interesting to explore using Manuel - how would one add > manuel-based testing to a Sphinx documentation tree? I'd like to give > the priority to testing documentation samples as opposed to > doctest-driven testing. The Manuel

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Martijn Faassen
Lennart Regebro wrote: [snip] > Also if the above code is deemed as being a Good Idea, I will remove > all the usage of zope.testing.doctest from Manuel. This is necessary, > as one of the things I need from Manuel is a Python 3 port, and I'm > not porting zope.testing.doctest to Python 3. I think

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-03 Thread Lennart Regebro
On Sun, Jan 3, 2010 at 02:44, Chris McDonough wrote: >  But I couldn't really figure out a way to do the moral equivalent of this: > > .. code-block:: python > >    a == 1 > > .. manuel-expect: > >    True > > Maybe I missed it. I couldn't either. So I added a sphinx module for Manuel, supporting

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-02 Thread Martin Aspeli
Martijn Faassen wrote: > Hi there, > > I am interested in creating sphinx-driven documentation for Zope Toolkit > packages. I'd like to maintain the documentation for a package (say, > zope.component) in that package, in a 'doc' directory. > > I'm wondering what experiences people have with maintai

Re: [Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-02 Thread Chris McDonough
Martijn Faassen wrote: > Hi there, > > I am interested in creating sphinx-driven documentation for Zope Toolkit > packages. I'd like to maintain the documentation for a package (say, > zope.component) in that package, in a 'doc' directory. > > I'm wondering what experiences people have with mai

[Zope-dev] patterns for using sphinx with the Zope Toolkit?

2010-01-02 Thread Martijn Faassen
Hi there, I am interested in creating sphinx-driven documentation for Zope Toolkit packages. I'd like to maintain the documentation for a package (say, zope.component) in that package, in a 'doc' directory. I'm wondering what experiences people have with maintaining Sphinx docs. I've used plai