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
42 changes: 40 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
airflow-version: ["2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "3.0", "3.1"]
dbt-version: ["1.10"]
exclude:
Expand All @@ -76,6 +76,25 @@ jobs:
airflow-version: "2.7"
- python-version: "3.12"
airflow-version: "2.8"
# Apache Airflow versions prior to 3.1.0 have not been tested with Python 3.13.
- python-version: "3.13"
airflow-version: "2.4"
- python-version: "3.13"
airflow-version: "2.5"
- python-version: "3.13"
airflow-version: "2.6"
- python-version: "3.13"
airflow-version: "2.7"
- python-version: "3.13"
airflow-version: "2.8"
- python-version: "3.13"
airflow-version: "2.9"
- python-version: "3.13"
airflow-version: "2.10"
- python-version: "3.13"
airflow-version: "2.11"
- python-version: "3.13"
airflow-version: "3.0"
Comment thread
pankajastro marked this conversation as resolved.
steps:
- uses: actions/checkout@v6.0.0
with:
Expand Down Expand Up @@ -119,14 +138,33 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.13"]
airflow-version: ["2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "3.0", "3.1"]
dbt-version: ["1.10"]
exclude:
- python-version: "3.11"
airflow-version: "2.4"
- python-version: "3.11"
airflow-version: "2.5"
# Apache Airflow versions prior to 3.1.0 have not been tested with Python 3.13.
- python-version: "3.13"
airflow-version: "2.4"
- python-version: "3.13"
airflow-version: "2.5"
- python-version: "3.13"
airflow-version: "2.6"
- python-version: "3.13"
airflow-version: "2.7"
- python-version: "3.13"
airflow-version: "2.8"
- python-version: "3.13"
airflow-version: "2.9"
- python-version: "3.13"
airflow-version: "2.10"
- python-version: "3.13"
airflow-version: "2.11"
- python-version: "3.13"
airflow-version: "3.0"
Comment thread
pankajastro marked this conversation as resolved.
services:
postgres:
image: postgres@sha256:4cd697181d4bd3ddc41a09012f339fa8cb5a8cd3d8b30130ea8378c176b6c494 # 14.18
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"aenum",
Expand Down Expand Up @@ -167,7 +168,7 @@ dependencies = [
pre-install-commands = ["sh scripts/test/pre-install-airflow.sh {matrix:airflow} {matrix:python}"]

[[tool.hatch.envs.tests.matrix]]
python = ["3.10", "3.11", "3.12"]
python = ["3.10", "3.11", "3.12", "3.13"]
airflow = ["2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "3.0", "3.1"]
dbt = ["1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "2.0"]

Expand Down Expand Up @@ -227,7 +228,7 @@ serve = "sphinx-autobuild docs docs/_build"
######################################
[tool.black]
line-length = 120
target-version = ['py310', 'py311', 'py312']
target-version = ["py310", "py311", "py312", "py313"]

[tool.isort]
profile = "black"
Expand Down
30 changes: 9 additions & 21 deletions tests/operators/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,17 @@
)


@pytest.mark.skipif(
(sys.version_info.major, sys.version_info.minor) == (3, 12),
reason="The error message for the abstract class instantiation seems to have changed between Python 3.11 and 3.12",
)
def test_dbt_base_is_abstract():
"""Tests that the abstract base operator cannot be instantiated since the base_cmd is not defined."""
expected_error = (
"Can't instantiate abstract class AbstractDbtBase with abstract methods base_cmd, build_and_run_cmd"
)
with pytest.raises(TypeError, match=expected_error):
AbstractDbtBase(project_dir="project_dir")
if sys.version_info >= (3, 12):
expected_error = (
"Can't instantiate abstract class AbstractDbtBase without an implementation for abstract methods "
"'base_cmd', 'build_and_run_cmd'"
)
else:
expected_error = (
"Can't instantiate abstract class AbstractDbtBase with abstract methods base_cmd, build_and_run_cmd"
)


@pytest.mark.skipif(
(sys.version_info.major, sys.version_info.minor) != (3, 12),
reason="The error message for the abstract class instantiation seems to have changed between Python 3.11 and 3.12",
)
def test_dbt_base_operator_is_abstract_py12():
"""Tests that the abstract base operator cannot be instantiated since the base_cmd is not defined."""
expected_error = (
"Can't instantiate abstract class AbstractDbtBase without an implementation for abstract methods "
"'base_cmd', 'build_and_run_cmd'"
)
with pytest.raises(TypeError, match=expected_error):
AbstractDbtBase(project_dir="project_dir")

Expand Down
Loading