Repository navigation
feat: v0.2.0 - Enterprise Features - #1
Conversation
## New Features - Builder pattern API for fluent app configuration - Prometheus-compatible metrics endpoint - Security headers middleware (HSTS, CSP, X-Frame-Options) - Request ID and timing middleware - Centralized configuration management with Pydantic ## Improvements - Updated dependencies to latest versions - Status upgraded from Alpha to Beta - Expanded test coverage with new test files - Added builder example ## Documentation - Updated README.md and README.ko.md - Added CHANGELOG entry for v0.2.0
There was a problem hiding this comment.
Pull request overview
This PR introduces v0.2.0 "Enterprise Features" which adds significant production-ready capabilities to fastapi_bootstrap. The release includes a new fluent Builder Pattern API, Prometheus metrics integration, security headers middleware, centralized configuration management, and request tracking features.
Key Changes:
- Builder Pattern API with chainable method calls for intuitive application configuration
- Prometheus-compatible metrics collection and
/metricsendpoint - Security middleware including HSTS, CSP, X-Frame-Options, request ID, and timing headers
- Pydantic-based centralized configuration system with environment variable support
- Comprehensive test coverage with 6 new test files
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updated package name from underscore to hyphen convention; version bumped to 0.2.0 with new "all" and "metrics" extras |
| pyproject.toml | Version updated to 0.2.0; status upgraded to Beta; dependencies updated; new keywords and extras added |
| src/fastapi_bootstrap/init.py | Expanded exports to include builder, config, metrics, and middleware modules |
| src/fastapi_bootstrap/builder.py | New fluent builder API with chainable configuration methods |
| src/fastapi_bootstrap/config.py | New Pydantic-based configuration system with environment variable parsing |
| src/fastapi_bootstrap/metrics.py | New Prometheus metrics implementation with Counter, Gauge, Histogram |
| src/fastapi_bootstrap/middleware/init.py | New security and utility middleware classes |
| tests/test_*.py | Six new comprehensive test files for new features |
| examples/builder/ | New example demonstrating builder pattern usage |
| README.md, README.ko.md | Updated documentation with new features and examples |
| CHANGELOG.md | Detailed changelog for v0.2.0 release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- MetricsSettings.enabled default: True -> False - METRICS_ENABLED env default: true -> false - Metrics only enabled when .with_metrics() is called explicitly
- Fix builder.py: router dependencies now properly passed to include_router - Fix metrics.py: global registry now supports multiple app_names (dict-based) - Fix middleware: HSTS header only added for HTTPS connections - Fix middleware: X-XSS-Protection header now optional (deprecated by default) - Fix README.ko.md: correct parameter name x_frame_options, remove non-existent from_settings method - Fix test_metrics.py: correct assertion logic (or -> and) - Remove unused imports across multiple files (builder, metrics, tests) - Update middleware tests for HTTPS-only HSTS behavior
📝 Copilot Review Feedback - All Addressed ✅
Commit: |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix histogram bucket counting bug: only increment smallest matching bucket - Add error handling for integer environment variable parsing in config.py - Add CORS allow_credentials=True with origins=['*'] warning - Fix README.md package name: fastapi_bootstrap -> fastapi-bootstrap - Fix unused response variable in test_builder.py
추가 리뷰 피드백 반영 완료 ✅커밋 수정 사항
모든 161개 테스트 통과, 커버리지 85% 유지됩니다. 🎉 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 17 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix error double-counting bug in metrics.py (if-elif instead of if-or) - Document chunked transfer encoding limitation in MaxRequestSizeMiddleware - Document mask_sensitive_data implicit dependency on get_settings() - Document router property preservation limitation in builder.py - Add test cache isolation in test_config.py - Add package naming clarification in pyproject.toml
2차 리뷰 피드백 반영 완료 ✅커밋 수정 사항
모든 161개 테스트 통과, 85% 커버리지 유지 🎉 |
- CORS allow_credentials + wildcard now raises ValueError (not just warning) - Improved validate_level error message with original and normalized values - Added model_validator for json_output/format consistency warning - Enhanced X-XSS-Protection deprecation documentation - Optimized _get_path_template to use scope['route'] cache first - Added thread-safe lock to _metrics_registries access - Fixed test_with_health_check to properly verify endpoint
3차 리뷰 피드백 반영 완료 ✅커밋 주요 수정 사항
참고 (향후 개선 고려)
모든 161개 테스트 통과, 85% 커버리지 🎉 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix Histogram _counts sharing bug (use dict factory + __post_init__) - Store and pass header_name params in with_request_id/with_request_timing - Update test_bucket_counts assertions to be exact (not >=) - Change pyproject.toml name to hyphen convention (fastapi-bootstrap) - Add chunked transfer encoding note to MaxRequestSizeMiddleware docs
4차 리뷰 피드백 반영 완료 (commit f4b3c01)수정 사항
설계 의도 설명 (변경 없음)
✅ 161개 테스트 통과 | 📊 85% 커버리지 |
What is New in v0.2.0
New Features
Improvements
Documentation