click_extra.config.builtin module¶
Click Extra’s own built-in configuration schema.
The dataclasses describing click-extra’s own [tool.click-extra] section:
ClickExtraConfig and its test-suite and prebake sub-tables. They
are a concrete instance of the configuration machinery, kept apart from the
reusable engine in schema and the option classes in
option. Only the click-extra CLI reads them, so
import click_extra does not load this module.
A downstream project defines its own equivalent of this module; click-extra just happens to ship one, built on the same generic engine.
- class click_extra.config.builtin.TestSuiteConfig(file='./tests/cli-test-suite.toml', cases=list(), timeout=None)[source]¶
Bases:
objectConfig schema for a project’s test suite, read from
[tool.<cli>.test-suite].The
test-suiteCLI command resolves its cases from this config when no suite is given on the command line. Map it onto an app’s config section with a field carryingmetadata={CONFIG_PATH_METADATA_KEY: "test-suite"}.- file: str = './tests/cli-test-suite.toml'¶
Path to a test suite file, resolved relative to the project root.
Its format is detected from the extension; the default is TOML, which (like JSON) parses with no optional dependency, unlike YAML and the others.
- cases: list[dict]¶
Test cases written natively in the config format, an alternative to a
filesuite, taking precedence over it when both are set.Each entry is a mapping of
CLITestCasedirective names, equivalent to one item of a suite list. In TOML this reads as a[[tool.<cli>.test-suite.cases]]array of tables. Declared as an extension point so the configuration engine passes the raw mappings through unprocessed; thetest-suitecommand turns them intoCLITestCaseinstances.
- class click_extra.config.builtin.PrebakeConfig(module=None)[source]¶
Bases:
objectConfig schema for the prebake commands, read from
[tool.<cli>.prebake].Lets a project pin the target
__init__.pyonce for its build pipeline, instead of passing--moduleto everyclick-extra prebakecommand.
- class click_extra.config.builtin.ClickExtraConfig(test_suite=TestSuiteConfig(), prebake=PrebakeConfig())[source]¶
Bases:
objectSchema for the
[tool.click-extra]configuration section.Wired as the
config_schemaof the top-levelclick-extragroup, so every subcommand reads the same section and pulls its own sub-table throughget_tool_config().- test_suite: TestSuiteConfig¶
The
[tool.click-extra.test-suite]sub-table (file/cases/timeout).
- prebake: PrebakeConfig¶
The
[tool.click-extra.prebake]sub-table (target module).