python-sphinx

Sphinx - insert argument documentation from parent method

十年热恋 提交于 2020-02-25 22:37:05
问题 I have some classes that inherit from each other. All classes contain the same method (let us call it mymethod ), whereby the children overwrite the base class method. I want to generate a documentation for mymethod in all classes using sphinx. Suppose mymethod takes an argument myargument . This argument has the same type and meaning for both the base method as well as the inherited method. To minimize redundancies, I would like to write the documentation for myargument only for the base

Docstring for groups of methods in sphinx

懵懂的女人 提交于 2020-02-24 14:11:54
问题 Is it possible to add docstrings for groups of methods in the Sphinx generated documentation? For example, I would like to have something like: class MyClass(): """Doc of the class""" def __init__(self): pass """----- The following part is about imports -----""" def import_from_source_1(self): """Doc of import_from_source_1""" pass def import_from_source_2(self): """Doc of import_from_source_2""" pass """----- The following part is about exports-----""" def export_to_dest_1(self): """Doc of

Docstring for groups of methods in sphinx

三世轮回 提交于 2020-02-24 14:10:57
问题 Is it possible to add docstrings for groups of methods in the Sphinx generated documentation? For example, I would like to have something like: class MyClass(): """Doc of the class""" def __init__(self): pass """----- The following part is about imports -----""" def import_from_source_1(self): """Doc of import_from_source_1""" pass def import_from_source_2(self): """Doc of import_from_source_2""" pass """----- The following part is about exports-----""" def export_to_dest_1(self): """Doc of

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

Read-the-docs build fails with “cannot import name 'PackageFinder' from 'pip._internal.index'”

↘锁芯ラ 提交于 2020-02-11 11:01:56
问题 The build of Sphinx docs on read-the-docs fails with the following error (complete log below): ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/index/__init__.py) Did I do something wrong or is this a bug in read-the-docs? A local build of Sphinx docs runs fine. Complete error log on read-the-docs: Read the Docs build information Build id: 10299638

Read-the-docs build fails with “cannot import name 'PackageFinder' from 'pip._internal.index'”

随声附和 提交于 2020-02-11 11:01:25
问题 The build of Sphinx docs on read-the-docs fails with the following error (complete log below): ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/index/__init__.py) Did I do something wrong or is this a bug in read-the-docs? A local build of Sphinx docs runs fine. Complete error log on read-the-docs: Read the Docs build information Build id: 10299638

Read-the-docs build fails with “cannot import name 'PackageFinder' from 'pip._internal.index'”

怎甘沉沦 提交于 2020-02-11 10:59:50
问题 The build of Sphinx docs on read-the-docs fails with the following error (complete log below): ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (/home/docs/checkouts/readthedocs.org/user_builds/cascade-python/envs/latest/lib/python3.7/site-packages/pip/_internal/index/__init__.py) Did I do something wrong or is this a bug in read-the-docs? A local build of Sphinx docs runs fine. Complete error log on read-the-docs: Read the Docs build information Build id: 10299638

Fix Sphinx RemovedInSphinx30Warning

China☆狼群 提交于 2020-02-06 15:59:08
问题 I'm getting two warning messages when trying to build my docs with Sphinx v2.1.2 and sphinx-rtd-theme 0.4.3 . The first one is: /docs/numsec.py:50: RemovedInSphinx30Warning: app.override_domain() is deprecated. Use app.add_domain() with override option instead. app.override_domain(CustomStandardDomain) That section of my numsec.py looks like: def setup(app): app.override_domain(CustomStandardDomain) app.connect('doctree-resolved', doctree_resolved) I don't know what override option means. I