Conversation
|
@codex review |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b48b4db24e
ℹ️ 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".
|
|
||
| preset_id = config.get("architecture_preset") | ||
| strategist = PresetLayoutStrategist(preset_id) | ||
| template = strategist.base_template |
There was a problem hiding this comment.
Derive Docker entrypoint from preset main module
Now that interactive init can select domain-starter as the base template, this line allows projects whose app entrypoint is src/app/main.py; however Docker generation still hardcodes src.main:app in DynamicConfigGenerator._generate_dockerfile. When users choose Docker deployment with domain-starter, the generated container fails to start because src.main does not exist. Please thread the preset-aware module path into Docker file generation (or derive it from the strategist) so the CMD matches the selected layout.
Useful? React with 👍 / 👎.
Requesting Merging
Description
Part of #41
Closes #45
This PR connects the architecture preset selected in
fastkit init --interactiveto the actual project generation flow.Instead of always deploying the same base scaffold, interactive init now chooses a preset-specific template, writes generated config files into preset-appropriate paths, preserves richer template
main.pyfiles when needed, and surfaces compatibility warnings for feature combinations that still require manual wiring.Type of Change
Test Environment
uvuv run pytest tests/test_backends/test_preset_layout.py tests/test_cli_operations/test_cli_interactive_integration.py -q32 passeduv run mkdocs buildDocumentation built in 14.87 secondsMajor Changes
Added preset-aware generation strategy
PresetLayoutStrategistandPresetProfilemain.pyregeneration vs preservationConnected interactive init to architecture presets
fastkit init --interactivenow uses the selected preset to choose the base template instead of always deployingfastapi-emptyminimalto preserve backward compatibilityImplemented preset-specific layout behavior
minimal->fastapi-emptysingle-module->fastapi-single-moduleclassic-layered->fastapi-defaultdomain-starter->fastapi-domain-starterAdded selective
main.pyoverlay behaviorminimalandsingle-moduleregeneratemain.pyfrom selected featuresclassic-layeredanddomain-starterpreserve the template-shippedmain.pyAdded preset-specific config file targets
minimal/single-module:src/config/...classic-layered:src/core/...domain-starter:src/app/core/...Added compatibility warnings for preserve-main presets
main.pywiring that is intentionally skipped for preserved-main presetsRate-LimitingPrometheusCORSis documented separately as already wired in shipped templates and activated via.envconfigurationAdded reference documentation for the supported matrix
docs/en/reference/preset-feature-matrix.mdAdded regression coverage
main.pyScreenshots (optional)
N/A
Etc
architecture_presetis intentionallyminimalto preserve pre-[FEATURE] Support architecture presets in dynamic project generation #45 interactive init behavior.