Questions tagged [epydoc]

Epydoc is a tool for generating API documentation for Python modules, based on their docstrings.

Automatic reference documentation generator. Epydoc processes Python modules and docstrings to generate formatted API documentation, in the form of HTML pages. Epydoc can be used via a command-line interface (epydoc.cli) and a graphical interface (epydoc.gui). Both interfaces let the user specify a set of modules or other objects to document, and produce API documentation using the following steps:

  1. Extract basic information about the specified objects, and objects that are related to them (such as the values defined by a module). This can be done via introspection, parsing, or both:
    • Introspection imports the objects, and examines them directly using Python's introspection mechanisms.
    • Parsing reads the Python source files that define the objects, and extracts information from those files.
  2. Combine and process that information.
    • Merging: Merge the information obtained from introspection & parsing each object into a single structure.
    • Linking: Replace any "pointers" that were created for imported variables with the documentation that they point to.
    • Naming: Assign unique canonical names to each of the specified objects, and any related objects.
    • Docstrings: Parse the docstrings of each of the specified objects.
    • Inheritance: Add variables to classes for any values that they inherit from their base classes.
  3. Generate output. Output can be generated in a variety of formats:
    • An webpage.
    • A document (which can be rendered as a PDF file)
    • A plaintext description.
35 questions
31
votes
3 answers

What is the relationship between docutils and Sphinx?

There seems to be a plethora of documentation tools for Python. Another one that I've run across is epydoc. It seems like Sphinx is the de facto standard, because it's used to generate the official Python docs. Can someone please sort out the…
allyourcode
  • 21,871
  • 18
  • 78
  • 106
10
votes
4 answers

Automated way to switch from epydoc's docstring formatting to sphinx docstring formatting?

I've got a project which I documented using epydoc. Now I'm trying to switch to sphinx. I formatted all my docstrings for epydocs, using B{}, L{} etc for bolding, linking and the like, and using @param, @return, @raise etc to explain input, output,…
Niek de Klein
  • 8,524
  • 20
  • 72
  • 143
7
votes
3 answers

epydoc AttributeError: 'Text' object has no attribute 'data'

I've not used epydoc in the last 2 years but I found it very handy to take track of my classes and methods with a very little effort. Today I installed latest version 3.0.1 but I get this error and searching around seems no solutions are…
neurino
  • 11,500
  • 2
  • 40
  • 63
6
votes
1 answer

restructuredText, docstring and python interactive shell

I am using reStructuredText to document my code, so as to get nice offline HTML pages by means of epydoc. Results are brilliant. The only drawback is that when I use the Python interactive shell, the help() function does not parse the reST metadata…
6
votes
1 answer

How do I make pdoc preserve whitespace?

I'm trying to generate documentation using pdoc, where my docstrings look like this: """ I am a description of what a method does :param param1: an integer :param param2: a str """ I found this question: How to preserve line breaks when generating…
Colleen
  • 23,899
  • 12
  • 45
  • 75
5
votes
1 answer

epydoc hide some class functions?

I have some methods in my class which are only meant to be used by other methods of the class. I've prefixed their names with '_'. Can I hide those functions from epydoc? Is it a good idea? Should I use '_' or double underscore? To be honest I…
user975135
4
votes
1 answer

enforcing python function parameters types from docstring

Both epydoc and Sphinx document generators permit the coder to annotate what the types should be of any/all function parameter. My question is: Is there a way (or module) that enforces these types (at run-time) when documented in the docstring. …
NevilleDNZ
  • 1,269
  • 12
  • 31
3
votes
1 answer

PyCharm and reStructuredText (Sphinx) documentation popups

Let's imagine, I want to see a docstring popup for one simple method in PyCharm 4.5 Community Edition (tried also in 5.0). I wrote down these docstrings in both epytext syntax (Epydoc generator is unsupported since 2008 and works only for Python2)…
Nikolay Prokopyev
  • 1,260
  • 12
  • 22
2
votes
1 answer

How to run epydoc gui for win7?

The epydoc documentation says: The graphical interface can be invoked with the epydocgui command, or with epydoc.pyw in the Scripts subdirectory of the Python installation directory under Windows. I've tried running the epydoc.pyw file directly, and…
Jpaji Rajnish
  • 1,491
  • 4
  • 17
  • 35
2
votes
1 answer

How to use epydoc on mac to generate UML diagram for python API

I am trying to use epydoc to generate UML diagrams for complex python APIs but haven't succeeded yet. I am using epydoc as I read somewhere that it does object introspection and source parsing. I am using mac with python2.7 for my purposes and I was…
avimehenwal
  • 1,502
  • 3
  • 21
  • 30
2
votes
1 answer

How do you include a Graphviz diagram in Python docs with epydoc?

Epydoc documentation says that you can include a Graphviz diagram in your source code by means of the dotgraph directive. However, if try this: #: .. dotgraph:: Test #: graph name { #: a -- b -- c; #: b -- d; #: } What I get is…
1
vote
2 answers

Is there a way to exclude a specific file from epydoc generation?

I'm generating an epydoc for a library of code, and there are a few testing files scattered throughout that I'd like to not include. I could use the --exclude generation option and rename the files, but I'm wondering if there's anything I can add…
Nathan
  • 4,545
  • 6
  • 32
  • 49
1
vote
1 answer

Need help with KeyError when building epydoc files for project

I have a pylons project with an extensive set of functional tests that I want my manual QA's to be able to read from time to time, so I'm using epydoc to build out the html pydocs on the functional test modules. It seems to be working fine. It…
Greg Gauthier
  • 1,336
  • 1
  • 12
  • 25
1
vote
1 answer

epydoc and reStructuredText change link name

I'm using reStructuredText with epydoc. How can I have the text of an internal link different than the target of the link? I have: :todo: Figure out the `Product.manufacturer` relationship in `Product`. The Product link looks fine and links to the…
CaptainThrowup
  • 919
  • 1
  • 7
  • 15
1
vote
1 answer

epydoc: Blocks of fixed-width text

I have written a software component that relies on a configuration file. For clarity, I want to document the structure of the configuration file by adding an example file in the docstring of the relevant class. For obvious reasons, it should appear…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
1
2 3