BaseConfig¶
- DEFAULT_EXCLUDED_PATHS = {'.eggs', '.html-documentation', '.poetry', '.sonar', '.venv', 'dist', 'venv'}¶
Default paths ignored by
BaseConfig.excluded_python_paths().
- class BaseConfig(*, project_name: str, root_path: Path, python_versions: tuple[Annotated[str, AfterValidator(func=valid_version_string)], ...] = ('3.10', '3.11', '3.12', '3.13', '3.14'), exasol_versions: tuple[Annotated[str, AfterValidator(func=valid_version_string)], ...] = ('7.1.30', '8.29.13', '2025.1.8'), create_major_version_tags: bool = False, add_to_excluded_python_paths: tuple[str | Path, ...] = (), plugins_for_nox_sessions: tuple[Annotated[type[Any], AfterValidator(func=validate_plugin_hook)], ...] = (), dependency_manager: DependencyManager = DependencyManager(name='poetry', version='2.3.0'), os_version: Annotated[str, _PydanticGeneralMetadata(pattern='^ubuntu-.*')] = 'ubuntu-24.04')[source]¶
Bases:
BaseModelBasic configuration for projects using the PTB
This configuration class defines the necessary attributes for using the PTB’s various nox sessions and GitHub CI workflows. Defaults are provided via the attributes, which makes it easy for a specific project to modify these values as needed. There are properties provided which automate some configuration aspects so that the project-specific modifications are reduced.
pydantic has been used so that altered attributes are quickly validated. This allows for immediate feedback, instead of waiting for various failed CI runs.
- add_to_excluded_python_paths: tuple[str | Path, ...]¶
Extends the default set of paths to be ignored by the PTB, defined in
DEFAULT_EXCLUDED_PATHS.
- plugins_for_nox_sessions: tuple[Annotated[type[Any], AfterValidator(func=validate_plugin_hook)], ...]¶
- dependency_manager: DependencyManager¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property minimum_python_version: str¶
Minimum Python version declared from the
python_versionslistThis is used in specific testing scenarios where it would be either costly to run the tests for all
python_versionsor we need a single metric.
- property excluded_python_paths: tuple[Path, ...]¶
For nox sessions as listed below, this property defines which paths to ignore below
PROJECT_CONFIG.root_path. By default ignores the paths inDEFAULT_EXCLUDED_PATHS, incl.distand.eggs. Additional paths can be configured withBaseConfig.add_to_excluded_python_paths().- Affected nox sessions:
format:check
format:fix
lint:code
lint:security
lint:typing
- property pyupgrade_argument: tuple[str, ...]¶
Default argument to
exasol.toolbox._format._pyupgrade().It uses the minimum Python version to ensure compatibility with all supported versions of a project.
- property sonar_code_path: Path¶
Relative path needed in Nox session
sonar:checkto create the coverage XML.
- property version_filepath: Path¶
Path to the
version.pyfile included in the project. This is an autogenerated file which contains the version of the code. It is maintained by the nox sessionsversion:checkandrelease:prepare.