<#9421 feat(core): Customize meltano.yml YAML styl...
# meltano-repo-activity
g
#9421 feat(core): Customize meltano.yml YAML style with a user configuration file Pull request opened by mahangu Second attempt at #9256 - implements Option 1 that allows users to customize YAML formatting globally via
~/.meltanorc
. ## Changes • New:
UserConfigService
for reading
~/.meltanorc
(INI format) • Modified:
yaml.dump()
applies user YAML preferences • Added:
MELTANO_DISABLE_USER_YAML_CONFIG
environment variable override ## Configuration [yaml] indent = 4 preserve_quotes = true width = 120 ## Features • Supports ruamel.yaml settings (indent, width, preserve_quotes, etc.) • Graceful fallbacks for missing/invalid configurations • Environment variable disable:
MELTANO_DISABLE_USER_YAML_CONFIG=true
## Summary by Sourcery Enable global customization of YAML formatting by reading user preferences from ~/.meltanorc, integrate those settings into yaml.dump with an opt-out environment variable, and provide documentation and extensive tests for the new functionality. New Features: • Allow users to configure YAML formatting globally via a ~/.meltanorc INI file (indentation, width, preserve_quotes, etc.) • Add MELTANO_DISABLE_USER_YAML_CONFIG environment variable to opt out of user YAML settings Enhancements: • Introduce UserConfigService singleton for reading and caching user configuration • Refactor yaml.dump to apply user preferences by creating isolated YAML instances and return a string when no stream is provided Documentation: • Add user-facing documentation detailing YAML configuration file format, available settings, and disabling via environment variable Tests: • Add comprehensive tests for user configuration service and yaml module behavior (indentation, overrides, error handling, instance isolation, type representations, caching, and return values) meltano/meltano