Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install horae.sphinx.grok

How to install horae.sphinx.grok

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install horae.sphinx.grok
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0a1 Available View build log
Windows (64-bit)
1.0a1 Available View build log
Mac OS X (10.5+)
1.0a1 Available View build log
Linux (32-bit)
1.0a1 Available View build log
Linux (64-bit)
1.0a1 Available View build log
 
Author
License
GPL
Dependencies
Lastest release
version 1.0a1 on Jan 17th, 2012

Introduction

horae.sphinx.grok is an extension for the Sphinx documentation generator. It provides two new autodoc directives autogrok and autogrokfunction. By using those directives instead of the stock autoclass and autofunction ones additional grok specific information is given about the class or function.

If the autogrok directive is as an example used on the following class definition:

System Message: WARNING/2 (<string>, line 12)

Literal block expected; none found.

class ExampleAdapter(grok.Adapter): """ An adapter demonstrating the autogrok directive """ grok.context(IAdaptee) grok.implements(ISomeFunctionality) grok.name('example')

The reStructuredText output of the docstring would look like this:

System Message: WARNING/2 (<string>, line 22)

Literal block expected; none found.

An adapter demonstrating the autogrok directive

context:

System Message: WARNING/2 (<string>, line 25)

Field list ends without a blank line; unexpected unindent.

:class:`IAdaptee` :implements: :class:`ISomeFunctionality` :name: example

System Message: ERROR/3 (<string>, line 25); backlink

Unknown interpreted text role "class".

System Message: ERROR/3 (<string>, line 25); backlink

Unknown interpreted text role "class".

The autogrokfunction is doing the same for functions:

@grok.adapter(IAdaptee, name="example")
@grok.implementer(ISomeFunctionality)

System Message: ERROR/3 (<string>, line 35)

Inconsistent literal block quoting.

def example_adapter_factory(context): """ An adapter factory demonstrating the autogrokfunction directive """ return ExampleAdapter(context)

Which would result in:

System Message: WARNING/2 (<string>, line 43)

Literal block expected; none found.

An adapter factory demonstrating the autogrokfunction directive

context:

System Message: WARNING/2 (<string>, line 46)

Field list ends without a blank line; unexpected unindent.

:class:`IAdaptee` :implements: :class:`ISomeFunctionality` :name: example

System Message: ERROR/3 (<string>, line 46); backlink

Unknown interpreted text role "class".

System Message: ERROR/3 (<string>, line 46); backlink

Unknown interpreted text role "class".

Changelog

1.0a1 (2012-01-16)
  • Initial release

Subscribe to package updates

Last updated Jan 17th, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.