diff --git a/.github/actions/security-issues/action.yml b/.github/actions/security-issues/action.yml index f47726679..71037265e 100644 --- a/.github/actions/security-issues/action.yml +++ b/.github/actions/security-issues/action.yml @@ -39,7 +39,7 @@ runs: - name: Install Python Toolbox / Security tool shell: bash run: | - pip install exasol-toolbox==10.2.1 + pip install exasol-toolbox==10.3.0 - name: Create Security Issue Report shell: bash diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index d7e789260..1c8fcb5cb 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,6 +1,7 @@ # Changelog * [unreleased](unreleased.md) +* [10.3.0](changes_10.3.0.md) * [10.2.1](changes_10.2.1.md) * [10.2.0](changes_10.2.0.md) * [10.1.0](changes_10.1.0.md) @@ -73,6 +74,7 @@ hidden: --- unreleased +changes_10.3.0 changes_10.2.1 changes_10.2.0 changes_10.1.0 diff --git a/doc/changes/changes_10.3.0.md b/doc/changes/changes_10.3.0.md new file mode 100644 index 000000000..251029ea6 --- /dev/null +++ b/doc/changes/changes_10.3.0.md @@ -0,0 +1,16 @@ +# 10.3.0 - 2026-07-15 + +## Summary + +This minor release extends automatic custom workflow permission extraction for +`github_template_dict.custom_workflows` and removes the deprecated +`lint:dependencies` usage from `report.yml` while adding a deprecation notice. +The `lint:dependencies` will be removed in October 2026. + +## Features + +* #922: Extended `custom_workflows` of `github_template_dict` for automatic custom workflow permissions extraction + +## Refactoring + +* #924: Removed `lint:dependencies` usage from `report.yml` and added deprecation notice diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 4804c3efd..fb4737052 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -1,11 +1,3 @@ # Unreleased ## Summary - -## Features - -* #922: Extended `custom_workflows` of `github_template_dict` for automatic custom workflow permissions extraction - -## Refactoring - -* #924: Removed `lint:dependencies` usage from `report.yml` and added deprecation notice diff --git a/exasol/toolbox/util/workflows/templates.py b/exasol/toolbox/util/workflows/templates.py index b854e09c7..fa1cdf86c 100644 --- a/exasol/toolbox/util/workflows/templates.py +++ b/exasol/toolbox/util/workflows/templates.py @@ -7,7 +7,7 @@ from exasol.toolbox.util.workflows.exceptions import InvalidWorkflowNameError WORKFLOW_TEMPLATES_DIRECTORY = "exasol.toolbox.templates.github.workflows" -NOT_MAINTAINED_WORKFLOW_NAMES: Final[list[str]] = ["slow-checks"] +CUSTOM_SEEDED_WORKFLOW_NAMES: Final[list[str]] = ["slow-checks"] DOCUMENTATION_ONLY_WORKFLOW_NAMES: Final[list[str]] = ["gh-pages", "pr-merge"] @@ -23,18 +23,18 @@ def get_workflow_templates() -> Mapping[str, Path]: if workflow_path.is_file() and workflow_path.name.endswith(".yml") and (workflow_name := workflow_path.name.removesuffix(".yml")) - not in NOT_MAINTAINED_WORKFLOW_NAMES + not in CUSTOM_SEEDED_WORKFLOW_NAMES } -def get_not_maintained_workflow_templates() -> Mapping[str, Path]: +def get_custom_seeded_workflow_names() -> Mapping[str, Path]: """ - A mapping of not-maintained workflow template names to paths. + A mapping of custom seeded workflow template names to paths. """ package_resources = resources.files(WORKFLOW_TEMPLATES_DIRECTORY) return { workflow_name: Path(str(package_resources / f"{workflow_name}.yml")) - for workflow_name in NOT_MAINTAINED_WORKFLOW_NAMES + for workflow_name in CUSTOM_SEEDED_WORKFLOW_NAMES } diff --git a/exasol/toolbox/util/workflows/workflow_orchestrator.py b/exasol/toolbox/util/workflows/workflow_orchestrator.py index 6e630b298..253f1c784 100644 --- a/exasol/toolbox/util/workflows/workflow_orchestrator.py +++ b/exasol/toolbox/util/workflows/workflow_orchestrator.py @@ -26,7 +26,7 @@ from exasol.toolbox.util.workflows.templates import ( DOCUMENTATION_ONLY_WORKFLOW_NAMES, WORKFLOW_TEMPLATE_OPTIONS, - get_not_maintained_workflow_templates, + get_custom_seeded_workflow_names, ) from exasol.toolbox.util.workflows.workflow import Workflow @@ -108,8 +108,8 @@ def _load_workflow( def _skip_workflow(self, workflow_name: str) -> bool: """ - Return ``True`` if the workflow should be skipped because it is not maintained - by the PTB or not applicable to the current project, otherwise return ``False``. + Return ``True`` if the workflow should be skipped because it is not applicable + to the current project, otherwise return ``False``. """ if ( workflow_name in DOCUMENTATION_ONLY_WORKFLOW_NAMES @@ -127,12 +127,12 @@ def generate_workflows(self) -> None: """ Render the selected workflows and write them to disk. """ - # First, generate not-maintained workflows for a new project. + # First, generate custom seeded workflows for a new project. # This ensures proper extraction and passing of secrets & permissions # before parent workflows such as `merge-gate.yml` and # `periodic-validation.yml` are rendered. if self._is_new_project() and self.workflow_choice == ALL: - not_maintainted_templates = get_not_maintained_workflow_templates() + not_maintainted_templates = get_custom_seeded_workflow_names() for workflow in self._iter_workflows(not_maintainted_templates): workflow.write_to_file() diff --git a/project-template/cookiecutter.json b/project-template/cookiecutter.json index bd994bfe4..7bf8bddec 100644 --- a/project-template/cookiecutter.json +++ b/project-template/cookiecutter.json @@ -9,7 +9,7 @@ "author_email": "opensource@exasol.com", "project_short_tag": "", "python_version_min": "3.10", - "exasol_toolbox_version_range": ">=10.2.1,<11", + "exasol_toolbox_version_range": ">=10.3.0,<11", "license_year": "{% now 'utc', '%Y' %}", "__repo_name_slug": "{{cookiecutter.package_name}}", "__package_name_slug": "{{cookiecutter.package_name}}", diff --git a/pyproject.toml b/pyproject.toml index 705eaa836..e735df889 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "exasol-toolbox" -version = "10.2.1" +version = "10.3.0" description = "Your one-stop solution for managing all standard tasks and core workflows of your Python project." authors = [ { name = "Nicola Coretti", email = "nicola.coretti@exasol.com" }, diff --git a/test/unit/util/workflows/templates_test.py b/test/unit/util/workflows/templates_test.py index ab2679203..4fdaa865a 100644 --- a/test/unit/util/workflows/templates_test.py +++ b/test/unit/util/workflows/templates_test.py @@ -2,7 +2,7 @@ from exasol.toolbox.util.workflows.exceptions import InvalidWorkflowNameError from exasol.toolbox.util.workflows.templates import ( - NOT_MAINTAINED_WORKFLOW_NAMES, + CUSTOM_SEEDED_WORKFLOW_NAMES, WORKFLOW_TEMPLATE_OPTIONS, get_workflow_templates, validate_workflow_name, @@ -43,7 +43,7 @@ class TestValidateWorkflowName: @staticmethod @pytest.mark.parametrize( "workflow_name", - WORKFLOW_TEMPLATE_OPTIONS.keys() - set(NOT_MAINTAINED_WORKFLOW_NAMES), + WORKFLOW_TEMPLATE_OPTIONS.keys() - set(CUSTOM_SEEDED_WORKFLOW_NAMES), ) def test_returns_valid_maintained_names(workflow_name): name = validate_workflow_name(workflow_name) diff --git a/test/unit/util/workflows/workflow_orchestrator_test.py b/test/unit/util/workflows/workflow_orchestrator_test.py index e7b5ceff2..d79494419 100644 --- a/test/unit/util/workflows/workflow_orchestrator_test.py +++ b/test/unit/util/workflows/workflow_orchestrator_test.py @@ -10,8 +10,8 @@ YamlJobValueError, ) from exasol.toolbox.util.workflows.templates import ( + CUSTOM_SEEDED_WORKFLOW_NAMES, DOCUMENTATION_ONLY_WORKFLOW_NAMES, - NOT_MAINTAINED_WORKFLOW_NAMES, WORKFLOW_TEMPLATE_OPTIONS, ) from exasol.toolbox.util.workflows.workflow import Workflow @@ -222,7 +222,7 @@ def test_writes_all_workflows_on_fresh_project(project_config_without_patcher): ) @staticmethod - def test_writes_not_maintained_workflows_on_fresh_project( + def test_writes_custom_seeded_workflows_on_fresh_project( project_config_without_patcher, ): directory = project_config_without_patcher.github_workflow_directory @@ -235,7 +235,7 @@ def test_writes_not_maintained_workflows_on_fresh_project( assert all( (directory / f"{name}.yml").exists() - for name in NOT_MAINTAINED_WORKFLOW_NAMES + for name in CUSTOM_SEEDED_WORKFLOW_NAMES ) @staticmethod