Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
982d345
[FEAT, TEMPLATE, DOCS] add fastkit doctor, unify generated API conven…
bnbong Dec 1, 2026
d33cf31
[FEAT, TEMPLATE, DOCS] add fastapi-hello, multi-database sqlmodel, re…
bnbong Dec 2, 2026
ec0d71b
[FIX] give addroute routes module-scoped names, roll back partial files
bnbong Dec 2, 2026
4cd109a
Merge pull request #94 from bnbong/feat/v2.0.0
bnbong Dec 2, 2026
dd787ff
[FEAT, TEMPLATE, DOCS] add option catalog and generation API, split d…
bnbong Dec 2, 2026
e1fc395
Merge pull request #95 from bnbong/feat/v2.0.0
bnbong Dec 2, 2026
483ea4e
[FEAT, TEMPLATE, DOCS] unify fastkit init around levels, remove fasta…
bnbong Dec 2, 2026
31eefa0
[FIX] check config combinations on the level's selection, ask the dat…
bnbong Dec 2, 2026
09ebcc0
Merge pull request #96 from bnbong/feat/v2.0.0
bnbong Dec 2, 2026
94a81ca
[FEAT, TEMPLATE, DOCS] add next steps, README feature sections, conce…
bnbong Dec 3, 2026
275d113
Merge pull request #97 from bnbong/feat/v2.0.0
bnbong Dec 3, 2026
7073b88
[FEAT, DOCS] add web generator page, browser generation API and its C…
bnbong Dec 3, 2026
a5e82e2
[FIX] keep commas inside package requirements, accept ~=, fix zip nam…
bnbong Dec 3, 2026
759da68
Merge pull request #98 from bnbong/feat/v2.0.0
bnbong Dec 3, 2026
e802ad2
[DOCS, FEAT, FIX] rebuild the English docs, fix problems found while …
bnbong Dec 4, 2026
44942b4
Merge pull request #99 from bnbong/feat/v2.0.0
bnbong Dec 4, 2026
cb9cdbb
[DOCS, FIX] prepare the docs translation: locale parity checks, trans…
bnbong Dec 4, 2026
6ca7630
Merge pull request #101 from bnbong/docs/i18n-prep
bnbong Dec 4, 2026
c128e23
[DOCS, FIX] translate the 2.0.0 documentation into Korean
bnbong Dec 4, 2026
6ff6768
Merge pull request #102 from bnbong/docs/i18n-ko
bnbong Dec 4, 2026
58b421f
[DOCS, FIX] translate the 2.0.0 documentation into Japanese
bnbong Dec 4, 2026
f689e5b
Merge pull request #103 from bnbong/docs/i18n-ja
bnbong Dec 4, 2026
f72810d
[DOCS, FIX] translate the 2.0.0 documentation into Chinese
bnbong Dec 4, 2026
078671b
Merge pull request #104 from bnbong/docs/i18n-zh
bnbong Dec 4, 2026
27945c1
[DOCS, FIX] translate the 2.0.0 documentation into Spanish
bnbong Dec 4, 2026
d22c889
Merge pull request #105 from bnbong/docs/i18n-es
bnbong Dec 4, 2026
9b82b28
[DOCS, FIX] translate the 2.0.0 documentation into French
bnbong Dec 4, 2026
1b967bb
Merge pull request #106 from bnbong/docs/i18n-fr
bnbong Dec 4, 2026
8db5bfc
[DOCS, FIX] translate the 2.0.0 documentation into German
bnbong Dec 4, 2026
e693534
Merge pull request #107 from bnbong/docs/i18n-de
bnbong Dec 4, 2026
cc294f6
[DOCS, FIX] finish the docs translation: remove unused assets, rechec…
bnbong Dec 4, 2026
b19cc83
Merge pull request #108 from bnbong/docs/i18n-cleanup
bnbong Dec 4, 2026
314a614
[DOCS, FIX] rework README and docs home for 2.0.0, trim the changelog…
bnbong Dec 4, 2026
4f25c6d
Merge pull request #109 from bnbong/feat/v2.0.0
bnbong Dec 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 25 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,35 @@ jobs:
- name: Install docs dependencies
run: |
pip install -r requirements-docs.txt
# Web generator page: assets from this commit's wheel, checked against
# the CLI before anything is deployed.
- uses: actions/setup-node@v4
with:
node-version: "22"
- uses: actions/cache@v4
with:
path: .cache/web-generator
key: web-generator-${{ hashFiles('scripts/web_generator/pyodide.toml') }}
- name: Build and install the fastkit wheel
run: |
python -m pip wheel --no-deps -w dist .
python -m pip install dist/fastapi_fastkit-*.whl
- name: Build the web generator assets
run: >-
python scripts/web_generator/build_assets.py
--wheel dist/fastapi_fastkit-*.whl
--out docs/en/assets/fastkit-generator
--commit "$GITHUB_SHA"
- name: Compare web output with the CLI
run: >-
python scripts/web_generator/compare_with_cli.py
--assets docs/en/assets/fastkit-generator
--cases tests/fixtures/web_generator/cases.json
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: mkdocs gh-deploy --force
- run: mkdocs gh-deploy --strict --force
11 changes: 9 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: "Pull Request Labeler"
on:
- pull_request_target
pull_request:
types: [opened, synchronize, reopened]

permissions: {}

jobs:
labeler:
# pull_request_target is blocked on public repositories by GitHub's default
# policy; with pull_request a fork's token cannot write labels, so forks
# are skipped and labelled by hand.
if: github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v6
10 changes: 9 additions & 1 deletion .github/workflows/template-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,20 @@ jobs:
fi

req_file="$template_dir/requirements.txt-tpl"
dev_req_file="$template_dir/requirements-dev.txt-tpl"
if [ -f "$req_file" ]; then
echo "🔍 Scanning $template_name..."

# Create temp requirements file
# One temp requirements file with the runtime pins and, when the
# template splits them out, the dev pins. The dev file's
# "-r requirements.txt" line is dropped: the runtime pins are
# already in the file and the include would not resolve here.
temp_req=$(mktemp)
cp "$req_file" "$temp_req"
if [ -f "$dev_req_file" ]; then
printf '\n' >> "$temp_req"
grep -v -E '^[[:space:]]*-r[[:space:]]' "$dev_req_file" >> "$temp_req" || true
fi

audit_file="$TEMP_DIR/${template_name}.json"
err_file="$TEMP_DIR/${template_name}.err"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
# PDM is already installed via setup-pdm action

- name: Install dependencies
run: pdm install -G dev
# test-runtime: FastAPI and friends, so the tests that start generated
# applications run instead of skipping.
run: pdm install -G dev -G test-runtime

- name: Run tests with coverage
if: runner.os == 'Linux'
Expand Down Expand Up @@ -102,7 +104,9 @@ jobs:
pip install poetry

- name: Install dependencies
run: pdm install -G dev
# test-runtime: FastAPI and friends, so the tests that start generated
# applications run instead of skipping.
run: pdm install -G dev -G test-runtime

- name: Fail on implicit text encodings in fastapi_fastkit
env:
Expand Down
37 changes: 24 additions & 13 deletions .github/workflows/translate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ on:
required: false
type: string
api_provider:
description: 'AI API provider for translation'
description: 'AI API provider for translation (OpenAI-compatible)'
required: true
type: choice
options:
- openai
- anthropic
default: openai
specific_files:
description: 'Specific files to translate (space-separated, relative to docs/en/). Example: index.md user-guide/installation.md'
description: 'Specific files to translate (space-separated, relative to docs/en/). Example: index.md start/installation.md'
required: false
type: string
create_pr:
Expand Down Expand Up @@ -51,35 +50,47 @@ jobs:
with:
python-version: '3.12'

# The package itself renders the generated blocks after translating.
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install openai anthropic
pip install . openai

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# The next step opens the pull request, so the script never does (--no-pr).
- name: Run translation
env:
TRANSLATION_API_KEY: ${{ secrets.TRANSLATION_API_KEY }}
API_PROVIDER: ${{ inputs.api_provider }}
TARGET_LANGUAGE: ${{ inputs.target_language }}
SPECIFIC_FILES: ${{ inputs.specific_files }}
run: |
ARGS="--api-provider ${{ inputs.api_provider }}"
ARGS=(--api-provider "$API_PROVIDER" --no-pr)

if [ -n "${{ inputs.target_language }}" ]; then
ARGS="$ARGS --target-lang ${{ inputs.target_language }}"
if [ -n "$TARGET_LANGUAGE" ]; then
ARGS+=(--target-lang "$TARGET_LANGUAGE")
fi

if [ -n "${{ inputs.specific_files }}" ]; then
ARGS="$ARGS --files ${{ inputs.specific_files }}"
if [ -n "$SPECIFIC_FILES" ]; then
read -r -a FILES <<< "$SPECIFIC_FILES"
ARGS+=(--files "${FILES[@]}")
fi

if [ "${{ inputs.create_pr }}" = "false" ]; then
ARGS="$ARGS --no-pr"
fi
python scripts/translate.py "${ARGS[@]}"

python scripts/translate.py $ARGS
- name: Render generated blocks
env:
TARGET_LANGUAGE: ${{ inputs.target_language }}
run: |
if [ -n "$TARGET_LANGUAGE" ]; then
python scripts/docs_blocks.py --lang "$TARGET_LANGUAGE"
else
python scripts/docs_blocks.py
fi

- name: Create Pull Request
if: inputs.create_pr == true
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/web-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Web generator

# The docs site's web generator runs fastkit in the browser with Pyodide.
# This job runs the page's generator core under Node with the same assets and
# compares every case with the `fastkit init` CLI from the same wheel, then
# builds the docs site and checks the page in every locale.

on:
pull_request:
paths:
- "src/**"
- "docs/**"
- "README.md"
- "CHANGELOG.md"
- "scripts/mkdocs_hooks/**"
- "scripts/docs_blocks.py"
- "scripts/web_generator/**"
- "tests/fixtures/web_generator/**"
- "pyproject.toml"
- "mkdocs.yml"
- "requirements-docs.txt"
- ".github/workflows/web-generator.yml"
push:
branches:
- main

permissions:
contents: read

jobs:
web-vs-cli:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Cache Pyodide downloads
uses: actions/cache@v4
with:
path: .cache/web-generator
key: web-generator-${{ hashFiles('scripts/web_generator/pyodide.toml') }}

- name: Build and install the fastkit wheel
run: |
python -m pip install --upgrade pip
python -m pip wheel --no-deps -w dist .
python -m pip install dist/fastapi_fastkit-*.whl

- name: Build the web generator assets
run: >-
python scripts/web_generator/build_assets.py
--wheel dist/fastapi_fastkit-*.whl
--out docs/en/assets/fastkit-generator
--commit "$GITHUB_SHA"

- name: Compare web output with the CLI
run: >-
python scripts/web_generator/compare_with_cli.py
--assets docs/en/assets/fastkit-generator
--cases tests/fixtures/web_generator/cases.json

- name: Build the docs site
run: |
python -m pip install -r requirements-docs.txt
mkdocs build --strict -d site

- name: Check the web generator page
run: python scripts/web_generator/check_site.py site
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ temp/
*_api_key.txt
translation_cache/

# Web generator assets (built by scripts/web_generator/build_assets.py) and downloads
docs/en/assets/fastkit-generator/
.cache/web-generator/

.pdm-python
### VisualStudioCode template
.vscode/*
Expand Down
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ repos:
entry: black --config pyproject.toml --check .
language: python
types: [python]
additional_dependencies: ['black>=24.10.0']
additional_dependencies: ['black==26.10.1']
pass_filenames: false

- id: isort-check
name: isort check
entry: isort --sp pyproject.toml --check-only --diff .
language: python
types: [python]
additional_dependencies: ['isort>=5.13.2']
additional_dependencies: ['isort==9.0.1']
pass_filenames: false

- id: isort-fix
name: isort fix
entry: isort --sp pyproject.toml .
language: python
types: [python]
additional_dependencies: ['isort>=5.13.2']
additional_dependencies: ['isort==9.0.1']
pass_filenames: false

- id: black-fix
name: black fix
entry: black --config pyproject.toml .
language: python
types: [python]
additional_dependencies: ['black>=24.10.0']
additional_dependencies: ['black==26.10.1']
pass_filenames: false

- id: mypy
Expand All @@ -50,12 +50,12 @@ repos:
language: python
types: [python]
additional_dependencies:
- mypy>=1.12.0
- rich>=13.9.2
- click>=8.1.7
- pyyaml>=6.0.0
- jinja2>=3.1
- types-PyYAML>=6.0.12
- mypy==2.3.1
- rich==15.0.0
- click==8.3.2
- pyyaml==6.0.3
- jinja2==3.1.6
- types-PyYAML==6.0.12.20260408
pass_filenames: false

ci:
Expand Down
Loading
Loading