What problem does it solve?
Evolving configuration schemas in a live application often leads to breaking changes, requiring users to manually update their config files. This Skill provides patterns and scripts to automate schema migrations, ensuring backward compatibility and a smooth user experience.
Core Features & Use Cases
- Backward Compatibility: Implement strategies to support both old and new config formats simultaneously, with deprecation warnings.
- Automated Migration Scripts: Generate idempotent Python scripts that automatically transform old config files to the new schema, including backups.
- Environment Variable Substitution: Securely inject secrets and dynamic values into config fields using
${VAR_NAME} syntax.
- Pydantic Validation: Leverage Pydantic's powerful validation features to ensure config integrity and catch errors at load time.
- Use Case: You've refactored your application's configuration from a flat
cli_tools section to a more structured adapters section with type discrimination. Use this skill to create a migration script that automatically updates existing config.yaml files, preventing user disruption.
Quick Start
To automatically update your config.yaml to the latest schema, run the migration script:
python scripts/migrate_config.py