Repo polish: PyPI metadata, doctest coverage, and a flaky doctest fix - #2
Merged
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollout polish pass.
testpathsso the package's doctests actually run in CI.TemplateWrapper's was non-deterministic — made it deterministic..editorconfig.https://claude.ai/code/session_01Uz2YYxAfa1DX8UcCDmeKC5