autodoc

Getting started with Sphinx when your source files aren't in the project base folder

北城余情 提交于 2020-05-27 13:07:03
问题 Alright, I've been struggling with Sphinx not producing any documentation from the docstrings I've written in this example code. Its a simple implementation of a stack in Python. You probably need not read all of this: src/stack.py class Stack: """Stack A simple implementation of a stack data structure in Python. """ def __init__(self): self._data = [] def push(self,item): """Push Push an item on to the stack. Args: arg: Item to be pushed to the top of the stack """ self._data.append(item)

Is it possible to generate list of members, linking to detailed descriptions below?

只谈情不闲聊 提交于 2020-04-18 06:10:35
问题 Converting a project doc from epydoc to sphinx , I am mostly thrilled, but miss one property of epydoc , as it generated a list of methods in the top of the document, followed by the detailed section with fully rendered doc-strings below. With autodoc , I naturally get the latter simply by .. automodule:: mymodule :members: I'm not yet on the level of tweaking themes, but wounder if there was a straight forward way to achieve this. To make it more clear, I aim for something like this (even

Sphinx Latex break line autodoc

有些话、适合烂在心里 提交于 2020-03-05 01:34:12
问题 I am making my python docs with sphinx-apidoc. But some text seems messed up because the line does not break in certain cases. I have tried to set latex_elements on config.py with preamble, but the result is the same. You can also see that the methods table also is a little confusing with a word in front of the other. latex_elements = { 'papersize': 'a4paper', 'pointsize': '12pt', 'figure_align': 'htbp', 'preamble': r''' \usepackage[draft]{minted} \fvset{breaklines=true} ''', } Have you had

Sphinx Latex break line autodoc

柔情痞子 提交于 2020-03-05 01:31:53
问题 I am making my python docs with sphinx-apidoc. But some text seems messed up because the line does not break in certain cases. I have tried to set latex_elements on config.py with preamble, but the result is the same. You can also see that the methods table also is a little confusing with a word in front of the other. latex_elements = { 'papersize': 'a4paper', 'pointsize': '12pt', 'figure_align': 'htbp', 'preamble': r''' \usepackage[draft]{minted} \fvset{breaklines=true} ''', } Have you had

Sphinx Latex break line autodoc

大兔子大兔子 提交于 2020-03-05 01:31:01
问题 I am making my python docs with sphinx-apidoc. But some text seems messed up because the line does not break in certain cases. I have tried to set latex_elements on config.py with preamble, but the result is the same. You can also see that the methods table also is a little confusing with a word in front of the other. latex_elements = { 'papersize': 'a4paper', 'pointsize': '12pt', 'figure_align': 'htbp', 'preamble': r''' \usepackage[draft]{minted} \fvset{breaklines=true} ''', } Have you had

Sphinx's autodoc's automodule having apparently no effect

南笙酒味 提交于 2020-02-15 10:23:53
问题 I am running Sphinx on a rst file containing automodule but it does not seem to have any effect. Here are the details: I have a Python project with a file agent.py containing a class Agent in it. I also have a subdirectory apidoc with a file agent.rst in it (generated by sphinx-apidoc ): agent module ============ .. automodule:: agent :members: :undoc-members: :show-inheritance: I run sphinx with sphinx-build -b html apidoc apidoc/_build with the project's directory as the current working

Sphinx's autodoc's automodule having apparently no effect

淺唱寂寞╮ 提交于 2020-02-15 10:20:47
问题 I am running Sphinx on a rst file containing automodule but it does not seem to have any effect. Here are the details: I have a Python project with a file agent.py containing a class Agent in it. I also have a subdirectory apidoc with a file agent.rst in it (generated by sphinx-apidoc ): agent module ============ .. automodule:: agent :members: :undoc-members: :show-inheritance: I run sphinx with sphinx-build -b html apidoc apidoc/_build with the project's directory as the current working

Sphinx's autodoc's automodule having apparently no effect

大憨熊 提交于 2020-02-15 10:20:12
问题 I am running Sphinx on a rst file containing automodule but it does not seem to have any effect. Here are the details: I have a Python project with a file agent.py containing a class Agent in it. I also have a subdirectory apidoc with a file agent.rst in it (generated by sphinx-apidoc ): agent module ============ .. automodule:: agent :members: :undoc-members: :show-inheritance: I run sphinx with sphinx-build -b html apidoc apidoc/_build with the project's directory as the current working

Get “flat” member output for sphinx automodule

巧了我就是萌 提交于 2020-01-31 06:47:04
问题 I'm using the Sphinx autodoc extension to document a module, and I'd like to get a flat list of the module's members in the documentation output. I tried using the following: .. automodule:: modname :members: However, there are two problems with this: It includes the module's docstring, which I don't want here. The name of each entry is prefixed with "modname.", which is completely redundant (since this page is specifically for documenting this module) However, I haven't been able to find any

Python Sphinx exclude patterns

这一生的挚爱 提交于 2020-01-30 04:19:06
问题 I'm generating documentation with Sphinx for project with structure like this : + project | +- docs | +- tests | +- workflow -+- definitions -+- <some folders> | +- <rest of the project> I want to exclude tests, and workflow/definition from documentation. I tried exclude pattern in docs/conf.py exclude_patterns = ['**/workflow/definitions', 'workflow/definitions', '*workflow/definitions', 'workflow/definitions*', 'workflow/definitions/*', 'workflow/definitions/*.*'] But even though workflow