lsst-sqre / documenteer

Sphinx extensions, configurations, and tooling for Rubin Observatory documentation projects
https://documenteer.lsst.io
MIT License
5 stars 3 forks source link

Sphinx extension that strips module docstrings down to 1-sentence summary. #84

Open jonathansick opened 4 years ago

jonathansick commented 4 years ago

Right now the DM usage of automodapi is to skip module docstrings because we don't want to bloat API reference listings with a lot of text that might reside in module docstrings. The downside of this is that we don't get proper markers for those modules, so we can't link to modules using the Python domain in Sphinx. A neat compromise might be to dynamically strip our module docstrings down to their one-sentence summaries (if a docstring does exist), and then permit module docstrings with automodapi. I think this can be done with an autodoc hook.