documentation-generation

Generate documentation for python functions in a jupyter notebook using docstrings

Generate documentation for python functions in a jupyter notebook using docstrings Question: There is a Jupyter Notebook with multiple python functions with docstrings. Is there a way to generate documentation for those functions without converting the notebook into a Python script? Usually, documentation can be created for functions in a Python script or a project …

Total answers: 1

How do I create documentation with Pydoc?

How do I create documentation with Pydoc? Question: I’m trying to create a document out of my module. I used pydoc from the command-line in Windows 7 using Python 3.2.3: python “<path_to_pydoc_>pydoc.py” -w myModule This led to my shell being filled with text, one line for each file in my module, saying: no Python documentation …

Total answers: 4

How to document Python function parameters with Sphinx?

How to document Python function parameters with Sphinx? Question: I’m trying to clean up my python code documentation, and decided to use sphinx-doc because it looks good. I like how I can reference other classes and methods with tags like: :class:`mymodule.MyClass` About my class. :meth:`mymodule.MyClass.myfunction` And my cool function I’m trying to figure out though …

Total answers: 3

How to document a method with parameter(s)?

How to document a method with parameter(s)? Question: How to document methods with parameters using Python’s documentation strings? EDIT: PEP 257 gives this example: def complex(real=0.0, imag=0.0): “””Form a complex number. Keyword arguments: real — the real part (default 0.0) imag — the imaginary part (default 0.0) “”” if imag == 0.0 and real == …

Total answers: 9

Automatically Generating Documentation for All Python Package Contents

Automatically Generating Documentation for All Python Package Contents Question: I’m trying to auto-generate basic documentation for my codebase using Sphinx. However, I’m having difficulty instructing Sphinx to recursively scan my files. I have a Python codebase with a folder structure like: <workspace> └── src └── mypackage ├── __init__.py │ ├── subpackageA │ ├── __init__.py │ …

Total answers: 4

What is the relationship between docutils and Sphinx?

What is the relationship between docutils and Sphinx? Question: 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 current state of …

Total answers: 3