Skip to content

Repo polish: PyPI metadata, doctest coverage, and a flaky doctest fix - #2

Merged
thorwhalen merged 5 commits into
masterfrom
claude/rollout-polish
Aug 7, 2026
Merged

Repo polish: PyPI metadata, doctest coverage, and a flaky doctest fix#2
thorwhalen merged 5 commits into
masterfrom
claude/rollout-polish

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Rollout polish pass.

  • Modernize the PyPI metadata (SPDX license, classifiers, keywords, urls).
  • Widen testpaths so the package's doctests actually run in CI.
  • fix: with those doctests now collected, TemplateWrapper's was non-deterministic — made it deterministic.
  • Add the standard .editorconfig.

https://claude.ai/code/session_01Uz2YYxAfa1DX8UcCDmeKC5

`get_dependencies()` returns a set, and the docstring compared it against a
set literal `{'user', 'years'}`. Set repr order for strings depends on
PYTHONHASHSEED, so the example passed or failed at random (verified: fails on
seeds 0/2/3/4, passes on 1/5). Compare `sorted(...)` against a list instead.

This was invisible until now because `testpaths` did not include the package
directory, so CI collected zero package doctests.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
CI runs `pytest --doctest-modules` with no path argument, so collection is
driven entirely by `testpaths`. With `testpaths = ["tests"]` the 58 doctests in
the `embody` package were never collected — CI reported green while doctesting
nothing.

Adding the package dir takes collection from 14 items to 72 (58 package
doctests, previously zero). All pass.

Also pin `exclude_paths` to `embody/scrap`: wads' default exclude of "scrap"
only matches a top-level directory, and `scrap/` is throwaway code that ruff
already excludes and that should not gate a release.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
…urls)

- `license`: deprecated `[project.license] text = ...` table -> PEP 639 SPDX
  string `license = "Apache-2.0"` (matches the LICENSE file), plus explicit
  `license-files = ["LICENSE"]`. Built metadata is now Metadata-Version 2.4
  with `License-Expression: Apache-2.0`.
- `classifiers`: added an accurate set. Development Status is 3 - Alpha (0.1.x,
  API still settling) - deliberately not promoted. No `License :: OSI Approved`
  classifier: under PEP 639 it contradicts the SPDX expression and newer build
  backends reject the combination.
- `keywords`: filled in (was empty) from what the package actually does.
- `[project.urls]`: added Documentation (the live GitHub Pages site), Repository
  and Issues alongside the existing Homepage.
- README: the licence section said "MIT License" while LICENSE, setup.cfg and
  pyproject all say Apache-2.0. Corrected to Apache-2.0.

Verified: `uv build` succeeds, `twine check` PASSED on both sdist and wheel,
all classifiers validate against the canonical trove-classifiers list.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
wads templates ship one; this repo predates that. Copied verbatim from a
healthy repo in the fleet so editor behaviour (charset, EOL, final newline,
trailing whitespace, indent) is consistent across contributors and matches the
rest of the ecosystem. No existing file is reformatted by this commit.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
The POSIX assertion used a plain string literal and the Windows one a raw
literal, so the same source text meant two backslashes in one and four in the
other. The pattern only ever has two, so the Windows leg asserted against a
regex that could never be built. Only visible now that testpaths collects
these doctests.

Claude-Session: https://claude.ai/code/session_01Uz2YYxAfa1DX8UcCDmeKC5
@thorwhalen
thorwhalen merged commit 5041af6 into master Aug 7, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the claude/rollout-polish branch August 7, 2026 08:28
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