Extensions not working with autoapi.extension
See original GitHub issueHello,
first thank you for this great and simple extension. I am quite new to sphinx and restructured text, please do not mind if anything is missing.
Configuration
config.py
...
extensions = [
"sphinx.ext.intersphinx",
"autoapi.extension",
"sphinx.ext.viewcode",
"sphinx_multiversion",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_autoapi_templates", "_build", "Thumbs.db", ".DS_Store"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# -- autoapi configuration -----------------------------------------------
autoapi_type = "python"
autoapi_dirs = ["../dbv1_cdk"]
autoapi_member_order = "groupwise"
autoapi_template_dir = "_autoapi_templates"
autoapi_options = [
"imported-members",
"members",
"show-inheritance",
"show-module-summary",
# "special-members",
"undoc-members",
]
autoapi_keep_files = True
# -- Multiversion configuration ---------------------------------------------
# See: https://holzhaus.github.io/sphinx-multiversion/master/index.html
smv_branch_whitelist = r"^.*$"
smv_tag_whitelist = r"^\d+\.\d+\.\d+$"
smv_released_pattern = r"^tags/\d+\.\d+\.\d+"
...
index.rst
Quickstart
==========
.. toctree::
:maxdepth: 2
guides/quickstart
.. toctree::
:maxdepth: 2
autoapi/index
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
When I invoke sphinx-build SRC DST
building the documentation works as expected, but with sphinx-multiversion
I am getting following errors.
Running Sphinx v3.1.1
loading intersphinx inventory from https://docs.aws.amazon.com/cdk/api/latest/python/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
[AutoAPI] Reading files... [100%] /workspaces/serviceteamdbv2/dbv1_cdk/dbv1_cdk/base_lib/base_config_parser.py
[AutoAPI] Mapping Data... [100%] /workspaces/serviceteamdbv2/dbv1_cdk/dbv1_cdk/base_lib/base_config_parser.py
[AutoAPI] Rendering Data... [ 6%] dbv1_cdk.example_package_1
[AutoAPI] Rendering Data... [ 12%] dbv1_cdk.dbv1_core
[AutoAPI] Rendering Data... [ 18%] dbv1_cdk.dbv1_ec2
[AutoAPI] Rendering Data... [ 25%] dbv1_cdk.dbv1_s3
[AutoAPI] Rendering Data... [ 31%] dbv1_cdk.dbv1_kms
[AutoAPI] Rendering Data... [ 37%] dbv1_cdk.dbv1_ssm
[AutoAPI] Rendering Data... [ 43%] dbv1_cdk
[AutoAPI] Rendering Data... [ 50%] dbv1_cdk.dbv1_autoscaling
[AutoAPI] Rendering Data... [ 56%] dbv1_cdk.dbv1_iam
[AutoAPI] Rendering Data... [ 62%] dbv1_cdk.base
[AutoAPI] Rendering Data... [ 68%] dbv1_cdk.example_package_2
[AutoAPI] Rendering Data... [ 75%] dbv1_cdk.tools
[AutoAPI] Rendering Data... [ 81%] dbv1_cdk.tools.pattern
[AutoAPI] Rendering Data... [ 87%] dbv1_cdk.tools.helper
[AutoAPI] Rendering Data... [ 93%] dbv1_cdk.base_lib
[AutoAPI] Rendering Data... [100%] dbv1_cdk.base_lib.base_config_parser
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
[AutoAPI] Adding AutoAPI TOCTree [autoapi/index] to index.rst
/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
generating indices... genindex/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
done
writing additional pages... search/tmp/tmpcg1lzdqn/c5a47d28e21752e4a9b0dbc440fff5e1756c196b/docs/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
done
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 6 warnings.
The HTML pages are in docs/_build/html/sphinx.
I can verify that this problem does not exists if i comment the extension autoapi.extension
out of the config.py
.
Maybe I missconfigured anything?
Thank you for your help!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Tutorials — Sphinx AutoAPI 2.0.0 documentation
To enable the extension, we need to add it to the list of extensions in Sphinx's conf.py file: extensions = ['autoapi.extension'].
Read more >Sphinx AutoAPI extension enabled with adding README ...
In conf.py , add the myst_parser extension, that renders markdown files to HTML (I used the latest: 0.15.0), and create a function that ......
Read more >sphinx.ext.autodoc – Include documentation from docstrings
This extension can import the modules you are documenting, and pull in documentation from docstrings in a semi-automatic way.
Read more >Generating beautiful Python API documentation with Sphinx ...
Autosummary does not generate TOC entries for API elements such as classes/modules and ... Add AutoAPI it to the Sphinx extension list:.
Read more >An idiot's guide to Python documentation with Sphinx and ...
Assuming you enabled the autodoc extension, Sphinx can be set-up to ... It should work if you add it to the extensions list...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dvonessen We are using autoapi.extension slightly differently than you are, but we are able to use it with sphinx-multiversion in our project. Maybe this will help you identify what’s not working in your configuration.
I got it to work pass
-D autoapi_root="\${sourcedir}" -D autoapi_dirs="\${sourcedir}/../src"
and add “yourpackage/index” in your toctree