Skip to content

Releases: RobinU434/Config2Class

v0.3.0

Choose a tag to compare

@RobinU434 RobinU434 released this 28 Dec 21:56

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).

v0.2.1

Choose a tag to compare

@RobinU434 RobinU434 released this 10 Nov 17:46

Got it! Here’s a draft release note for config2class version 0.2.1:


Release Notes for config2class v0.2.1

Release Date: November 10, 2024

The config2class library, designed for Python developers managing complex configuration files, introduces several new features in version 0.2.1. This release focuses on improving flexibility in config handling, automating code generation, and adding utilities for service management.


New Features

  • Automatic Config Code Generation:
    A new service to automate the generation of configuration code based on existing config files. This feature streamlines the setup process by allowing developers to generate config-based code automatically, reducing manual coding.

  • Service Utilities:
    Introduced helper functions for managing services effectively. The following commands are now available:

    • start-service: start a service from config file to python code
    • stop: Stop a running service.
    • stop-all: Stop all active services.
    • list-services: List all currently available services.
      These utilities provide easier control over services, enabling developers to manage resources more efficiently.
  • Token-Based Value Replacement in Config Files:
    A flexible new feature for token-based value replacement within configuration files. This addition allows developers to specify tokens within their config, which can be replaced with actual values at runtime, providing greater adaptability in dynamic environments.

  • Load Config as Class Method:
    Config files can now be loaded directly into class methods, allowing for a more structured and object-oriented approach to managing configuration data.


Enhancements

  • Expanded Documentation:
    Comprehensive documentation has been added for the new features, covering setup, usage, and examples to ensure a smooth onboarding process.

  • Additional Tests:
    Unit tests have been expanded to cover all new functionalities, enhancing the reliability and stability of the library.


Note: While this version does not include specific bug fixes, future releases will continue to build on feedback and performance improvements.


Thank you for using config2class! Your feedback is invaluable as we continue to make configuration management easier and more robust for Python developers.

v0.0.1-beta.2 release

Choose a tag to compare

@RobinU434 RobinU434 released this 30 Oct 13:07
933c1e3

Config2Code v0.0.1: Your Configuration, Now a Dataclass

Introducing Config2Code

Tired of manually creating Python dataclasses to represent your configuration? Config2Code is here to simplify your workflow. This powerful tool automatically generates dataclasses from your YAML, JSON or TOML configuration files.

Key Features:

  • Effortless Conversion: Simply provide your configuration file, and Config2Code will generate a corresponding Python dataclass.
  • Nested Structures Support: Handles complex hierarchical configurations with ease.
  • Type Inference: Automatically infers types for fields based on their values.
  • Customizable Output: Tailor the generated code to your specific needs.

How to Use:

  1. Installation:

    pip install config2code
  2. Usage:

    config2code --input input.yaml --output output.py

Getting Started:

For detailed instructions and examples, refer to our documentation: [Link to documentation]

Contributing:

We encourage contributions to improve Config2Code. Feel free to fork the repository, make changes, and submit a pull request.

License:

This project is licensed under the MIT License.

Let us know what you think!

We're excited to hear your feedback and suggestions. Please share your experiences and feature requests with us.

Full Changelog: https://github.com/RobinU434/Config2Class/commits/v0.0.1-beta

Full Changelog: v0.0.1-beta...v0.0.1-beta.2

v0.0.1-beta release

Choose a tag to compare

@RobinU434 RobinU434 released this 30 Oct 13:02

Config2Code v0.0.1: Your Configuration, Now a Dataclass

Introducing Config2Code

Tired of manually creating Python dataclasses to represent your configuration? Config2Code is here to simplify your workflow. This powerful tool automatically generates dataclasses from your YAML, JSON or TOML configuration files.

Key Features:

  • Effortless Conversion: Simply provide your configuration file, and Config2Code will generate a corresponding Python dataclass.
  • Nested Structures Support: Handles complex hierarchical configurations with ease.
  • Type Inference: Automatically infers types for fields based on their values.
  • Customizable Output: Tailor the generated code to your specific needs.

How to Use:

  1. Installation:

    pip install config2code
  2. Usage:

    config2code --input input.yaml --output output.py

Getting Started:

For detailed instructions and examples, refer to our documentation: [Link to documentation]

Contributing:

We encourage contributions to improve Config2Code. Feel free to fork the repository, make changes, and submit a pull request.

License:

This project is licensed under the MIT License.

Let us know what you think!

We're excited to hear your feedback and suggestions. Please share your experiences and feature requests with us.

Full Changelog: https://github.com/RobinU434/Config2Class/commits/v0.0.1-beta