|
| 1 | +# 4.0.0 - 2025-12-09 |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +This major release removes `project:fix` and `project:format` |
| 6 | +and replaces them with `format:fix` and `format:check`. |
| 7 | + |
| 8 | +The `BaseConfig` has been extended to handle the commonly provided paths: |
| 9 | +* `root` is now `root_path` |
| 10 | +* `source` is now covered by `project_name` and `source_code_path`, which uses `root_path` and `project_name` |
| 11 | +* `doc` is now `documentation_path` |
| 12 | +* `version_file` is now `version_filepath` |
| 13 | + |
| 14 | +If your project was previously defining these values, your **before** would look like: |
| 15 | + |
| 16 | +```python |
| 17 | +from __future__ import annotations |
| 18 | + |
| 19 | +from pathlib import Path |
| 20 | +from typing import Iterable |
| 21 | + |
| 22 | +from exasol.toolbox.config import BaseConfig |
| 23 | + |
| 24 | + |
| 25 | +class Config(BaseConfig): |
| 26 | + root: Path = Path(__file__).parent |
| 27 | + doc: Path = Path(__file__).parent / "doc" |
| 28 | + source: Path = Path("exasol/{{cookiecutter.package_name}}") |
| 29 | + version_file: Path = ( |
| 30 | + Path(__file__).parent |
| 31 | + / "exasol" |
| 32 | + / "{{cookiecutter.package_name}}" |
| 33 | + / "version.py" |
| 34 | + ) |
| 35 | + plugins: Iterable[object] = () |
| 36 | + |
| 37 | +PROJECT_CONFIG = Config() |
| 38 | +``` |
| 39 | + |
| 40 | +With this major release, you **should modify** your project's `noxconfig.py` to look like: |
| 41 | +```python |
| 42 | +from __future__ import annotations |
| 43 | + |
| 44 | +from pathlib import Path |
| 45 | + |
| 46 | +from exasol.toolbox.config import BaseConfig |
| 47 | + |
| 48 | +""" |
| 49 | +A class `Config` only needs to be defined if: |
| 50 | +- you have custom attributes to pass to your project-defined nox sessions |
| 51 | +- you need to override a convention in the PTB. |
| 52 | +
|
| 53 | +These values do NOT need to be defined if your project follows the convention |
| 54 | +expected from the PTB: |
| 55 | +- documentation_path |
| 56 | +- source_code_path |
| 57 | +- version_filepath |
| 58 | +
|
| 59 | +If your values differ, you can override these properties with the needed values when |
| 60 | +you define `class Config(BaseConfig)`. We highly recommend that you create an issue |
| 61 | +to remove this override in the future by aligning your project's structure with |
| 62 | +that expected by the PTB. |
| 63 | +
|
| 64 | +If you have additional Paths that used one of these values (i.e. `root_path`), then |
| 65 | +you can define your own property in `class Config(BaseConfig)`, which accesses the |
| 66 | +class values |
| 67 | +""" |
| 68 | +class Config(BaseConfig): |
| 69 | + custom_field: str = "custom_field" |
| 70 | + |
| 71 | +# For most projects, the PROJECT_CONFIG would look like: |
| 72 | +PROJECT_CONFIG = BaseConfig( |
| 73 | + project_name="{{cookiecutter.package_name}}", |
| 74 | + root_path=Path(__file__).parent, |
| 75 | +) |
| 76 | +``` |
| 77 | + |
| 78 | +## Refactoring |
| 79 | + |
| 80 | +* #606: Renamed nox session `project:fix` more aptly to `format:fix` and `project:format` to `format:check` |
| 81 | +* #604: Updated `BaseConfig.exasol_versions` to `("7.1.30", "8.29.13", "2025.1.8")` |
| 82 | + |
| 83 | +## Feature |
| 84 | + |
| 85 | +* #614: Replaced `path_filters` with `BaseConfig.add_to_excluded_python_paths` and `BaseConfig.excluded_python_paths` |
| 86 | +* #626: Replaced `plugins` with `BaseConfig.plugins_for_nox_sessions` |
| 87 | +* #621: Moved path specifications into `BaseConfig` |
| 88 | + * `root` is now `root_path`, which must be specified by the project |
| 89 | + * `source` is now covered by `project_name`, which must be specified by the project, |
| 90 | + and `source_code_path`, which uses `root_path` and `project_name` |
| 91 | + * `doc` is now `documentation_path` and no longer needs to be specified |
| 92 | + * `version_file` is now `version_filepath` and no longer needs to be specified |
| 93 | + |
| 94 | +## Dependency Updates |
| 95 | + |
| 96 | +### `main` |
| 97 | +* Updated dependency `bandit:1.9.1` to `1.9.2` |
| 98 | +* Updated dependency `mypy:1.18.2` to `1.19.0` |
| 99 | +* Updated dependency `pre-commit:4.4.0` to `4.5.0` |
| 100 | +* Updated dependency `pydantic:2.12.4` to `2.12.5` |
| 101 | +* Updated dependency `pylint:4.0.3` to `4.0.4` |
| 102 | +* Updated dependency `ruff:0.14.5` to `0.14.8` |
0 commit comments