Skip to content

[FEAT, DOCS] v2.0.0 stage 5: web generator page and CI check - #98

Merged
bnbong merged 2 commits into
devfrom
feat/v2.0.0
Dec 3, 2026
Merged

bnbong merged 2 commits into
devfrom
feat/v2.0.0

Conversation

@bnbong

@bnbong bnbong commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Requesting Merging

Description

Stage 5 of 2.0.0. Adds a web generator page to the documentation site: pick a level and options, and the page builds the project in the browser and downloads it as a zip. The zip has the same files as fastkit init ... --no-venv, and the page shows the matching command line and the next steps. Nothing entered on the page is uploaded.

Type of Change

  • BUG FIX
  • ADDING NEW TEMPLATE
  • FEATURE ADDED/UPDATED
  • HOTFIX
  • DELETING UNNECESSARY FEATURES
  • DOCUMENTATION & DEVOPS
  • Etc..

Test Environment

  • macOS, Python 3.12.4, Node 22, Pyodide 314.0.8
  • Full suite: 6035 passed, 33 skipped, coverage 98.30%; diff coverage against dev 99%
  • C locale, encoding-warning and Windows-simulation runs pass
  • Pyodide under Node against the CLI: 26 of 26 option combinations produce equal files
  • mkdocs build --strict and the built-site check pass for all seven languages
  • black, isort, mypy, pre-commit and actionlint pass
  • Chrome: en, ko and zh in light and dark; two generated zips equal to the CLI output

Major Changes

  • Web generator page at start/web-generator in en, ko, ja, zh, es, fr and de. It runs fastkit in a Web Worker with a self-hosted, hash-pinned Pyodide, validates the form as you type, and shows the command for macOS/Linux or PowerShell.
  • Browser generation API (generation/browser.py): form model, validation with problem codes, build, zip and command-line text. Importing fastapi_fastkit.generation no longer loads rich or click.
  • Asset build and checks (scripts/web_generator/): builds the page assets from a wheel, compares the Pyodide output with the CLI output, and checks the built site.
  • Catalog translations for the six non-English documentation languages. The CLI and the generated files stay English.
  • CI
    • New web-generator workflow runs the Pyodide-vs-CLI comparison; the docs deploy builds the assets and must pass the same comparison first.
    • New test-runtime dependency group; the test workflow installs it, so the tests that start generated applications run instead of being skipped.
    • The labeler runs on pull_request with actions/labeler@v6. Pull requests from forks are not labelled.

Screenshots (optional)

N/A

Etc

  • Known limits: PowerShell before 7.3 mangles values that contain "; there is no cmd.exe form of the command.
  • Not tested: Safari, Firefox, screen readers, real Windows.
  • First to confirm on this PR: the comparison on the Node 22 runner, the Windows jobs with the new group, and the first run of labeler v6.

@bnbong bnbong self-assigned this Dec 3, 2026
@bnbong bnbong added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 3, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 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
📝 Code Review ✅ Completed 2026-12-03T12:07:02.251473Z 7073b88 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7073b88ac9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/js/web-generator.mjs Outdated
form.author = this.fields.author.value;
form.author_email = this.fields.author_email.value;
form.description = this.fields.description.value;
form.extra_packages = this.fields.extra_packages.value.split(",").map((item) => item.trim()).filter(Boolean);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve commas within individual package requirements

When a user enters a requirement with multiple version constraints, such as httpx>=0.27,<1, or multiple extras, such as pydantic[email,timezone], splitting every comma turns it into separate invalid package entries. The Python form validator and CLI accept these requirements intact, but the page rejects the resulting fragments and blocks generation, leaving no way to express these dependencies. Use an unambiguous package separator, such as one requirement per line, or parse separators without breaking requirement syntax.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.67105% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fastapi_fastkit/utils/project_meta.py 96.82% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@bnbong
bnbong merged commit 759da68 into dev Dec 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant