Skip to content

docs: show field precedence with executable Quick Start examples - #77

Open
Gonghan-Princess wants to merge 1 commit into
nhairs:mainfrom
Gonghan-Princess:codex/docs-field-precedence-examples
Open

docs: show field precedence with executable Quick Start examples#77
Gonghan-Princess wants to merge 1 commit into
nhairs:mainfrom
Gonghan-Princess:codex/docs-field-precedence-examples

Conversation

@Gonghan-Princess

Copy link
Copy Markdown

The Quick Start describes defaults and static fields without showing their JSON output or explaining which source wins when keys overlap. Add visible outputs and an example showing how defaults, format fields, static fields, dictionary messages, and record extras combine in the current implementation.

Enable INFO logging in the shared setup, correct the defaults argument name, and add tests that execute the actual Markdown examples in fresh subprocesses and compare their output with the displayed JSON. Add an Unreleased changelog entry.

Refs #36. This addresses the examples and field-precedence portion of the issue.

Validation:

  • Full pytest suite: 221 passed, including three Markdown example cases.
  • Black, mypy, and validate-pyproject passed. Pylint passed at 10.00/10 on an LF export (the Windows checkout produces CRLF-only warnings).
  • MkDocs build passed with mkdocstrings-python 1.19.0. The latest 2.0.8 handler rejects the existing import configuration; no dependency or configuration changes are included here.
  • Strict MkDocs builds on this change and the unchanged base report the same seven existing source-docstring annotation warnings. Rendered Quick Start output was checked.

AI assistance: This contribution was prepared with OpenAI Codex, including drafting, implementation, and local verification.

@nhairs

nhairs commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Thanks @Gonghan-Princess - overall this looks good

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.

2 participants