Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoapimodule directive in "manual mode": Imported members are documented #342

Open
tony opened this issue Jul 3, 2022 · 2 comments
Open

Comments

@tony
Copy link

tony commented Jul 3, 2022

image

Above: Imports visible in documentation with .. autoapimodule directive

Related: #262, #317

Reproduction

https://github.com/vcs-python/libvcs/tree/autoapi-duplicates

Versions

sphinx 5.1.0
sphinx-autoapi 1.9.0

Configuration

conf.py

extensions = [
    "sphinx.ext.napoleon",
    "autoapi.extension",
    "sphinx.ext.autodoc",
    "sphinx.ext.todo",
    "sphinx.ext.intersphinx",
    "myst_parser",
]

# sphinx-autoapi
autoapi_type = "python"
autoapi_dirs = [project_root / "libvcs"]
autoapi_generate_api_docs = False  # when False, use directives

Directions

image

Workaround

Workaround ATM exclude-members for each usage:

.. autoapimodule:: libvcs.projects.git
   :members:
   :show-inheritance:
   :undoc-members:
   :exclude-members: BaseProject, StrOrBytesPath, StrPath

Discussion

  • Any better workarounds?
  • Is this a bug or expected behavior?
  • Could my package structure be playing a role?
  • Anyone else experiencing this? Ideas / workarounds?
@tony tony changed the title autoapimodule directive + manual generation: autoapimodule directive in "manual mode": Imports are documented Jul 3, 2022
@tony tony changed the title autoapimodule directive in "manual mode": Imports are documented autoapimodule directive in "manual mode": Imports are duplicated Jul 3, 2022
@tony tony changed the title autoapimodule directive in "manual mode": Imports are duplicated autoapimodule directive in "manual mode": Import members are included Jul 3, 2022
@tony tony changed the title autoapimodule directive in "manual mode": Import members are included autoapimodule directive in "manual mode": Imported members are documented Jul 3, 2022
@tony
Copy link
Author

tony commented Jul 30, 2022

Updated example from sphinx 5.0 to 5.1, autoapi 1.8.0 -> 1.9.0

@ashb
Copy link
Contributor

ashb commented Dec 22, 2022

Not sure if this is the same issue, related or something else entirely, but the autoapi-skip-member event also doesn't seem to fire for things documented by autoapimodule directives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants