Skip to content

Dynamically select from available backends - #30

Merged
semohr merged 9 commits into
mainfrom
select_backends
Jul 30, 2026
Merged

Dynamically select from available backends#30
semohr merged 9 commits into
mainfrom
select_backends

Conversation

@semohr

@semohr semohr commented Jul 30, 2026

Copy link
Copy Markdown
Owner
  • Validation backends (jsonschema, pydantic) are now optional extras and must be explicitly installed. Auto-detection logic picks the best available backend (Pydantic preferred). The default jsonschema dependency is removed from core requirements.
  • Expanded and clarified documentation on validation backends, including a new docs/validation.md with a feature comparison, installation instructions, and error handling examples.

Performance and Benchmarks:

  • Added a new benchmark script (benchmarks/validation.py) to measure validation speed, dependency size, and cold import time for both backends.
  • Optimized the asdict_with_aliases implementation: added an LRU cache for alias detection and improved the alias dict factory to O(N) complexity.

CLI and Error Handling:

  • CLI now handles single validation errors (ConfigurationError) in addition to multiple errors, improving UX for config validation.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.61111% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.87%. Comparing base (b7c7f30) to head (c2fd34c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/eyconf/validation/backends/__init__.py 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   95.95%   95.87%   -0.08%     
==========================================
  Files          18       18              
  Lines        1062     1115      +53     
==========================================
+ Hits         1019     1069      +50     
- Misses         43       46       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@semohr
semohr merged commit a447a26 into main Jul 30, 2026
9 checks passed
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