Incomplete type annotations on public methods degrade generated API docs and expose undeclared internal API
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- backend, documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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"
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 161
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của generative-computing/mellea
-
bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknownĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
generative-computing/mellea#1864 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug: instruct() and react() replay tool-call turns without tool_callsCó thể đã có người làm @simonyang08 đã nhận 21 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
generative-computing/mellea#1784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examplesCó thể đã có người làm @madhusudhan1260 đã nhận 18 ngày trước. Đang mởgood first issue p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
generative-computing/mellea#1780 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area/telemetry enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
generative-computing/mellea#1210 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add requirement priorityĐang mởarea/requirement area/stdlib enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
generative-computing/mellea#31 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của generative-computing/mellea
Issue tương tự
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jxxghp/MoviePilot#7576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jbaruch/software-factory#266 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày