Skip to content

Add CI, Pages and recipe-intake workflows - #4

Merged
abhishek085 merged 2 commits into
mainfrom
ci-workflows
Oct 10, 2026
Merged

abhishek085 merged 2 commits into
mainfrom
ci-workflows

Conversation

@abhishek085

@abhishek085 abhishek085 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds three GitHub Actions workflows:

  • ci.yml: runs on pushes to main and on every PR. It runs ruff check, then pytest (simulated backend, so no Ollama is needed) on Python 3.10–3.13 on Ubuntu, plus Python 3.12 on macOS and Windows. It finishes with modexai registry --check, which fails if the bundled index is out of date.
  • pages.yml: builds the exchange site with scripts/build_site.py and deploys it to GitHub Pages. It runs on pushes to main that touch the web, data or suites folders, the site script or llms.txt, and can also be started by hand.
  • recipe-intake.yml: runs on issues that carry the recipe label or contain the modexai-recipe marker. It validates the recipe with scripts/intake.py (the issue body is only parsed as JSON and never executed), rebuilds the index, opens a recipe/<id> PR and comments the result back on the issue.

Windows fix

The first run of the new Windows job found a real bug. The bundled indexes are written with ensure_ascii=False, so characters like · in recipe titles are stored as raw UTF-8. On Windows, read_text() without an encoding decodes with cp1252, which garbled those characters. Recipe hashes then stopped matching their IDs, and registry --check reported the index as stale. This PR adds encoding="utf-8" to every text-file read and write in src/, scripts/ and tests/. Nothing changes on macOS or Linux, where UTF-8 was already the default.

subprocess.run(..., text=True) calls were left alone on purpose. They decode system-tool output, where the locale default is the right choice.

Test plan

  • uv run ruff check .: all checks passed
  • uv run pytest -q: 52 passed
  • uv run modexai registry --check: 25 models, 96 recipes, index is current
  • CI passes on all six jobs, including Windows
  • Created the recipe label
  • Once merged, enable GitHub Pages with "GitHub Actions" as the source so pages.yml can deploy

🤖 Generated with Claude Code

abhishek085 and others added 2 commits October 9, 2026 23:38
- ci.yml: ruff + pytest (3.10–3.13, macOS, Windows) + registry index check
- pages.yml: build and deploy the exchange site to GitHub Pages
- recipe-intake.yml: validate recipe issues and open a PR into the index

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundled indexes are written with ensure_ascii=False, so titles like
"Apple M4 Pro · 24 GB" are stored as raw UTF-8. On Windows, read_text()
without an encoding decodes with cp1252, which garbled those characters:
recipe content hashes stopped matching their ids and `modexai registry
--check` reported the index as stale. Pass encoding="utf-8" to every
read_text/write_text/open of a text file in src/, scripts/ and tests/.

No change on macOS/Linux, where UTF-8 was already the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abhishek085
abhishek085 merged commit d3acc70 into main Oct 10, 2026
6 checks passed
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