Skip to content

Docs sweep: fix docstring rendering, coverage gaps, AI-agents README - #20

Merged
thorwhalen merged 3 commits into
masterfrom
docs/epythet-sweep
Sep 15, 2026
Merged

thorwhalen merged 3 commits into
masterfrom
docs/epythet-sweep

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Summary

WP6 documentation sweep of config2py (epythet-repair-migrate procedure, per i2mint/epythet#16).

Before / after

epythet validate -i tests/ scrap/ examples/ -- config2py --level 2

  • Level 0.5 (parse) errors: 17 -> 0
  • Level 1 (Sphinx build) errors: 4 ("Unexpected indentation") -> 0
  • Undocumented public objects: 5 -> 0
  • Warnings: 65 -> 41; info: 87 -> 95 (mostly reclassified as new docstrings were added)

Doctests (pytest --doctest-modules config2py): 127 passed -> 129 passed, 2 skipped, all green. Full test suite (pytest): 95 passed, 1 skipped throughout, unchanged.

What was fixed

  • Mechanical rendering repairs via epythet.repair_package and by hand: missing blank lines before doctest blocks (DR003), a Markdown fence collapsed to inline code (DR006), bullet lists glued to their intro paragraph (DR008), a Google-style Args:/Example: header left unindented so it rendered as prose (DR002), an unbalanced ``Mapping``s backtick span (DR010), and a "kind: ..." block that produced a docutils "Unexpected indentation" build error.
  • Added missing docstrings to previously-undocumented public callables and __init__ methods (is_not_none_nor_empty, is_not_empty, persist_after_operation, ConfigStore.__init__, to_dict, ConfigReader.persist/__setitem__/__delitem__, SyncStore/FileStore/JsonStore.__init__, EnvironmentVariables.__init__/__repr__, AppData.__init__), each verified against the implementation.
  • user_gettable: converted its Sphinx :param: fields to Google Args: style (no wording change) so pydoclint stops reporting a false "missing argument" finding (DOC101/DOC103).
  • is_repl: the docstring documented a nonexistent repl_conditions parameter and, in an earlier draft, wrongly said to "reassign" is_repl.repl_conditions to change its checks — the function reads the module-level set object by reference, so only mutating the set works, not rebinding the attribute. Fixed both.
  • persist_after_operation / ConfigReader.persist: an earlier draft claimed persist() "writes to disk" unconditionally and that ConfigReader "has nothing to persist" — neither is true (persist() only writes to disk for target_kind == 'filepath', and ConfigReader.persist is disabled, not vacuous). Both caught and fixed by an independent adversarial review pass and corrected before landing.
  • README: added the "For AI agents" section (epythet ai-readme-check . now passes).

Deliberately left as-is

  • docsrc/ was already gitignored and not committed (this repo is a v2 pilot) — nothing to remove.
  • CI already uses the standard i2mint/epythet/actions/publish-github-pages@master job; no legacy epythet make . github step or tracked docs/ build output exists.
  • No [tool.epythet] theme override — epythet quickstart . builds clean with the auto theme; no evidence it picks wrong.
  • Remaining warning/info findings (D105 dunder docstrings, D212/D415/D205 napoleon formatting nits, DR011 single-backtick-as-italics on 4 pre-existing spans) are pre-existing style nits across the whole file, not coverage/correctness gaps; left alone per "entry points first, no filler."
  • No new epythet defect class encountered; no ledger rule proposed.

Claims declined

None — every docstring claim added or changed here was verified against the implementation or its tests (including the two follow-up corrections from the adversarial review).

https://claude.ai/code/session_01FRpcZoGP1pjBw8upjSYUD7

…t blocks)

epythet repair_package fixes for DR003/DR006/DR008/DR011/DR016 rendering
artifacts: missing blank lines before doctest blocks, a Markdown fence
converted to RST, and __init__ docstrings for SyncStore/FileStore/JsonStore.
- base.py, util.py: indent Google-style section headers (Args/Example) so
  napoleon renders them as fields instead of prose (DR002); fix an
  unbalanced ``Mapping``s backtick span (DR010); turn bullet lists that
  were glued to their intro line into proper RST lists (DR008); split a
  block of "**kind**: ..." lines into a real bullet list to remove a stray
  "Unexpected indentation" Sphinx build error.
- Add missing docstrings (D102/D103/D107) on previously undocumented
  public callables and __init__ methods, verified against the class
  docstrings and tests they already had.
- base.py user_gettable: convert its :param:/​:return: fields to Google
  style so pydoclint can match them against the signature (fixes a
  DOC101/DOC103 false "missing argument" finding).
- util.py is_repl: the docstring documented a nonexistent `repl_conditions`
  parameter; is_repl takes no arguments -- the set it checks is the
  module-level `is_repl.repl_conditions` attribute. Rewrote the docstring
  to describe that correctly (fixes DOC102/DOC103).
- README.md: add the "For AI agents" section (epythet ai-readme-check).

epythet validate -i tests/ scrap/ examples/ -- config2py --level 2:
before 17 Level-0.5 errors, 5 undocumented objects; after 0 errors at
levels 0.5 and 1 (Sphinx build), 0 undocumented objects.
pytest --doctest-modules: 127 -> 129 passed (2 new doctests added), all green.
- is_repl: the docstring said to "reassign" is_repl.repl_conditions to
  change the checks; the function reads the original module-level set
  object, so rebinding the attribute has no effect -- only mutating the
  set does. Corrected.
- persist_after_operation / ConfigStore: dropped the "write to disk"
  claim; persist() only touches disk when target_kind == 'filepath', and
  returns serialized data without writing for 'string'/'bytes'/'dict'
  targets.
- ConfigReader.persist: removed the invented "has nothing to persist"
  rationale -- it's disabled, not vacuous.
@thorwhalen
thorwhalen merged commit 821a4c7 into master Sep 15, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the docs/epythet-sweep branch September 15, 2026 12:45
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