autodoc Questions

2

Solved

We can indicate the types of function parameters using docstring in python: def f1(a): """ :param a: an input. :type a: int :return: the input integer. :rtype: int """ return a For f1, au...
Ard asked 16/2, 2017 at 19:50

6

Solved

I've spent quite a while scouring the internet looking for the best way to properly document callbacks with jsdoc, but unfortunately, I haven't found a great one yet. Here's my question: I'm writ...
Prospectus asked 13/6, 2014 at 23:11

2

I have a three-layered class structure like this: class Super(object): """This class is documented.""" class Intermediate(Super): pass class Sub(Intermediate): """This is also documented.""" ...
Quadri asked 22/6, 2013 at 20:10

12

I'm trying to get started with Sphinx and seem to have relentless problems. Command: docs/sphinx-quickstart I answer all the questions and everything works fine. Command: docs/ls Everything looks n...
Askance asked 25/4, 2012 at 21:54

7

Solved

I'm trying to use Sphinx to document a 5,000+ line project in Python. It has about 7 base modules. As far as I know, In order to use autodoc I need to write code like this for each file in my proje...
Hypersensitive asked 23/4, 2010 at 21:11

2

I've got some code that uses a metaclass in python. But when sphinx autodoc is run it is giving the error: WARNING: py:class reference target not found: type The error is occuring in a line of an...
Midyear asked 10/7, 2012 at 15:55

2

The following two property definitions show up exactly the same in Sphinx autodoc HTML output: @property def concrete(self): """This is the concrete docstring""" pass @abstractproperty def abst...
Streeter asked 24/7, 2013 at 17:52

2

Solved

I'm currently writing documentation for my python package using Sphinx and the autodoc plugin. For a function return value I can e.g. write :returns: int: count which tells sphinx that there is a ...
Ellord asked 10/7, 2017 at 6:1

4

I'm trying to document a project using Sphinx, and am running into an issue where only some modules are being imported from a folder. My project structure looks like this: Project | |--Main | |--S...
Gensler asked 21/2, 2019 at 20:29

2

Solved

I'd like to include just the docstring of a specific function in my Sphinx documentation. However there seem to be no options to just display these details without associated class and function def...
Colligate asked 19/10, 2011 at 17:14

6

I am documenting a class with Sphinx and simple want to skip one of the classes members: class StatusUpdateAdapter(logging.LoggerAdapter): """ """ def __init__(self, status_update_func, logger,...
Speechmaking asked 29/1, 2015 at 21:4

2

Given the following function in a module called mymodule that I want to document using Sphinx with autodoc: from typing import Union from collections.abc import Iterable from numpy.typing import Ar...
Recurrence asked 10/5, 2021 at 15:32

9

Solved

I am attempting to use Sphinx to document my Python class. I do so using autodoc: .. autoclass:: Bus :members: While it correctly fetches the docstrings for my methods, those that are decorated...
Congratulatory asked 10/9, 2010 at 17:59

4

I have a question regarding the Sphinx autodoc generation. I feel that what I am trying to do should be very simple, but for some reason, it won't work. I have a Python project of which the directo...
Handmaid asked 7/12, 2018 at 10:52

1

As this post describes, autodoc will eagerly add the class variables to the documentation even if napoleon adds the fields as documentation in: from dataclasses import dataclass @dataclass class Fo...
Xerography asked 17/1, 2022 at 8:1

1

Currently, I have some code that uses mypy type annotations like this: def translate(self, text, mark_unknown=False, format=None, deformat='txt', reformat='txt'): # type: (Translator, str, bool, ...
Dam asked 21/11, 2018 at 8:21

9

I am using Sphinx for documenting my python project. I have the autodoc extension enabled and have the following in my docs. .. autoclass:: ClassName :members: The problem is, it only documents...
Kleist asked 19/7, 2009 at 5:7

2

I'm using sphinx with the numpydoc extension and autosummary. After some experimentation, I added the following options to my conf.py file. autosummary_generate = True numpydoc_show_class_members ...
Chickenhearted asked 9/7, 2016 at 1:22

2

Solved

I am using the Sphinx autodoc feature to generate documentation based on the docstrings of my Python library. The syntax for cross referencing is found here A label must precede the section in or...
Isopleth asked 27/3, 2014 at 22:29

3

Solved

I understand the Sphinx supports markdown or .md files optionally, which works great for me for my supplimental documentation. What I am trying to do is use the autoclass or automodule tags in a ma...
Fathead asked 20/11, 2019 at 1:29

2

Solved

I've been working on a project for PyQt5 ( found here: https://github.com/MaVCArt/StyledPyQt5 ) which uses a package structure to make imports a bit more logical. I've been relatively successful in...
Baroda asked 10/8, 2016 at 23:28

2

I want to autogenerate documentation to my code from docstrings. I have some basic class meant to store some data: class DataHolder: """ Class to hold some data Attributes: batch: Run withou...

6

Solved

Sphinx doesn't generate docs for __init__(self) by default. I have tried the following: .. automodule:: mymodule :members: and ..autoclass:: MyClass :members: In conf.py, setting the follow...
Benavidez asked 8/4, 2011 at 18:23

2

Solved

This question is inspired by the Mayavi documentation, which has nice section breaks with the name of the function being described between each module member. My .rst right now just looks like: SQL...
Alodie asked 17/9, 2013 at 17:29

1

Problem I am using sphinx.ext.autosummary for my python package. The problem is that .. autosummary:: adds .. automethod:: __init__ at all times, even if undocumented. In the mean time I have found...
Alimony asked 9/6, 2021 at 7:44

© 2022 - 2024 — McMap. All rights reserved.