Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ these workflows in your project until you transition fully to using `matrix.yml`
* #730: Added support to extend GitHub workflow `cd.yml`
* #864: Modified PTB workflow templates to not persist credentials and to use pinned SHAs
* #654: Added and used general matrix `matrix.yml` for PTB-provided workflows

## Refactoring

* #682: Modified PTB exasol_versions to an empty list
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ The PTB has a default for these versions, but you can override it in the
.. code-block:: python

PROJECT_CONFIG = Config(
# This tuple should never be empty.
python_versions=("3.10", "3.12),
# This tuple may be empty, as not all projects will need an on-prem Exasol database.
exasol_versions=("7.1.30", "8.29.13", "2025.1.8"),
)

Expand Down
4 changes: 2 additions & 2 deletions exasol/toolbox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ class BaseConfig(BaseModel):
root_path: Path = Field(description="Root directory of the project")
python_versions: tuple[ValidVersionStr, ...] = Field(
default=("3.10", "3.11", "3.12", "3.13", "3.14"),
min_length=1,
description="Python versions to use in running CI workflows",
)

exasol_versions: tuple[ValidVersionStr, ...] = Field(
default=("7.1.30", "8.29.13", "2025.1.8"),
default=("8.29.13", "2025.1.8"),
description="Exasol versions to use in running CI workflows for integration tests using the DB",
)
create_major_version_tags: bool = Field(
Expand Down
5 changes: 2 additions & 3 deletions noxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def importlinter(self) -> Path:
".github/actions/python-environment/ext/get_poetry.py",
),
create_major_version_tags=True,
# The PTB does not have integration tests run with an Exasol DB,
# so for running in the CI, we take the first element.
exasol_versions=("7.1.30",),
# The PTB does not have integration tests running with an Exasol DB.
exasol_versions=(),
plugins_for_nox_sessions=(UpdateTemplates,),
)
7 changes: 6 additions & 1 deletion test/unit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_works_as_defined(tmp_path, test_project_config_factory):
"create_major_version_tags": False,
"dependency_manager": {"name": "poetry", "version": "2.3.0"},
"documentation_path": root_path / "doc",
"exasol_versions": ("7.1.30", "8.29.13", "2025.1.8"),
"exasol_versions": ("8.29.13", "2025.1.8"),
"excluded_python_paths": expand_paths(config, DEFAULT_EXCLUDED_PATHS),
"github_workflow_directory": tmp_path / ".github" / "workflows",
"github_workflow_patcher_yaml": None,
Expand Down Expand Up @@ -81,6 +81,11 @@ def test_works_as_defined(tmp_path, test_project_config_factory):
@pytest.mark.parametrize(
"wrong_input,expected_message",
[
pytest.param(
{"python_versions": []},
"at least 1 item",
id="python_versions_empty",
),
pytest.param(
{"python_versions": ["1.2.3.1"]},
"Version has an invalid format",
Expand Down
6 changes: 2 additions & 4 deletions test/unit/nox/_matrix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def test_exasol_session_still_emits_field_names(
exasol_matrix(nox_session)

captured = capsys.readouterr()
assert json.loads(captured.out) == {
"exasol-version": ["7.1.30", "8.29.13", "2025.1.8"]
}
assert json.loads(captured.out) == {"exasol-version": ["8.29.13", "2025.1.8"]}
assert len(caplog.messages) == 1

@staticmethod
Expand All @@ -131,6 +129,6 @@ def test_full_session_still_emits_field_names(nox_session, config, caplog, capsy
captured = capsys.readouterr()
assert json.loads(captured.out) == {
"python-version": ["3.10", "3.11", "3.12", "3.13", "3.14"],
"exasol-version": ["7.1.30", "8.29.13", "2025.1.8"],
"exasol-version": ["8.29.13", "2025.1.8"],
}
assert len(caplog.messages) == 1