readthedocs / sphinx-autoapi

A new approach to API documentation in Sphinx.
https://sphinx-autoapi.readthedocs.io/
MIT License
415 stars 126 forks source link

Difference between submodules and subpackages? #450

Open dstansby opened 1 month ago

dstansby commented 1 month ago

I'm trying to use autoapi to document a package, and am getting the API docs grouped in both "submodules" and "subpackages":

Screenshot 2024-05-28 at 16 48 21

Does anyone know

  1. The difference between a submodule and a subpackage?
  2. How I can group these together (ie. merge the lists above) so that all the second level API docs are in a single list, instead of spread across submodules and subpackages
AWhetter commented 1 month ago

A package is a directory that contains an __init__.py and may have packages or modules under it. A module is a .py file. There's no difference in usage to a user however so it's maybe a bit pedantic to separate them. I think we'll change this to lump everything under "submodules".