Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix/config bool conversion#28

Merged
TTWShell merged 7 commits into
masterfrom
fix/config-bool-conversion
Mar 31, 2026
Merged

Fix/config bool conversion#28
TTWShell merged 7 commits into
masterfrom
fix/config-bool-conversion

Conversation

@TTWShell

Copy link
Copy Markdown
Owner

No description provided.

- 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

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.92%. Comparing base (25452a7) to head (2155353).
⚠️ Report is 8 commits behind head on master.

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              
Files with missing lines Coverage Δ
zodiac_core/config.py 98.33% <100.00%> (+0.08%) ⬆️
zodiac_core/db/session.py 97.91% <ø> (ø)
zodiac_core/utils.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25452a7...2155353. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Recommend StrictConfig over BaseModel in Pydantic model examples
- Add StrictConfig to API Reference section
@TTWShell TTWShell merged commit 2598ffd into master Mar 31, 2026
11 checks passed
@TTWShell TTWShell deleted the fix/config-bool-conversion branch March 31, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant