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

Private packages cause toctree warning since v3.1.0 #446

Closed
eigenbrot opened this issue May 20, 2024 · 1 comment
Closed

Private packages cause toctree warning since v3.1.0 #446

eigenbrot opened this issue May 20, 2024 · 1 comment
Labels

Comments

@eigenbrot
Copy link

This is a new issue in v3.1.0.

We have a project that has a private package, e.g.,:

cool-project
├── cool_project
│   ├── cool_package
│   │ ├── __init__.py
│   │ └── cool_module.py
│   └── _private_package
│       ├── __init__.py
│       └── another_module.py
└── docs
    ├── conf.py
    └── index.rst

We use the default autoapi options, which are autoapi_options =['members', 'undoc-members', 'show-inheritance', 'show-module-summary', 'special-members', 'imported-members', 'show-inheritance-diagram']. Importantly, this does NOT render private members. (The auto api documentation suggests that private-members is on by default, but that doesn't seem to be true. Is that a bug?). In v3.0.0 everything worked fine and docs for the _private_package were not rendered.

Since v3.1.0 the build produces the following Warning:

/home/***/cool-project/docs/autoapi/cool_project/_private_package/another_module/index.rst: WARNING: document isn't included in any toctree

On some level I guess this is correct: that private package shouldn't be in a toctree because it shouldn't be rendered at all. That said, we would rather this not throw a warning because it's the expected behavior.

Adding private-members to autoapi_options makes the warnings go away, but now the private package is rendered, which is not what we want.

FWIW, I tracked down the offending commit to this one, but I don't know enough about the details to see what in there is causing the issue.

Any advice is greatly appreciated. Thanks!

@eigenbrot
Copy link
Author

Thanks, @AWhetter, for taking care of this so quickly!

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

No branches or pull requests

2 participants