From 929b2b08753602d5181af6dcee268de0ba2d2971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 1 Oct 2024 21:01:54 -0600 Subject: [PATCH] Test with dbt-core prereleases --- dbt/adapters/duckdb/plugins/excel.py | 4 +++- tests/conftest.py | 9 +++++++++ tox.ini | 12 ++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dbt/adapters/duckdb/plugins/excel.py b/dbt/adapters/duckdb/plugins/excel.py index 2f5ac0f8..4a4e7ed5 100644 --- a/dbt/adapters/duckdb/plugins/excel.py +++ b/dbt/adapters/duckdb/plugins/excel.py @@ -11,7 +11,9 @@ from . import pd_utils from ..utils import SourceConfig from ..utils import TargetConfig -from dbt.logger import GLOBAL_LOGGER as logger +from dbt.adapters.events.logging import AdapterLogger + +logger = AdapterLogger("DuckDB") class Plugin(BasePlugin): diff --git a/tests/conftest.py b/tests/conftest.py index b972052e..27891c50 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,7 @@ import resource import subprocess import time +from importlib import metadata import duckdb import pytest @@ -23,6 +24,14 @@ def pytest_addoption(parser): parser.addoption("--profile", action="store", default="memory", type=str) +def pytest_report_header() -> list[str]: + """Return a list of strings to be displayed in the header of the report.""" + return [ + f"duckdb: {metadata.version('duckdb')}", + f"dbt-core: {metadata.version('dbt-core')}", + ] + + @pytest.fixture(scope="session") def profile_type(request): return request.config.getoption("--profile") diff --git a/tox.ini b/tox.ini index 8f775822..d87bac25 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] skipsdist = True -envlist = py38,py39,py310,py311 +envlist = py{38,39,310,311,312} -[testenv:{unit,py38,py39,py310,py311,py}] +[testenv:{unit,py38,py39,py310,py311,py312,py}] description = unit testing skip_install = True passenv = * @@ -12,7 +12,7 @@ deps = -e. -[testenv:{functional,py38,py39,py310,py311,py}] +[testenv:{functional,py38,py39,py310,py311,py312,py}] description = adapter functional testing skip_install = True passenv = * @@ -21,7 +21,7 @@ deps = -rdev-requirements.txt -e. -[testenv:{filebased,py38,py39,py310,py311,py}] +[testenv:{filebased,py38,py39,py310,py311,py312,py}] description = adapter functional testing using file-based DBs skip_install = True passenv = * @@ -48,7 +48,7 @@ deps = -rdev-requirements.txt -e.[md] -[testenv:{fsspec,py38,py39,py310,py311,py}] +[testenv:{fsspec,py38,py39,py310,py311,py312,py}] description = adapter fsspec testing skip_install = True passenv = * @@ -57,7 +57,7 @@ deps = -rdev-requirements.txt -e. -[testenv:{plugins,py38,py39,py310,py311,py}] +[testenv:{plugins,py38,py39,py310,py311,py312,py}] description = adapter plugin testing skip_install = True passenv = *