Skip to content

docs: complete Google-style docstrings for the public API#26

Merged
PabloPardoGarcia merged 1 commit into
mainfrom
pablo/public-docstrings
Jul 9, 2026
Merged

docs: complete Google-style docstrings for the public API#26
PabloPardoGarcia merged 1 commit into
mainfrom
pablo/public-docstrings

Conversation

@PabloPardoGarcia

Copy link
Copy Markdown
Member

A docstring audit for the documentation site found most Observation and Generation methods undocumented and several public entry points at one-line stubs. The docs site generates its API reference from these docstrings, so they are now the single source of truth for reference documentation.

What changed (docstrings only, no behavior):

  • Observation: class + all five methods (set_input, set_output, set_attribute, update, end), documenting serialization and the manual-vs-context-manager end() contract.
  • Generation: class + all seven methods, documenting message normalization, default roles, the tokens-not-cost convention, and the emitted gen_ai.* attributes.
  • observe(): full Args/Returns, incl. generator semantics and exception behavior.
  • resolve_config(): precedence rules, env var names, clamping; GlassflowConfig class docstring.
  • GlassflowClient + get_tracer, build_span_exporter, start_generation/start_as_current_generation Args/Returns, SpanKind variant descriptions.

Gates: ruff check, ruff format --check, mypy strict, pytest all green.

@PabloPardoGarcia
PabloPardoGarcia merged commit 75d82a1 into main Jul 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant