add logo to readme and docs, update actions to node 24 - #12
Conversation
image lives under docs/assets so mkdocs copies it into the built site. the readme references it by absolute raw.githubusercontent url because pypi does not resolve relative paths, so a repo-relative src would render broken there. also set it as the material header logo and favicon. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
actions/checkout v4 and setup-uv v5 target node 20, which the runners now force onto node 24 with a deprecation warning. bump every action to its latest major. setup-uv stopped publishing floating major tags after v7, so v10 is pinned to the exact v10.0.1 release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
merged.set() was called without tomlfy, so every cli override arrived as a string: --set model__lr=0.01 gave '0.01' rather than 0.01, silently changing the type of a key that came from the config file as a float. values that are not valid toml still fall back to str. the existing tests coerced with float(merged.model.lr), which hid this; they now assert on the value directly and three of them fail without the fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
the examples registered a single command but documented invocations as python cli.py <command>. typer collapses a single-command app, so the name is rejected with 'got unexpected extra argument(s)'. each example now registers two commands, and a note explains the collapse. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Folded in the two bugs found while verifying the 0.1.0 release.
|
| Override | Before | After |
|---|---|---|
model__lr=0.01 |
'0.01' str |
0.01 float |
model__epochs=50 |
'50' str |
50 int |
debug=true |
'true' str |
True bool |
db__host=remote |
'remote' str |
'remote' str |
path=/tmp/data.csv |
str | '/tmp/data.csv' str |
note=a=b |
str | 'a=b' str |
The existing tests asserted float(merged.model.lr) == pytest.approx(...), and that coercion is exactly what hid the bug. They now assert on the value directly, and two new tests cover type preservation and the string fallback. Confirmed these are real regression tests: reverting the one-line fix fails 3 of them.
Quick-start examples could not run as written
Both the README and docs/index.md showed python cli.py analyze data.csv, but the example registered only one command. Typer collapses a single-command app, so the command name is rejected:
Error: Got unexpected extra argument(s) (data.csv)
docs/getting-started.md had the same problem with python cli.py train. Each example now registers a second command, which makes every documented invocation valid, plus a note explaining the collapse for anyone who does write exactly one command.
I extracted both examples verbatim into a scratch project and ran the documented commands to confirm they work, rather than only reasoning about it.
Verification
- 17 tests pass;
ruff check,ruff format --check, andmypy --strictclean mkdocs build --strictclean- Documented examples executed end to end, producing correctly typed config snapshots
Changelog entries added under [Unreleased].
Logo
iolaus.webpmoved from the repo root todocs/assets/so MkDocs copies it into the built site, then added:docs/index.md), as requestedmkdocs.ymlThe README references the image by absolute
raw.githubusercontent.comURL rather than a repo-relative path. PyPI does not rewrite relative links, sodocs/assets/iolaus.webpwould render as a broken image on the project page. Verified by rendering the README throughreadme_renderer(the same librarytwine checkuses): the<img>survives sanitization withsrc,alt, andwidthintact, andalign="center"is preserved.Alt text describes the character rather than saying "logo", since the illustration is Iolaus, the companion who helped Heracles defeat the Hydra.
Action runtimes
The v0.1.0 publish run warned that
actions/checkout@v4andastral-sh/setup-uv@v5target Node 20. Every action is now on its latest major, across all three workflows:actions/checkoutastral-sh/setup-uvcodecov/codecov-actionactions/upload-pages-artifactactions/deploy-pagessetup-uvis pinned to an exact patch version because the project stopped publishing floating major tags afterv7, so@v10does not resolve. The two composite actions delegate to SHA-pinnedupload-artifact@v7.0.0andgithub-script@v8.0.0, both Node 24 era.pypa/gh-action-pypi-publishis a Docker action and is unaffected.These are large major-version jumps, so I checked that each input still exists in the new majors:
python-versiononsetup-uv,tokenoncodecov-action, andpathonupload-pages-artifact.Verification
mkdocs build --strictclean; asset copied tosite/assets/, logo renders above the<h1>Note that the publish workflow change is only exercised on the next version tag.
🤖 Generated with Claude Code