tmt.config.models package
Submodules
tmt.config.models.hardware module
- class tmt.config.models.hardware.HardwareConfig(*, beaker: MrackHardware)
Bases:
MetadataContainerCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- beaker: MrackHardware
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class tmt.config.models.hardware.MrackHardware(*, translations: list[MrackTranslation])
Bases:
MetadataContainerCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- translations: list[MrackTranslation]
- class tmt.config.models.hardware.MrackTranslation(*, requirement: str, template: str)
Bases:
MetadataContainerHere’s a full config example:
beaker: translations: - requirement: cpu.processors template: '{"cpu": {"processors": {"_op": "{{ OPERATOR }}", "_value": "{{ VALUE }}"}}}'
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- requirement: str
- template: str
tmt.config.models.link module
- class tmt.config.models.link.IssueTracker(*, type: IssueTrackerType, url: HttpUrl, tmt_web_url: HttpUrl, token: str)
Bases:
MetadataContainerCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- tmt_web_url: HttpUrl
- token: str
- type: IssueTrackerType
- url: HttpUrl
- class tmt.config.models.link.LinkConfig(*, issue_tracker: list[IssueTracker])
Bases:
MetadataContainerCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- issue_tracker: list[IssueTracker]
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
tmt.config.models.themes module
- class tmt.config.models.themes.Linter(*, outcome: LinterOutcome)
Bases:
_ThemeStyles for linter output.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- outcome: LinterOutcome
- class tmt.config.models.themes.LinterOutcome(*, skip: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), pass_: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), fail: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), warn: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), fixed: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None))
Bases:
_ThemeStyles for outcomes of various linter rules.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- get_style(field: str) Style
Return a style when the field name is dynamic.
A safer, type-annotated variant of
getattr(theme, field).
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class tmt.config.models.themes.Style(*, fg: int | tuple[int, int, int] | str | None = None, bg: int | tuple[int, int, int] | str | None = None, bold: bool | None = None, dim: bool | None = None, underline: bool | None = None, italic: bool | None = None, blink: bool | None = None, strikethrough: bool | None = None)
Bases:
MetadataContainerA collection of parameters accepted by
click.style().Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- apply(text: str) str
Apply this style to a given string.
- bg: int | tuple[int, int, int] | str | None
- blink: bool | None
- bold: bool | None
- dim: bool | None
- fg: int | tuple[int, int, int] | str | None
- italic: bool | None
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- strikethrough: bool | None
- underline: bool | None
- class tmt.config.models.themes.Theme(*, linter: Linter, restructuredtext_text: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_literal: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_emphasis: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_strong: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_literalblock: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_literalblock_yaml: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_literalblock_shell: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_admonition_note: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None), restructuredtext_admonition_warning: Style = Style(fg=None, bg=None, bold=None, dim=None, underline=None, italic=None, blink=None, strikethrough=None))
Bases:
_ThemeA collection of items tmt uses to colorize various tokens of its CLI.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class tmt.config.models.themes.ThemeConfig(*, active_theme: str = 'default')
Bases:
MetadataContainerCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- active_theme: str
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function key_to_option>, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].