Skip to content

Commit 73e51c9

Browse files
authored
Merge pull request #29 from bnbong/dev
[RELEASE] version 1.2.0
2 parents e1b5dd0 + 59d307b commit 73e51c9

26 files changed

Lines changed: 5766 additions & 77 deletions

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version:
15-
- "3.13" # max
16-
- "3.12"
17-
- "3.11"
18-
- "3.10"
19-
- "3.9"
20-
- "3.8" # min
15+
- "3.14" # max
16+
- "3.13"
17+
- "3.12" # min requirements
18+
- "3.11" # supported, but full functionality not guaranteed
19+
- "3.10" # supported, but full functionality not guaranteed
20+
- "3.9" # supported, but full functionality not guaranteed
2121
fail-fast: false
2222
steps:
2323
- name: Checkout code

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Changelog
22

3+
## v1.2.0 (2025-11-27)
4+
5+
### Features
6+
7+
- **(Breaking Change) Add `fastkit init --interactive` feature**: Revolutionary feature-by-feature project builder
8+
- `fastkit init --interactive` now provides guided project setup with intelligent feature selection
9+
- Always uses Empty project (fastapi-empty template) as base template to prevent conflicts with DynamicConfigGenerator
10+
- Interactive project configuration with validation and compatibility warnings
11+
- Real-time dependency collection based on selected features
12+
- Confirmation summary before project creation
13+
14+
- **Dynamic Code Generation**: Intelligent code generation based on feature selections
15+
- Integrated DynamicConfigGenerator for automatic code scaffolding
16+
- Generates `main.py` with selected features (auth, database, monitoring, etc.)
17+
- Creates database configuration files for PostgreSQL, MySQL, MongoDB, SQLite
18+
- Generates authentication setup for JWT, OAuth2, FastAPI-Users
19+
- Auto-generates test configuration (pytest with optional coverage)
20+
- Docker deployment files (Dockerfile, docker-compose.yml) generation
21+
22+
- **Enhanced Dependency Management**: Multi-format dependency file generation
23+
- Automatically generates both package-manager-specific files AND requirements.txt
24+
- Ensures pip compatibility regardless of selected package manager
25+
- Dependencies correctly reflect all selected stack features
26+
- Smart dependency deduplication and version management
27+
28+
### Improvements
29+
30+
- **Interactive CLI Experience**:
31+
- Step-by-step feature selection with descriptions. Each selection step proceeds in the following order below:
32+
- Database selection (PostgreSQL, MySQL, MongoDB, Redis, SQLite)
33+
- Authentication options (JWT, OAuth2, FastAPI-Users, Session-based)
34+
- Background tasks (Celery, Dramatiq)
35+
- Caching layer (Redis, fastapi-cache2)
36+
- Monitoring integration (Loguru, OpenTelemetry, Prometheus)
37+
- Testing framework (Basic, Coverage, Advanced)
38+
- Utilities (CORS, Rate-Limiting, Pagination, WebSocket)
39+
- Deployment configuration (Docker, docker-compose)
40+
- Package manager selection (pip, uv, pdm, poetry)
41+
- Custom package addition support
42+
43+
### Technical
44+
45+
- **Interactive Backend Architecture**:
46+
- `InteractiveConfigBuilder`: Orchestrates full interactive flow
47+
- `DynamicConfigGenerator`: Generates feature-specific code
48+
- `DependencyCollector`: Intelligently collects stack dependencies
49+
- Input validators with comprehensive error handling
50+
- Multi-select prompts for utilities and deployment options
51+
- Feature compatibility validation system
52+
53+
### Documentation
54+
55+
- Add AI translation support of user guides(docs/ folder sources that mkdocs renders)
56+
357
## v1.1.5 (2025-09-14)
458

559
### Improvements

requirements-docs.txt

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,38 @@
11
# This file is @generated by PDM.
22
# Please do not edit it manually.
33

4-
annotated-types==0.7.0
5-
anthropic==0.74.0
6-
anyio==4.11.0
74
babel==2.17.0
8-
backrefs==6.1
9-
certifi==2025.11.12
10-
charset-normalizer==3.4.4
11-
click==8.3.1
5+
backrefs==5.9
6+
certifi==2025.6.15
7+
charset-normalizer==3.4.2
8+
click==8.1.8
129
colorama==0.4.6
1310
cyclic==1.0.0
14-
distro==1.9.0
15-
docstring-parser==0.17.0
1611
ghp-import==2.1.0
17-
h11==0.16.0
18-
httpcore==1.0.9
19-
httpx==0.28.1
20-
idna==3.11
12+
idna==3.10
2113
jinja2==3.1.6
22-
jiter==0.12.0
23-
markdown==3.10
24-
markdown-it-py==4.0.0
25-
markupsafe==3.0.3
14+
markdown==3.8.2
15+
markdown-it-py==3.0.0
16+
markupsafe==3.0.2
2617
mdurl==0.1.2
2718
mdx-include==1.4.2
2819
mergedeep==1.3.4
2920
mkdocs==1.6.1
3021
mkdocs-get-deps==0.2.0
31-
mkdocs-material==9.7.0
22+
mkdocs-material==9.6.14
3223
mkdocs-material-extensions==1.3.1
33-
mkdocs-static-i18n==1.3.0
34-
openai==2.8.1
35-
packaging==25.0
24+
packaging==24.2
3625
paginate==0.5.7
3726
pathspec==0.12.1
38-
platformdirs==4.5.0
39-
pydantic==2.12.4
40-
pydantic-core==2.41.5
41-
pygments==2.19.2
42-
pymdown-extensions==10.17.1
27+
platformdirs==4.3.6
28+
pygments==2.19.1
29+
pymdown-extensions==10.16
4330
python-dateutil==2.9.0.post0
44-
pyyaml==6.0.3
31+
pyyaml==6.0.2
4532
pyyaml-env-tag==1.1
4633
rcslice==1.1.0
47-
requests==2.32.5
48-
rich==14.2.0
34+
requests==2.32.4
35+
rich==13.9.4
4936
six==1.17.0
50-
sniffio==1.3.1
51-
tqdm==4.67.1
52-
types-pyyaml==6.0.12.20250915
53-
typing-extensions==4.15.0
54-
typing-inspection==0.4.2
5537
urllib3==2.5.0
5638
watchdog==6.0.0

scripts/coverage-report.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ NC='\033[0m' # No Color
1212
# Script options
1313
OPEN_HTML=false
1414
SHOW_MISSING=true
15-
MIN_COVERAGE=70
15+
MIN_COVERAGE=80
1616
OUTPUT_FORMAT="term"
1717

1818
# Help function
@@ -134,8 +134,6 @@ else
134134
echo -e "${GREEN}ℹ️ Changes detected in fastapi_project_template - running all tests${NC}"
135135
fi
136136

137-
echo ""
138-
139137
# Run tests with coverage
140138
if pytest $PYTEST_ARGS; then
141139
echo ""

scripts/coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -x
66
echo "Running tests with coverage..."
77

88
# Run tests with coverage
9-
pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=html --cov-report=xml --cov-fail-under=70
9+
pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=html --cov-report=xml --cov-fail-under=80
1010

1111
coverage_exit_code=$?
1212

scripts/translate.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,12 @@ class TranslationConfig:
3838
target_langs: List[str] = field(
3939
default_factory=lambda: ["ko", "ja", "zh", "es", "fr", "de"]
4040
)
41-
_docs_dir: Optional[Path] = field(default=None, repr=False)
42-
api_provider: str = "openai"
41+
docs_dir: Path = Path(__file__).parent.parent / "docs" / source_lang
42+
api_provider: str = "openai" # openai, anthropic, etc.
4343
api_key: Optional[str] = None
4444
create_pr: bool = True
4545
branch_prefix: str = "translation"
4646

47-
@property
48-
def docs_dir(self) -> Path:
49-
"""Get docs directory path."""
50-
if self._docs_dir is None:
51-
return Path(__file__).parent.parent / "docs" / self.source_lang
52-
return self._docs_dir
53-
54-
@docs_dir.setter
55-
def docs_dir(self, value: Path) -> None:
56-
"""Set docs directory path."""
57-
self._docs_dir = value
58-
5947

6048
class TranslationAPI:
6149
"""Base class for translation API providers."""

src/fastapi_fastkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.1.5"
1+
__version__ = "1.2.0"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# --------------------------------------------------------------------------
2+
# Interactive module for FastAPI-fastkit
3+
#
4+
# Provides interactive prompts and configuration building for dynamic
5+
# project creation.
6+
#
7+
# @author bnbong bbbong9@gmail.com
8+
# --------------------------------------------------------------------------
9+
from .config_builder import InteractiveConfigBuilder
10+
from .prompts import (
11+
prompt_additional_features,
12+
prompt_authentication_selection,
13+
prompt_basic_info,
14+
prompt_caching_selection,
15+
prompt_custom_packages,
16+
prompt_database_selection,
17+
prompt_deployment_options,
18+
prompt_monitoring_selection,
19+
prompt_package_manager_selection,
20+
prompt_template_selection,
21+
prompt_testing_selection,
22+
prompt_utilities_selection,
23+
)
24+
from .selectors import confirm_selections, multi_select_prompt, render_selection_table
25+
from .validators import (
26+
sanitize_custom_packages,
27+
validate_feature_compatibility,
28+
validate_package_name,
29+
)
30+
31+
__all__ = [
32+
"InteractiveConfigBuilder",
33+
"prompt_basic_info",
34+
"prompt_template_selection",
35+
"prompt_database_selection",
36+
"prompt_authentication_selection",
37+
"prompt_additional_features",
38+
"prompt_testing_selection",
39+
"prompt_deployment_options",
40+
"prompt_custom_packages",
41+
"prompt_caching_selection",
42+
"prompt_monitoring_selection",
43+
"prompt_utilities_selection",
44+
"prompt_package_manager_selection",
45+
"render_selection_table",
46+
"multi_select_prompt",
47+
"confirm_selections",
48+
"validate_package_name",
49+
"validate_feature_compatibility",
50+
"sanitize_custom_packages",
51+
]

0 commit comments

Comments
 (0)