Fix/config bool conversion#28
Merged
Merged
Conversation
- bool(false) returns True in Python; use strtobool to correctly parse ini string values like false, 0, no
- Add config.py.jinja with DbConfig and CacheConfig models - Replace manual strtobool/as_=int with ConfigManagement.provide_config()
- Enable strict=True on all Configuration providers in docs and template - Use from_ini(path, required=True) to fail fast on missing config files - Add best practices section: strict mode, required files, type conversion pitfalls, and environment variable interpolation
…ests - Add zodiac_core/utils.py with strtobool (Python 3.13+ compatible) - Replace all distutils.util.strtobool imports in code and docs - Add dependency-injector integration tests for as_(strtobool), strict mode, required files, and multi-file config merge - Add API docs page for utilities module
- Add StrictConfig(BaseModel) enforcing extra='forbid' (rejects typo keys like ech0) and frozen=True (immutable after creation) - Template config models inherit StrictConfig instead of BaseModel - Use precise exception types in tests (errors.Error, ValidationError) - Parametrize test_strtobool_as_callback to avoid tmp_path reuse
- Prevent uv cache from using stale zodiac-core, ensuring the test always validates against the current local source
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #28 +/- ##
==========================================
+ Coverage 97.89% 97.92% +0.02%
==========================================
Files 22 23 +1
Lines 809 820 +11
==========================================
+ Hits 792 803 +11
Misses 17 17
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
- Recommend StrictConfig over BaseModel in Pydantic model examples - Add StrictConfig to API Reference section
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.
No description provided.