Repository navigation
gh-5 [feat]: 2025-12-22 | Bootstrap configuration model - #7
Merged
Merged
Conversation
- Add pydantic-settings for environment variable configuration loading Date: 2025-12-10 Refs: #5 Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
- Add InternalBaseSettings base class for settings models - Add BootstrapConfigurationModel with host info auto-detection - Add ConfigCenterBaseModel with registry pattern for auto-discovery - Add NacosConnConfigModel for Nacos config center connection Date: 2025-12-19 Refs: #5 Signed-off-by: Frost Leo <frostleo.dev@gmail.com>
- Add platformdirs for cross-platform configuration directory support Date: 2025-12-19 Refs: #5 Signed-off-by: Frost Leo <frostleo.dev@gmail.com>
- InternalBaseSettings: Add env_prefix, env_nested_delimiter; disable cli_parse_args and secrets_dir by default for cross-platform support - ConfigCenterBaseModel: Use model_config inheritance; fix get_by_type return type; add duplicate type_name check - NacosConnConfigModel: Use model_config inheritance; remove cli_prog_name; use SecretStr for sensitive fields - BootstrapConfigurationModel: Use model_config inheritance; remove redundant NacosConnConfigModel import - Replace Optional[X] with X | None syntax; use typing_extensions for Literal Date: 2025-12-22 Refs: #5 Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
- Add InternalBaseSettings tests: default config, env loading, nested delimiter, subclass override - Add ConfigCenterBaseModel tests: registry pattern, get_by_type, duplicate detection, inheritance - Add NacosConnConfigModel tests: env loading, SecretStr fields, default values - Add BootstrapConfigurationModel tests: auto-detection, required fields, config source validation, auto-load - Fix model_config inheritance syntax to avoid duplicate keyword arguments - Use _cli_parse_args=False in tests to prevent CLI interference with pytest All 125 tests passing, mypy type checking clean. Date: 2025-12-22 Refs: #5 Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add bootstrap configuration model for Leviftas system initialization, including:
InternalBaseSettings- Base settings class with env/CLI supportConfigCenterBaseModel- Registry pattern for config center implementationsNacosConnConfigModel- Nacos connection config with SecretStr protectionBootstrapConfigurationModel- Main bootstrap config with auto-detectionFeatures:
Related Links