docs(api): clarify complex Python interfaces - #12111
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dba657f771
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
dba657f to
b40d3a9
Compare
b40d3a9 to
0fab393
Compare
0fab393 to
ad060b0
Compare
Independent Docstring AuditI had every authored docstring on this branch audited against the code it documents, by an agent that read the implementations rather than the docstrings. Two of three verified clean; one did not.
if len(args) in [1, 2] and issubclass(request_model, BaseModel):So four documented-as-absent behaviors were real:
The first two matter most: the failure mode is silent pass-through of an unvalidated payload, which is precisely what a reader consults this docstring to rule out. All four are now documented, and the pinned summary assertion moved with it.
Test quality fix. 165 tests pass, all three generators fresh. |
|
/ok to test |
|
/ok to test 35ed55f |
Picks up the Kubernetes reference source-path correction and the crd-ref-docs <br /> collapse from #12110. Signed-off-by: Dan Gil <dagil@nvidia.com>
|
/ok to test 2fe6052 |
Signed-off-by: Dan Gil <dagil@nvidia.com>
Method carried only a summary, so everything below a docstring first line was dropped: Connector.begin_read documents two parameters, a return, and two raises, and the page showed none of them. Method now carries the same parsed sections as Symbol and renders through the same path, so the existing ParamField, Returns, Raises, and admonition handling applies to methods without a second rendering path. Every method renders through one shape rather than only the documented ones. Promoting on docstring content would let coverage decide the visual rhythm of the page. Each method also gets a stable anchor qualified by its owning symbol. Method names repeat across classes, so a name-derived id would collide and resolve a deep link to whichever symbol rendered first. Validation: 189 passed; fern check 0 errors; output byte-identical on rerun; 587 method anchors with no duplicate id on any page. Signed-off-by: Dan Gil <dagil@nvidia.com>
|
/ok to test 65226a3 |
The method heading escaped its visible text with mdx_attribute, the only call site in the module to do so outside a double-quoted attribute. That escaper handles the quote character and leaves the angle bracket and brace alone, which inverts what child position needs. escape_mdx_prose is the one that escapes JSX-significant characters. Generated output is byte-identical, since method names are Python identifiers and never carried a character either escaper would touch. The fix is about the invariant holding for the next caller. _split_lead takes a symbol or a method, so its parameter is no longer named symbol. Signed-off-by: Dan Gil <dagil@nvidia.com>
|
/ok to test 15d2a6e |
…nto m12111 Signed-off-by: Dan Gil <dagil@nvidia.com> # Conflicts: # docs/fern/pages/reference/api/python/frontend.mdx
|
/ok to test a12804d |
…nto u12111 Signed-off-by: Dan Gil <dagil@nvidia.com> # Conflicts: # docs/fern/pages/reference/api/python/_core.mdx # docs/fern/pages/reference/api/python/frontend.mdx # docs/fern/pages/reference/api/python/llm.mdx # docs/fern/pages/reference/api/python/mocker.mdx # docs/fern/pages/reference/api/python/planner.mdx # docs/fern/pages/reference/api/python/runtime.mdx
Signed-off-by: Dan Gil <dagil@nvidia.com>
|
/ok to test 18839be |
Summary
dynamo_endpointand the scaling contract forPlannerConnector.get_media_url.Validation
124 passedindocs/fern/scripts/testsgen_python_api.py --checkruff checkandruff format --checkpassed for the touched Python sourceget_media_urlexample was verified against the in-memoryfsspecbackendgit diff --checkpassed for the stacked diffDependencies