Automatically generate per-submodule API reference doc pages in template

Abierto
#573 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Start with the template's {{cookiecutter.project_slug}}/mkdocs.yml and docs/api.md, then read the linked mkdocstrings recipe for automatic code reference pages. Check how mkdocs_gen_files and mkdocs-literate-nav fit the template's existing configuration. Done means generated docs provide per-submodule API pages and navigation without manually maintained stubs.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Is Your Feature Request Related to a Problem? Please Describe

Currently the mkdocstrings configuration for the MkDocs docs in the template

https://github.com/UCL-ARC/python-tooling/blob/f1a228d564614619b61e3783f7527b5b5672efb6/%7B%7Bcookiecutter.project_slug%7D%7D/mkdocs.yml#L46-L55

is set up to show submodules on the same page as the parent package, with a single 'API reference' page included in the docs

https://github.com/UCL-ARC/python-tooling/blob/f1a228d564614619b61e3783f7527b5b5672efb6/%7B%7Bcookiecutter.project_slug%7D%7D/docs/api.md?plain=1#L1-L3

While this works reasonably for small packages, once packages start getting larger it gets cumbersome to have all the API documentation on a single page.

In Sphinx the analagous autodoc plug-in instead defaults to creating a nested directory structure in the built docs reflecting the package structure with one page per submodule and appropriate indices to link all the nav together.

This can be achieved manually in our current set up by setting show_submodules to False, creating a Markdown source page for each submodule with the appropriate content, and adding entries to the nav section for each of the module pages but this is obviously very error prone / likely to end up getting out of sync.

Describe the Solution You'd Like

The mkdocstrings docs has instructions for setting up a recipe to automate building the appropriate module stub pages using mkdocs_gen_files plug-in and generating the navigation structure using mkdocs-literate-nav - ideally we should implement this in the template.

Describe Alternatives You've Considered

No response

Additional Context

No response

Lenguaje dominante
Python
Estrellas
62
Forks
10
Merge medio
5 d 19 h
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de UCL-ARC/python-tooling

Todos los issues de UCL-ARC/python-tooling

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.