devops.config

DevOps config package.

class devops.config.Constants(github=GitConstants(github_url='https://github.com', github_devops_repo='https://github.com/MolarVerse/devops', github_devops_issues_url='https://github.com/MolarVerse/devops/issues'), files=FileConstants(default_toml_template='devops.toml.template', toml_filenames=['devops.toml', '.devops.toml']))[source]

Bases: object

Class holding constant values for DevOps checks.

Parameters:
github: GitConstants = GitConstants(github_url='https://github.com', github_devops_repo='https://github.com/MolarVerse/devops', github_devops_issues_url='https://github.com/MolarVerse/devops/issues')
files: FileConstants = FileConstants(default_toml_template='devops.toml.template', toml_filenames=['devops.toml', '.devops.toml'])
class devops.config.CppConfig(style_checks=True, license_header_check=True, license_header=None, check_only_staged_files=False, check_dirs=<factory>, exclude_dirs=<factory>, header_guards_according_to_filepath=False, header_guard_pattern=None, ast_checks=True, ast_check_compile_args=<factory>, ast_check_compile_commands_db=None, ast_check_enabled_ids=<factory>, ast_check_disabled_ids=<factory>, ast_check_config=<factory>, forbidden_spellings=<factory>, incremental_state_file=None, fail_fast=True, parallel_jobs=1)[source]

Bases: object

Dataclass to hold C++ configuration values.

Parameters:
  • style_checks (bool)

  • license_header_check (bool)

  • license_header (str | None)

  • check_only_staged_files (bool)

  • check_dirs (list[str])

  • exclude_dirs (list[str])

  • header_guards_according_to_filepath (bool)

  • header_guard_pattern (str | None)

  • ast_checks (bool)

  • ast_check_compile_args (list[str])

  • ast_check_compile_commands_db (str | None)

  • ast_check_enabled_ids (list[str])

  • ast_check_disabled_ids (list[str])

  • ast_check_config (dict[str, dict])

  • forbidden_spellings (dict[str, ForbiddenSpelling])

  • incremental_state_file (str | None)

  • fail_fast (bool)

  • parallel_jobs (int)

style_checks: bool = True
license_header_check: bool = True
license_header: str | None = None
check_only_staged_files: bool = False
check_dirs: list[str]
exclude_dirs: list[str]
header_guards_according_to_filepath: bool = False
header_guard_pattern: str | None = None
ast_checks: bool = True
ast_check_compile_args: list[str]
ast_check_compile_commands_db: str | None = None
ast_check_enabled_ids: list[str]
ast_check_disabled_ids: list[str]
ast_check_config: dict[str, dict]
forbidden_spellings: dict[str, ForbiddenSpelling]
incremental_state_file: str | None = None
fail_fast: bool = True
parallel_jobs: int = 1
to_toml_lines()[source]

Convert the CppConfig to TOML lines.

Returns:

list[str] – The list of TOML lines representing the configuration.

Return type:

list[str]

class devops.config.GitConfig(tag_prefix='', empty_tag_list_allowed=True)[source]

Bases: object

Dataclass to hold default git configuration values.

Parameters:
  • tag_prefix (str)

  • empty_tag_list_allowed (bool)

tag_prefix: str = ''
empty_tag_list_allowed: bool = True
to_toml_lines()[source]

Convert the GitConfig to TOML lines.

Returns:

list[str] – The list of TOML lines representing the configuration.

Return type:

list[str]

class devops.config.ReleaseConfig(branch='main', ci_workflows=<factory>, ci_timeout=1800, ci_interval=20)[source]

Bases: object

Dataclass to hold release configuration values.

Parameters:
branch: str = 'main'
ci_workflows: list[str]
ci_timeout: int = 1800
ci_interval: int = 20
to_toml_lines()[source]

Convert the ReleaseConfig to TOML lines.

Returns:

list[str] – The list of TOML lines representing the configuration.

Return type:

list[str]

devops.config.init_config()[source]

Initialize global config paths.

Returns:

GlobalConfig – The initialized global configuration object.

Return type:

GlobalConfig

Modules

base

Base configuration utilities.

config

Module for reading and parsing configuration files.

config_cpp

Module for parsing C++ configuration.

config_file

Module to parse file configuration values.

config_git

Git configuration parsing module.

config_logging

Module for logging configuration.

config_release

Release configuration parsing module.

constants

Constants for DevOps checks.

toml

Module for handling TOML files in a DevOps context.