Skip to content

v0.3.0

Latest

Choose a tag to compare

@RobinU434 RobinU434 released this 28 Dec 21:56
· 37 commits to main since this release

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

  1. OmegaConf Integration:

  2. 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}
  • 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 config2code

For detailed documentation, visit the [GitHub repository](https://github.com/RobinU434/Config2Class).