-
Notifications
You must be signed in to change notification settings - Fork 131
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
Duplicated symbols appear in 2 places #317
Comments
Same issue with my atpublic package. I even tried renaming my implementation files to |
Experiencing this in poliastro as well. The solution given in #262 (comment), which is related to this issue, was to "attach an event handler to the |
AutoAPI chooses to document everything that is considered public by default. Therefore because your API makes the function available in both places, it is documented in both places. So to hide it in one place you either need do what @warsaw suggested and make it private in one place, or do what @astrojuanlu suggested and use |
Thanks for the reply @AWhetter but I'm not actually sure this solves my problem with atpublic. With my approach of using
if I don't set |
Aha! Forget about
i.e. removing |
I am a bit perplexed by the answers here. 😆 I am creating #342. None of these seem like solutions and this is definitely feeling - from a user perspective - like a bug that'd break for most users
Thank you for the project and your time on the project @AWhetter.
|
I agree with @tony, I don't understand why this issue was closed. Technically, everything is public in Python, but conventions have been defined to indicate which symbols are public or not:
This is how all major Python libraries are defined. For example, if we take np.sin
np.core.sin
np.core.umath.sin However the assert 'sin' in np.__all__
assert 'core' not in np.__all__ So sphinx-autoapi seems to violate this very standard Python convention. |
I have a module defining a public API:
In
__init__.py
:However,
X
is documented twice:autodoc/my_module/index
autodoc/my_module/implementation/index
I think this is confusing for the end-user. When I define a public API in
__init__.py
, I would like to only document the top-level public API.autodoc/my_module/implementation
should be considered internal implementation and never shown.Similarly I would like the typing aliases should redirect to
my_module.X
:Is it possible to do currently ? If so how ? I would be fine with a python hook that I can use to programatically program this behavior.
The text was updated successfully, but these errors were encountered: