Skip to content

docs: WP6 epythet documentation sweep - #96

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

thorwhalen merged 6 commits into
masterfrom
docs/epythet-sweep

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

[session-link-guard] stripped Claude-Session link(s) from the PR body -- this repo is public (or its visibility could not be confirmed)

Summary

WP6 documentation sweep of py2store (i2mint/epythet#16), continuing a previously-started branch that was reviewed line-by-line against the docstring policy and the known epythet repair defect classes (i2mint/epythet#27) before landing.

  • Dropped the committed docsrc/ template (stale, referenced a non-existent mockmodule) and the tracked 2021 docs/ build output; docsrc/ is gitignored, the one hand-written page moved to misc/docs/.
  • Mechanical + hand-fixed docstring repairs (blank lines before doctests/lists, Markdown fences → RST code blocks, backtick style, one-line Returns: → sections).
  • Added/repaired docstrings and doctests for the package's local-file store entry points (py2store/__init__.py, access.py, persisters/local_files.py, stores/local_store.py, my/grabbers.py, key_mappers/str_utils.py, key_mappers/tuples.py) — every added example was executed and its real output pasted in.
  • Replaced the legacy epythet make . github CI step (which rewrote the tracked docs/ dir the CI never actually served) with the standard i2mint/epythet/actions/publish-github-pages job.
  • Added the README "For AI agents" section via epythet ai-readme-check --write.
  • An independent Opus review of the full diff found three docstring claims not backed by the code (PathFormat._prefix, LocalTextStore's template restricting reads, ipython_display_val_trans's HTML detection order) — fixed in a follow-up commit.

Before / after

before after
epythet validate level 0.5 errors 26 0
epythet validate findings 26 error, 443 warning 0 error, 307 warning, 366 info
pytest --doctest-modules 63 passed, 1 skipped 74 passed, 1 skipped
pytest 8 passed 8 passed
Sphinx build not building (no docsrc, or 19 DR015 errors) builds clean (only pre-existing intersphinx/pygments warnings)

Deliberately left: 73 objects still undocumented (epythet validate DQ001), mostly in utils/glom.py (a vendored/adapted third-party module), utils/mg_selectors.py, utils/cumul_aggreg_write.py and optional ext/* modules — none are top-level package entry points, and the docstring policy says incorrect docs are worse than missing ones, so these were left alone rather than filled in without verifying their (often non-obvious) behaviour.

Test plan

  • pytest (8 passed)
  • pytest --doctest-modules py2store (74 passed, 1 skipped)
  • epythet validate -i tests/ scrap/ examples/ --level 2 -- py2store (0 error)
  • epythet make . html (Sphinx build succeeds)
  • epythet ai-readme-check . (ok)
  • Independent Opus adversarial review of the diff; findings fixed

…tput

docsrc/ was the epythet 0.1 scaffold (template conf.py, index.rst, module_docs/, Makefile) plus two pages that automodule a non-existent mockmodule; epythet 0.2 regenerates the scaffold on every build, so it is now gitignored. The one hand-written page (the zip files how-to) moves to misc/docs/. docs/ was a 2021 HTML build that Pages does not serve (Pages serves the gh-pages branch).
…efore doctests and lists, Markdown fences to code blocks, one-line Returns to sections)
Blank lines before Google sections, code in double backticks where it carried asterisks, literal blocks for indented code lines, a dangling RST reference, and empty Returns sections filled from the code.
Drops the `epythet make . github` step from Publish (which rewrote a
tracked docs/ dir the CI never actually served) and adds a github-pages
job using i2mint/epythet/actions/publish-github-pages@master, matching
the pattern already rolled out to other swept repos.

Also adds the README "For AI agents" section via `epythet ai-readme-check
--write`, pointing at llms.txt / py2store.md / objects.inv.

See i2mint/epythet#16 WP6.
- PathFormat._prefix is the directory containing the part before the
  first '{', not that part itself (differs when the template has no
  separator right before '{', e.g. '/data/pre_{}.csv').
- LocalTextStore's path template restricts what is listed, not what
  can be read/written (contradicted the class's own doctest two lines
  below).
- ipython_display_val_trans dispatches HTML detection by key extension
  only when key is a string longer than 4 chars, else by content sniff
  -- not an unconditional "or".
@thorwhalen
thorwhalen merged commit db92faf into master Sep 15, 2026
6 checks passed
@thorwhalen
thorwhalen deleted the docs/epythet-sweep branch September 15, 2026 11:33
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