Incomplete type annotations on public methods degrade generated API docs and expose undeclared internal API
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend, documentation
Direzione di ricerca
Start by running uv run python tooling/docs-autogen/build.py and grepping for "No type" to reproduce the griffe warnings. The listed members are in mellea.stdlib.session (MelleaSession.reset, powerup), mellea.stdlib.components (Instruction.parts, RichDocument.to_markdown, Table.parts), and the mellea.backends.* modules (processing, post_processing). Before annotating anything, a maintainer must decide which symbols are public, since that choice determines whether to annotate or hide them.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The generated API reference docs for several public classes are missing type
information because the underlying source lacks return-type and parameter
annotations. At the same time, the doc generator surfaces a number of
methods that appear to be internal backend-protocol details rather than
intentional user-facing API — raising a broader question about which symbols
are genuinely exported and which are implementation accidents.
Observed behaviour
Running the autogen pipeline (uv run python tooling/docs-autogen/build.py)
emits griffe warnings for every unannotated public member:
WARNING: No type or annotation for returned value (mellea.stdlib.session.MelleaSession.reset)
WARNING: No type or annotation for returned value (mellea.stdlib.session.MelleaSession.powerup)
WARNING: No type or annotation for returned value (mellea.stdlib.components.instruction.Instruction.parts)
WARNING: No type or annotation for returned value (mellea.stdlib.components.docs.richdocument.RichDocument.to_markdown)
WARNING: No type or annotation for returned value (mellea.stdlib.components.docs.richdocument.Table.parts)
Backend protocol methods are also affected across all providers:
| Module | Affected members |
|---|---|
mellea.backends.huggingface |
LocalHFBackend.processing (params: input_ids, seed), post_processing — 9 issues |
mellea.backends.ollama |
OllamaModelBackend.is_model_available (param + return), processing, post_processing — 5 issues |
mellea.backends.openai |
OpenAIBackend.processing, post_processing (params: thinking, seed) — 4 issues |
mellea.backends.litellm |
LiteLLMBackend.processing, post_processing (param: thinking) — 3 issues |
mellea.backends.watsonx |
WatsonxAIBackend.processing, post_processing (param: seed) — 3 issues |
mellea.backends.adapters |
AdapterMixin.add_adapter, load_adapter, unload_adapter returns — 3 issues |
mellea.backends.tools |
add_tools_from_model_options, add_tools_from_context_actions returns — 2 issues |
mellea.formatters.granite |
ElasticsearchRetriever and related — 27 issues |
mellea.telemetry.backend_instrumentation |
start_generate_span, instrument_generate_from_raw — 2 issues |
Because griffe documents anything not prefixed with _, the published API
reference currently includes all of these, with incomplete type information.
Expected behaviour
The API reference accurately reflects the intended public contract:
- Methods that are part of the user-facing surface (
MelleaSession, component
classes, public backend helpers) should have complete type annotations so the
generated docs show full signatures. - Methods that are internal backend-protocol details (
processing,
post_processing) should either be annotated (if truly public) or excluded
from the generated docs (if internal).__all__declarations and/or a
leading underscore convention would make the distinction machine-checkable.
Broader concern: what is the public API?
The project does not currently declare __all__ in most modules, so griffe
documents every non-underscore symbol it finds. This means the published API
reference includes implementation details that are not part of the stable
contract — processing() and post_processing() on backend classes are the
clearest example. Users reading the docs cannot tell which methods are safe to
call and which are framework-internal.
Deciding and encoding the public surface (via __all__, underscore prefixes, or
a similar mechanism) would:
- shrink the generated docs to the intended contract
- eliminate the griffe warnings as a side-effect
- make it easier to apply the docstring quality gate (
--fail-on-quality) to
the right set of symbols
Reproduction
uv sync --all-extras --group dev
uv run python tooling/docs-autogen/build.py 2>&1 | grep "No type"
- Lingua principale
- Python
- Stelle
- 1.8k
- Fork
- 161
- Merge medio
- 4g 3h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di generative-computing/mellea
-
bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknownApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
generative-computing/mellea#1864 ·
I maintainer di solito rispondono entro 3 giorni
-
bug: instruct() and react() replay tool-call turns without tool_callsForse già presa @simonyang08 l’ha presa 21 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
generative-computing/mellea#1784 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examplesForse già presa @madhusudhan1260 l’ha presa 18 giorni fa. Apertagood first issue p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
generative-computing/mellea#1780 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
area/telemetry enhancement p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
generative-computing/mellea#1210 ·
I maintainer di solito rispondono entro 3 giorni
-
Add requirement priorityApertaarea/requirement area/stdlib enhancement p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
generative-computing/mellea#31 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di generative-computing/mellea
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Maintainer] task area:visualizer
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
RailtownAI/railtracks#1824 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/datafusion#27688 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
heasarc/heasarc-tutorials#317 ·
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
mloda-ai/mloda-registry#1664 ·
I maintainer di solito rispondono entro 1 giorno