Closed jpfeuffer closed 1 year ago
Or check https://docs.cython.org/en/latest/src/userguide/source_files_and_compilation.html#integrating-multiple-modules Instead of the python side imports that we are currently doing.
This might be solved with autosummary_imported_members = True
in conf.py. I just tested it.
But this will lead to a lot of classes on the same page. We can reduce to not showing signatures with
.. autosummary::
:toctree: _autosummary
:recursive:
:nosignatures:
pyopenms
But then it might be a bit useless, since the classes are not clickable.
This issue basically sums up the problem(s) that we have. https://github.com/sphinx-doc/sphinx/issues/7912
Even with some potential solutions using sphinx templates here: https://stackoverflow.com/questions/2701998/sphinx-autodoc-is-not-automatic-enough/62613202#62613202 https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion https://sphinx-autosummary-recursion.readthedocs.io/en/latest/_autosummary/mytoolbox.html
Maybe another theme (sphinx-immaterial) can improve on that, too. I read in the linked sphinx issue, that the author made some fixes to autosummary for this.
https://galois.readthedocs.io/en/stable/api/galois.FieldArray/ with the sphinx-immaterial theme.
I think by using the above mentioned autosummary option and making the submodules hidden, this is sufficiently solved for now.
In our init.py we import all submodules and make them available under the root package. This should be represented in the API doc. Looks cleaner.
Middle-term we should create modules maybe for our subfolders of the openms library. Long-term we will split up the OpenMS library itself.