All notable changes to this project will be documented in this file.
- Fixed issue in
generate_yaml: It would raise on edge cases if schema was defined via inheritance
- Fixed issue where
generate_yamlwould not generate valid YAML when a dataclass withNoneunion type was provided
- Added new subcommands to the CLI integration:
path,validate,diff,reset
- Enhanced the eyconf class to use schema-defined default values during validation, preventing errors when fields have defaults but aren't explicitly marked as optional.
- Added py.typed marker to distribution
- Access Proxies now support assignment of other access proxies, comparison, and deepcopy.
- Dropped AttributeDict for a plain dict object for extra keys
- Added a number of utility functions around aliases and field metadata
- Added
proxyproperty to ConfigExtra for typed access of the Acessproxy
- Fixed an issue where
to_dictdid not respect field aliases when converting configuration data to a dictionary. Now, fields with defined aliases will use those aliases as keys in the resulting dictionary.
- Fixed an regression where Unions with literals e.g.
Literal["foo"] | strwould not be detected correctly validated.
- Added proper support for adding additional properties to configuration schemas via the
ConfigExtraclass. This allows users to include extra fields in their configuration that are not explicitly defined in the dataclass schema. All partial support for allow additional in the base config has been removed in favor of this new approach. This unifies the way extra fields are handled across the library. - Added
allow_additionalanddict_accessdecorators to simplify enabling extra fields and dict-style access for configuration schemas. - Updated documentation to reflect changes in handling extra fields and added examples for using
ConfigExtra. - Renamed
EyConfBasetoConfigfor better clarity and consistency as the base class does not interact with Yaml directly. - Renamed
as_dictmethods toto_dictfor better clarity. - Added
reloadmethod toEyConfclass to allow reloading configuration from the original YAML file. - Added support for
aliasdefinition using thefieldmetadata in schemas, allowing users to define alternative names for configuration fields in the YAML file.
- Fixed where usage of
Annotatedbreaks YAML validation.
- Moved some of the getting-started information into the advanced-usage guide.
- Added information on how to use the
@dict_accessdecorator for dict-style access to configuration values. - We are now back to using
mypyfor type checking instead ofpyrefly. - Fixed issue with
Annotateddocstrings raising NotImplementedError during YAML generation. This happened only for usage ofAnnotatedin nested dataclasses.
- Empty AttributeDicts are no longer considered truthy. An AttributeDict with no keys will evaluate to False.
- Added repr and str methods to AttributeDict for better debugging and logging.
- Fixed issue where attribute access on EYConfExtraFields would populate data with empty AttributeDicts for missing extra fields.
- Fixed an issue with updates not beeing applied to dataclasses if given a nested dict. E.g.
dict[str, Class]was interpreted asdict[str, dict]and not converted to the target dataclass.
- Added support for extra fields in configuration schemas. Additional fields are not typed but can be retrieved. Use
EYConfExtraFieldsfor even more flexibility. - Modularized config.py file into multiple modules for better maintainability.
- Added
updatemethod toEYConfBasefor updating configuration data programmatically. - Improved tests and test coverage, especially for edge cases in the update function.
- Default
__getattr__behavior is removed in favor of explicit access methods to avoid confusion with extra fields. Useconfig.data.field_nameto access fields! - Repo is no typed with
pyrefly. - Improved documentation with more examples and clearer explanations.
- Using
from __future__ import annotationscaused issues with dataclass field type resolution. This has been fixed to ensure compatibility. - Generation of yaml for dictionary types with arbitrary keys and typed values now working.
- Moved
Primitivesandprimitive_typestoeyconf.constantsfor better modularity.
- More examples in the quickstart guide.
- Now supports patternProperties for nested types, where they key can be arbitrary but its content should still adhere to a specific type.
- Added support for validating mixed type literals.
- Added functionality to disallow or allow additional properties in configuration schemas.
- The
NoneTypetype has been added to to literals and representsnullvalues in YAML.
- Added changelog
- Added
eyconf.climodule for CLI commands.- Automatically generates a CLI for configuration management.
- remove path from constructor in favour for get_file method.
- Logo and basic usage example.
- Moved quickstart guide into documentation.
- Adjusted string formatting.
- Default values for lists were not generated correctly.
Version bump only. No functional changes listed.
- FAQ section to documentation.
- Test for derived classes.
- Default YAML API to allow custom default values.
- Fixed typos in README.
issubclass()errors when non-class types were used.- Renamed
validatefunction tovalidation. - Minor formatting issues in documentation.
- Python package initialization.
- YAML-based config generation, validation, and creation.
- GitHub publish workflow.
- Python version checks and compatibility for 3.12.
- Initial tests and release scaffolding.