You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.2.0] - 2025-01-02
9
+
10
+
### Added
11
+
-**Explicit Required/Optional Configuration**: All fields must explicitly specify `required=True` or `optional=True` in metadata. No inference allowed.
12
+
-**Automatic Model Defaults**: Model defaults are automatically applied as base layer. No need to explicitly include `sources.Defaults` in sources list.
13
+
-**Model-Driven Source Filtering**: All sources (Env, CLI, DotEnv, Etcd) now filter variables/arguments based on model fields. Only model-defined fields are loaded.
14
+
-**Required Field Validation**: New `Config.validate()` method to validate required fields independently. `Config.load()` now has optional `validate` parameter.
15
+
-**Comprehensive Error Messages**: When required fields are missing, error messages include:
16
+
- List of missing fields with descriptions
17
+
- Source mapping rules and examples for each active source
18
+
- Actionable guidance on how to provide missing parameters
19
+
-**Field Metadata Support**: Support for `description` and `help` in field metadata for better documentation and CLI help text.
20
+
-**New Modules**:
21
+
-`varlord.metadata`: Field information extraction and utilities
22
+
-`varlord.validation`: Model definition validation and configuration validation
23
+
-`varlord.source_help`: Source mapping examples and error message formatting
24
+
25
+
### Changed
26
+
-**BREAKING**: `Env` source no longer accepts `prefix` parameter. All environment variables are filtered by model fields.
27
+
-**BREAKING**: All fields must have explicit `required` or `optional` metadata. `ModelDefinitionError` is raised if missing.
28
+
-**BREAKING**: `Config.from_model()` no longer accepts `env_prefix` parameter.
29
+
-**BREAKING**: `Defaults` source is now internal. Model defaults are automatically applied, no need to include in sources list.
30
+
-**BREAKING**: Empty strings and empty collections are now considered valid values for required fields (only presence is checked, not emptiness).
31
+
32
+
### Fixed
33
+
- Improved error messages for missing required fields
0 commit comments