1

I am trying to create documentation for some software I am making and I have ran into the following problem. Any of my classes that inherits from param.Parameterized repo here end up having what looks like a "mini" documentation of param written in plaintext after the Docstring stuff I have written.

As seen in the screenshot above, with a small example this is what is produced:


Parameters

    exampleType

        Example parameter

Attributes

    exampleType

        Example attribute
    [1;32mParameters of ‘Example’
    =======================
    [0m
    [1;31mParameters changed from their default values are marked in red.[0m
    [1;36mSoft bound values are marked in cyan.[0m
    C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None
    [1;34mName Value Type Bounds Mode [0m
    test False Boolean (0, 1) V RW
    [1;32mParameter docstrings:
    =====================[0m
    [1;34mtest: < No docstring available >[0m


My conf.py contains:

import os
import sys

sys.path.insert(0, os.path.abspath("."))

project = "example"
copyright = ""
author = ""

extensions = [
    "sphinx.ext.napoleon",
    "sphinx.ext.autodoc",
    "sphinx.ext.todo",
    "sphinx.ext.coverage",
    "numpydoc",
]

numpydoc_show_class_members = False
numpydoc_show_inherited_class_members = False

autodoc_default_options = {
    "show-inheritance": False,
}

templates_path = ["_templates"]

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

html_theme = "sphinx_rtd_theme"

html_static_path = ["_static"]

and my index.rst is:

Welcome to Documentation!
========================================

.. autoclass:: example.Example
   :members: example_method

and my example.py contains:

import param

class Example(param.Parameterized):
    """Example Class.

    Parameters
    ----------
    example : Type
        Example parameter


    Attributes
    ----------
    example : Type
        Example attribute

    """

    test = param.Boolean()

    def __init__(self):

        testing = True

    def example_method(self, example):
        """Example Method.

        Parameters
        ----------
        example : Type
            Example parameter


        Returns
        ----------
        None

        """

        testing = True

I am not sure whether the problem lies with the param class or sphinx, so if anyone knows how to turn this extra part of the documentation off I'd really appreciate it.

The built documentation:

The built documentation

Steve Piercy
  • 13,693
  • 1
  • 44
  • 57
grant_m_s
  • 11
  • 1

0 Answers0