Skip to content

docs: first-module guidance agrees: smpy add wiring, landing next steps, DTO format checks (#898) - #906

Merged
antosubash merged 3 commits into
mainfrom
fix/issue-898-first-module-docs
Nov 10, 2026
Merged

antosubash merged 3 commits into
mainfrom
fix/issue-898-first-module-docs

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • Wiring: the guides (docs/index.md, quickstart, installation, Your first module) now wire a new module with smpy add ../modules/orders --path host. That's the command smpy create-module prints, and it writes a { workspace = true } source into host/pyproject.toml.
    • A flat app uses smpy add ./modules/orders.
    • The old uv add ./modules/orders edits the workspace root's pyproject.toml, not the host's.
    • The guides now also include the migration steps that follow.
  • Quickstart:
    • its list of what create-module generates now matches the scaffold; it used to describe an empty pages/ and one test file;
    • the admin step now says the /setup wizard creates the first administrator.
  • Landing page that smpy new generates:
    • drops create-admin;
    • lists the steps create-module, wire, migrate;
    • points "Read the docs" at the first-module guide on docs.py.simplemodule.dev instead of the GitHub repo.
  • DTO format checks: the first-module guide and the simple-module-conventions skill now note that SQLModel's Field(regex=...) is accepted but not enforced on a DTO (and pattern= raises TypeError). The guide shows a field_validator instead.

Closes #898

Verification

  • smpy add was run in fresh workspace and flat apps. SQLModel 0.0.48's behaviour and the documented validator example were checked in Python.
  • The new landing-page test fails on main and passes here. Biome passes on the template.
  • Local CI: make lint ✓, make ci-docs-build ✓, make test-py ✓ (8296), make test-js ✓ (906).
  • Reviewed by correctness and maintainability reviewers, whose fixes were docs only, and by Codex, which found nothing.
  • Verification report: https://claude.ai/artifact/Ahy85rdmV2AvwL8qTDzYno

Report links are Claude Artifacts and start private — the author can share them
from claude.ai/code/artifacts if reviewers need access.

Test plan

  • The rendered guides read consistently: the quickstart, then Your first module
  • CI is green

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: a218851
Status: ✅  Deploy successful!
Preview URL: https://39e5c205.simple-module-python.pages.dev
Branch Preview URL: https://fix-issue-898-first-module-d.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-10T23:46:38.755790Z a218851 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@antosubash
antosubash merged commit 40d06fe into main Nov 10, 2026
16 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.

docs/scaffold: first-module guidance disagrees (uv add vs smpy add, landing-page next steps, DTO regex)

1 participant