Config Package (autotransform.config)

Provides configuration to AutoTransform. By default this configuration is pulled from config files. The configuration fetcher used can be overridden using the AUTO_TRANSFORM_CONFIG environment variable. This can support different methods of configuration, such as environment variables or a custom approach where the environment variable is set to “{‘class_name’: <A ConfigFetcher Class>, ‘module’: <The module where the class is located>}”.

autotransform.config.get_config() Config

Gets the Config for AutoTransform.

Returns

The cached Config.

Return type

Config

autotransform.config.get_cwd_config_dir() str

Gets the directory where an AutoTransform config file would be located relative to the current working directory. The environment variable AUTO_TRANSFORM_CWD_CONFIG_PATH can be used to set the relative path to the config.json file for CWD configs.

Returns

The directory of the cwd config file.

Return type

str

autotransform.config.get_repo_config_dir() Optional[str]

Gets the directory where a repo-specific AutoTransform config file would be located. None if git fails. The environment variable AUTO_TRANSFORM_REPO_CONFIG_PATH can be used to set the relative path to the config.json file for repo configs.

Returns

The directory of the repo config file. None if git fails.

Return type

Optional[str]

autotransform.config.get_repo_config_relative_path() str

Gets the relative path used for the repo config directory.

Returns

The relative path to the config.

Return type

str