The documentation is a mess. There are some format errors, but I want a deeper…
- User
The documentation is a mess. There are some format errors, but I want a deeper restructuring.
Read the whole codebase carefully. I think the documentation -- and I mean the generated site -- should open with an overview of why this project exists. It should then give simple examples, no more than 3-4 of the core functions. There are lots of variations of couse, but these don't need to be covered in the overview.
Then move on to the function-by-function docs. Many internal functions are showing up on the website. I don't want them on the web, but don't remove their docstrings!
Finally, I detest the Google docstring style. E.g., having a block of Args where you explicitly list every argument. These arguments are well-named and have types. Why repeat it? Here is an example:
Args: args: Command arguments to run in the container. image: Container image to use. timeout_seconds: Maximum time to wait for the process to complete.
timeout_seconds is obvious. image needs some explanation -- it is a container image name, and not a photo of a cat. Get it?
Go.
Assistant· claude-opus-4-7
Now I have the full picture. Let me execute the restructure.
Assistant· claude-opus-4-7
First, update
mkdocs.yamlto hide internals via filters and disable Google-style assumptions.Assistant· claude-opus-4-7
Now rewrite the docstrings. Start with
podman_run— the worst offender with its GoogleArgs:block.Assistant· claude-opus-4-7
Now the async
rundocstring — tighten it and add a sentence onmemory_watchdog_interval_seconds.Assistant· claude-opus-4-7
Now the sync
run. The existing docstring already doesn't use GoogleArgs:but it's worth tightening.Assistant· claude-opus-4-7
Now the
Interactive(sync) class — the class-level docstring is fine, but the inner method docstrings can be tightened.Assistant· claude-opus-4-7
Now the async
Interactiveclass — currently has nearly no docstrings. Add a class docstring that mirrors the sync one and brief method docstrings.Assistant· claude-opus-4-7
Add a docstring to
read_linefor the async class and check if a public-facing docstring is missing anywhere.Assistant· claude-opus-4-7
Tighten
Resultdocstring:Assistant· claude-opus-4-7
Build succeeds. Let me sanity-check the generated HTML — confirm internals are absent and the structure flows.
Assistant· claude-opus-4-7
The site is clean: overview → 4 quickstart examples → public API only (sync
run, asyncrun,podman_run, sync & asyncInteractive,Result). Internals like_memory_watchdog,_InteractiveState,BoundedOutputBuffer, andutilhelpers no longer surface.Assistant· claude-opus-4-7
Done. Summary of what changed:
docs/index.mdrewritten: opens with a "Why this library exists" overview explaining the three bounds (process-group cleanup, output capture, wall-clock timeout) and the no-isolation caveat; a comparison table of the four flavors; four quickstart examples (syncrun, asyncrun,Interactive,podman_run); then an API section that uses explicit function-level:::directives so only the public surface is rendered.mkdocs.yaml: droppeddocstring_style: google, addedfilters: ["!^_"]so underscore-prefixed members are hidden, addedshow_root_full_pathandseparate_signaturefor clearer rendered signatures, setshow_source: false, and loweredheading_levelto fit beneath the index page's##sections.
- User
commit
Assistant· claude-opus-4-7
Committed as
fb0d615. Working tree is clean (the leftover untracked items —.claude/,.codex/,.cursor/,.entire/,oom,site/— are tool/build artifacts, not intended for the commit).- User
Could you not use the passive voice?
- User
Could you not use the passive voice? write like a good academic paper.
Assistant· claude-opus-4-7
Right — let me sweep through and rewrite in active voice.
Assistant· claude-opus-4-7
Now the docstrings.
Assistant· claude-opus-4-7
Quick edits, no task tracking needed.
Assistant· claude-opus-4-7
Rebuild to confirm everything renders.
Assistant· claude-opus-4-7
Committed as
51a7144. The index page and every public-API docstring now use active voice — "we" or a direct verb where the previous version had "is started", "are read", "is forced to", "are truncated", and so on.