Framework for Python

Workflow

load_settings_catalog()

Framework's package defaults, with the user's settings catalog merged over them.

The catalog has defaults (Framework's package defaults, layer 0 of spec_resolve()) and project_types, each with its .gitignore text. With include_user, settings-catalog.yml in config_dir() is merged over it.

new() starts from the same package defaults, applies settings-catalog.yml over them as R's new() does, and then applies the global settings.yml. It reads author, defaults.scaffold, defaults.ai, defaults.git, and project_types.<type>.directories from the file, with the same keys as the global settings.

Usage

load_settings_catalog(
    include_user: bool = True,
    validate: bool = True,
) -> dict[str, Any]

Arguments

Name Type Default Description
include_user bool True

Merge settings-catalog.yml from config_dir() over the shipped catalog when that file exists.

validate bool True

Check that the result has defaults and project_types mappings.

Value

The catalog, with meta, defaults, and project_types keys.

Raises

  • SettingsError: When validate is true and defaults or project_types is missing or not a mapping.