Questions tagged [sphinx-apidoc]

sphinx-apidoc is a command-line tool for automatic generation of Sphinx reStructuredText sources, that, with the Sphinx autodoc extension, document a whole package in the style of other automatic API documentation tools.

sphinx-apidoc is a tool for automatic generation of Sphinx sources that document a whole package.

Usage of the sphinx-apidoc command is as follows:

sphinx-apidoc [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN …]

Sphinx-apidoc uses to extract docstrings from source files (located in <MODULE_PATH>) and places the resulting .rst reStructuredText files in OUTPUT_PATH. Latter, documentation can be generated from those .rst files into several formats like HTML, PDF using sphinx-build.

The documentation of sphinx-apidoc can be found here.

See also:

Links

54 questions
1
vote
0 answers

Formatting issue in Sphinx HTML output: How to wrap long function names?

I am new to Sphinx and can't figure out how to solve this formatting issue. Currently, the Sphinx generated HTML output looks like this: The long module and function names lead to the blue text boxes ending up outside the white space. Similarly, in…
aaronkawa
  • 11
  • 1
1
vote
0 answers

sphinx-apidoc to identify file types other than .py

I built a language expansion for Python 3, which allows its users to generate Python files with '.pytsl' suffix. I want to use Sphinx for documenting those files. However, when running sphinx-apidoc on a specific directory, the '.py' files under…
1
vote
1 answer

Namespaces packages several levels deep, and sphinx

I'm trying to use packages like "project-a" in a namespace like "com.company", with implicit namespaces. I'm finding that sphinx-apidoc isn't putting my packages in to the toc in the docs, I suspect because both the com and company namespaces have…
1
vote
0 answers

Unable to generate html documentation for nested python modules using sphinx

I am using sphinx to automatically generate htmls using docstring from my python modules. For this, I am using sphinx's docker image named 'sphinxdoc/sphinx'. I run sphinx by mapping my python project (in DocString_Project directory) as a volume.…
1
vote
2 answers

Generate rst files and directories mirroring the package and module tree

I'm trying to generate documentation for my library. Since the library directory structure is quite big, I want Sphinx to generate the .rst files as a nested directory that mirrors the package and module structure. The library…
arunanshub
  • 581
  • 5
  • 15
1
vote
1 answer

How to use Sphinx apidoc to only document Python classes that are imported in __init__.py?

So currently I'm using apidoc to generate .rst files for my documentation and then using autodoc on them. The issue is that my package separates code into many different files which leads to this nested mess (my toctree has max depth 4): Welcome to…
Jay Parthasarthy
  • 327
  • 1
  • 4
  • 11
1
vote
1 answer

Include __main__.py in sphinx-apidoc generated files

I am not able to add my __main__.py file correctly and its functions while generating RST file with sphinx-apidoc. Other files and classes are generated correctly. I works only if I run sphinx-apidoc with -P parameter which includes private modules.…
Michal Špondr
  • 1,337
  • 2
  • 21
  • 44
1
vote
0 answers

Sphinx creates links in variable list to classes with the same names

I'm using Sphinx's apidoc extension to produce documentation for a Python project. It's somewhat quirkier than I had expected, but I've gotten most things to work. However, one quirk has me stumped. I've got a couple of classes with docstrings…
MTKnife
  • 133
  • 8
1
vote
0 answers

Sphinx-js doesn't generate documentation from .js files

I'm trying to auto-generate a project's documentation using Sphinx. My project looks like: project | |_docs |_build |_source |_venv ... |_project |_backend |_frontend |_node_modules ... |_src I've…
Ania
  • 51
  • 7
1
vote
1 answer

Sphinx-apidoc strange output for django app/models.py

I get some missed info in generated documentation of django project, for example first_name and last_name, email are missed (although they are defined in a parent abstract class). How to control what gets added into documentation based on…
DmitrySemenov
  • 9,204
  • 15
  • 76
  • 121
1
vote
1 answer

overwrite .rst files during Sphinx documentation

Let us say that we have a document structure that looks like the following . |____src | |____abc.py |____docs Now we generate documentation with the command: sphinx-apidoc -F -o docs src This generates several files within the ./docs/ folder that,…
ssm
  • 5,277
  • 1
  • 24
  • 42
0
votes
0 answers

Sphinx not importing all files in directory

I want to create a Sphinx documentation for my Code but it won't import all files properly The Structure looks like this: ├───config ├───docs │ ├───build │ └───source │ └───conf.py └───src ├───stages │ ├───stage1 │ │ …
LeM4
  • 31
  • 1
  • 5
0
votes
1 answer

Running sphinx-apidoc in subprocess.run() in AzureDevops Pipeline (Ubuntu 20.04) gives no Errors and does not execute

Problem As the title says, I am trying to run sphinx-apidoc from subprocess.run() on Ubuntu 20.04 in Azure DevOps Build Pipeline. My problem is that I seem to get an error but no message and nothing is really executed? My code is call =…
0
votes
1 answer

Is there a way Automate sphinx-apidoc generation in readthedocs

I'm somewhat new at both these tool sets. Currently I am running sphinx-apidoc... and then checking in the resulting doc/source/*.rst files so that readthedocs produces more than an empty document. However; is there a way to have this done…
Frank C.
  • 7,758
  • 4
  • 35
  • 45
0
votes
0 answers

Sphinx/Autodoc TOC not listing subpackages

I have a small repository of the following structure: |- doc/ |- conf.py |- index.rst |- ... |- src/dashtutorial/ |- __init__.py |- data/ | |- __init__.py | |- types.py |- gui/ |- __init__.py |-…
LCsa
  • 607
  • 9
  • 30