Skip to content

Add API-doc site, format gate, recipe.yaml, bench - #3

Merged
conorbronsdon merged 2 commits into
mainfrom
ehsan-quick-wins
Jul 8, 2026
Merged

Add API-doc site, format gate, recipe.yaml, bench#3
conorbronsdon merged 2 commits into
mainfrom
ehsan-quick-wins

Conversation

@conorbronsdon

Copy link
Copy Markdown
Owner

Rolls the suite-wide quick wins proven on mojo-xml and mojo-feed onto this repo:

  • Canonical format commit — one-time mojo format pass over src/, test/, examples/ (only examples/list_archive.mojo changed).
  • Format gate in CI — test workflow now fails if sources aren't mojo format-clean; fix locally with pixi run fmt.
  • API-doc sitedocs/render_api.py (copied from mojo-xml) renders mojo doc JSON to a self-contained HTML page; docs.yaml workflow builds and deploys it to GitHub Pages; pixi run docs builds it locally.
  • recipe.yaml — rattler-build recipe shipping the pure-Mojo source tree with a runtime mojo pin (same pattern as mojo-xml; not wired to CI).
  • bench/bench/bench_read.mojo times the core read path (open_tar: header parse + member iteration) over the repo's own test/data/*.tar fixtures. Fixtures are tiny (10 KiB), so each is parsed 5000x per measurement; the bench only reads trusted in-repo fixtures and adds no parsing logic. Local pixi run bench only, not in CI.
  • New pixi tasks: fmt, docs, bench; .gitignore covers generated docs and the bench binary.
  • Docstring lint: package summary in src/tar/__init__.mojo now starts capitalized (mojo doc emits no summary warning).

Local verification: pixi run test 38/38 pass; pixi run docs writes docs/api.html; bench compiles and runs; pixi run fmt && git diff --exit-code clean.

🤖 Generated with Claude Code

@conorbronsdon
conorbronsdon merged commit b4c2be3 into main Jul 8, 2026
1 check passed
@conorbronsdon
conorbronsdon deleted the ehsan-quick-wins branch July 8, 2026 03:48
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