Release Notes for Config2Class
Version: 0.3.0
Release Date: [28.12.2024]
Config2Class has been updated with exciting new features and improvements! This release focuses on enhancing flexibility, usability, and integration with popular Python libraries for configuration management.
New Features
-
OmegaConf Integration:
- Now leveraging the power of [OmegaConf](https://omegaconf.readthedocs.io/en/2.3_branch/) to handle placeholders and dynamic configuration values.
- Enables advanced features like custom evaluators, missing value imputation, and merging configuration files.
-
Hydra Integration (Beta):
- Preliminary support for Hydra, allowing integration with Hydra’s ArgumentParser.
- Aims to simplify complex configuration workflows in applications.
Note: This feature is under development. Use with caution while merging argument parsers.
Enhancements
-
Placeholder Support:
- Introduced placeholders (
${<path-in-config>}) to allow dynamic references to values within the same configuration file. - Ideal for scenarios like machine learning pipelines, where parameters can depend on other parts of the configuration.
Example:
model: input_dim: ${pipeline.dataset.x_dim} output_dim: ${pipeline.dataset.y_dim}
- Introduced placeholders (
-
Service Mode:
- Added a file monitoring service that automatically updates generated Python files when the source configuration changes.
- Start service:
config2code service-start --input input.yaml --output output.py
- Stop service:
config2code stop-all
Bug Fixes
- Improved type inference for nested structures in YAML, JSON, and TOML files.
- Enhanced error handling for invalid or malformed configuration files.
Future Roadmap
- VS Code Extension: Automate Python file generation upon saving configuration files.
- Field Renaming Sync: Update generated code when configuration fields are renamed.
- Expanded Placeholder Tokens: Support list indexing in placeholder paths (e.g.,
{{<path.to.element>[<index>]}}).
Upgrade now and simplify your configuration management workflows.
Run:
pip install --upgrade config2codeFor detailed documentation, visit the [GitHub repository](https://github.com/RobinU434/Config2Class).