GitHub
07/01/2025, 2:47 PMclick callback to parse config input arguments and deprecate PluginBase.config_from_cli_args
Pull request opened by edgarrmondragon
## Related
• #3143
• #3144
## Summary by Sourcery
Introduce a structured _ConfigInput type with a click callback for parsing config arguments, deprecate the old config_from_cli_args method, update command entry points across Tap, Mapper, and Target to use the new dataclass, and unify deprecation warning handling.
New Features:
• Add _ConfigInput dataclass for structured CLI config input handling
• Introduce a click callback (cb_config) to automatically convert CLI options into _ConfigInput
Bug Fixes:
• Fix missing space in the ‘Could not locate config file’ error message
Enhancements:
• Deprecate PluginBase.config_from_cli_args and migrate to _ConfigInput.from_cli_args
• Refactor Tap, Mapper, and Target invoke methods to consume _ConfigInput (files and parse_env) instead of raw tuples
• Standardize deprecation warnings to use SingerSDKDeprecationWarning and consolidate the deprecated import in _compat
Tests:
• Add unit tests for _ConfigInput.from_cli_args covering normal usage, environment parsing, and invalid file handling
## Summary by Sourcery
Refactor command-line configuration parsing by introducing a typed _ConfigInput object and click callback, deprecate the old config_from_cli_args API, update plugin and connector base classes to use the new input model, and standardize deprecation warnings under SingerSDKDeprecationWarning.
New Features:
• Introduce a new _ConfigInput dataclass to encapsulate CLI config files and environment parsing
• Add a click callback (cb_config) in SingerCommand to automatically parse config input into _ConfigInput
Enhancements:
• Deprecate PluginBase.config_from_cli_args in favor of _ConfigInput.from_cli_args
• Refactor tap, mapper, and target base invoke and callback functions to consume _ConfigInput instead of raw tuple arguments
• Standardize deprecation warnings to use custom SingerSDKDeprecationWarning across connectors, authenticators, and typing modules
• Add a compatibility import for the deprecated decorator in _compat for Python < 3.13
Tests:
• Add tests for _ConfigInput.from_cli_args covering file parsing, environment flag, and invalid file scenarios
meltano/sdkGitHub
07/01/2025, 2:47 PMclick callback to parse config input arguments and deprecate PluginBase.config_from_cli_args
Pull request ready for review by edgarrmondragon
meltano/sdkGitHub
07/01/2025, 2:56 PM