|
1 | 1 | # Unreleased |
2 | 2 |
|
3 | | -Verification of the Python/Exasol version format of the config by adding a BaseConfig class. To Use: |
4 | | - |
5 | | - #Use |
6 | | - Project_Config = BaseConfig() |
7 | | - #modify |
8 | | - Project_Config = BaseConfig(python_versions=["3.12"]) |
9 | | - #expand |
10 | | - class ProjectConfig(BaseConfig): |
11 | | - extra_data: list[str] = ["data"] |
12 | | - |
13 | | - Project_Config = ProjectConfig() |
| 3 | +## BaseConfig class for PTB attributes |
| 4 | + |
| 5 | +The BaseConfig class was introduced in this version. This class is used to consolidate |
| 6 | +the attributes needed for the PTB's functionalities into an inherited object which can |
| 7 | +be expanded upon as needed. At this point, the BaseConfig class includes |
| 8 | +``python_versions``, ``exasol_versions``, and ``create_major_version_tags``. Users of |
| 9 | +the PTB should update their ``noxconfig.py`` to start using this feature. |
| 10 | + |
| 11 | +```python |
| 12 | +# noxconfig.py |
| 13 | +from exasol.toolbox.config import BaseConfig |
| 14 | + |
| 15 | + |
| 16 | +# existing Config should inherit from BaseConfig |
| 17 | +class Config(BaseConfig): |
| 18 | + # if present, remove any attributes already in the BaseConfig from the added attributes |
| 19 | + ... |
| 20 | + |
| 21 | + |
| 22 | +# if no overlapping attributes with `BaseConfig` were present in `Config`, then this is unmodified. |
| 23 | +PROJECT_CONFIG = Config() |
| 24 | +# if no overlapping attributes with `BaseConfig` were present in `Config`, then this should be modified. |
| 25 | +PROJECT_CONFIG = Config(python_versions=(...), exasol_versions=(...), create_major_version_tags=True) |
| 26 | +``` |
14 | 27 |
|
15 | 28 | ## Feature |
16 | 29 |
|
17 | | -#465: Create BaseConfig class |
| 30 | +* #465: Created BaseConfig class to better synchronize attributes needed for the PTB's |
| 31 | + growing functionalities |
| 32 | + * Started with ``python_versions`` and ``exasol_versions`` |
0 commit comments