I'm using docstrings to document python code and sphinx-autodoc to generate apidoc HTMLs. The structure of my packages is as follows: mainpackage.subpackage.module, I want apidocs to link to classes from a module as mainpackage.subpackage.Class and not mainpackage.subpackage.module.Class. My problem comes from the scikit-multilearn project, for example: I have an MLClassifierBase class in skmultilearn.base.base, but I'm importing it in __init__.py in skmultilearn.base, and I want the sphinx-generated apidocs to only use this class as skmultilearn.base.MLClassifierBase and not skmultilearn.base.base.MLClassifierBase as it does now. Can someone help?
I've already tried:
set
add_module_names = Falseinconf.pyper Sphinx apidoc - don't print full path to packages and modulesadded
""".. automodule:: base"""toskmultilearn/base/__init__.pyadded
__all__ = ['MLClassifierBase']toskmultilearn/base/__init__.pyadded
.. autoclass:: base.MLClassifierBaseto the class docs
I'm still having a Bases: skmultilearn.base.base.MLClassifierBase in every class that derives from MLClassifierBase. How do I change this?