From 8c832630bb5dc76c59d30227fed91ad5384df57d Mon Sep 17 00:00:00 2001 From: Damian Owsianny Date: Fri, 5 Apr 2024 12:30:48 +0200 Subject: [PATCH 1/4] Add dbt-core as convenience dep --- .changes/unreleased/Dependencies-20240405-122927.yaml | 7 +++++++ dev_requirements.txt | 1 - setup.py | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/Dependencies-20240405-122927.yaml diff --git a/.changes/unreleased/Dependencies-20240405-122927.yaml b/.changes/unreleased/Dependencies-20240405-122927.yaml new file mode 100644 index 00000000..38c9948b --- /dev/null +++ b/.changes/unreleased/Dependencies-20240405-122927.yaml @@ -0,0 +1,7 @@ +kind: Dependencies +body: Add `dbt-core` as a dependency to preserve backwards compatibility for installation +time: 2024-04-05T12:29:27.647437+02:00 +custom: + Author: damian3031 + Issue: "387" + PR: "393" diff --git a/dev_requirements.txt b/dev_requirements.txt index 06551ea1..3af6541f 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,4 +1,3 @@ -dbt-core~=1.8.0b1 dbt-tests-adapter~=1.8.0b1 mypy==1.8.0 # patch updates have historically introduced breaking changes pre-commit~=3.6 diff --git a/setup.py b/setup.py index dcd564a3..e381f622 100644 --- a/setup.py +++ b/setup.py @@ -76,9 +76,11 @@ def _dbt_trino_version(): ] }, install_requires=[ - "dbt-common>=1.0.0b1,<2.0", - "dbt-adapters>=1.0.0b1,<2.0", + "dbt-common>=1.0.0,<2.0", + "dbt-adapters>=1.0.0,<2.0", "trino~=0.326", + # add dbt-core to ensure backwards compatibility of installation, this is not a functional dependency + "dbt-core>=1.8.0b2", ], zip_safe=False, classifiers=[ From f9497e8da87faee3684ed2002d13da24295914ca Mon Sep 17 00:00:00 2001 From: Damian Owsianny Date: Mon, 8 Apr 2024 13:44:25 +0200 Subject: [PATCH 2/4] Support all types for unit testing --- .../unreleased/Features-20240405-174603.yaml | 7 ++++ .../adapter/unit_testing/test_unit_testing.py | 33 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .changes/unreleased/Features-20240405-174603.yaml create mode 100644 tests/functional/adapter/unit_testing/test_unit_testing.py diff --git a/.changes/unreleased/Features-20240405-174603.yaml b/.changes/unreleased/Features-20240405-174603.yaml new file mode 100644 index 00000000..b8d4801f --- /dev/null +++ b/.changes/unreleased/Features-20240405-174603.yaml @@ -0,0 +1,7 @@ +kind: Features +body: Support all types for unit testing +time: 2024-04-05T17:46:03.480018+02:00 +custom: + Author: damian3031 + Issue: "391" + PR: "393" diff --git a/tests/functional/adapter/unit_testing/test_unit_testing.py b/tests/functional/adapter/unit_testing/test_unit_testing.py new file mode 100644 index 00000000..cd0d7411 --- /dev/null +++ b/tests/functional/adapter/unit_testing/test_unit_testing.py @@ -0,0 +1,33 @@ +import pytest +from dbt.tests.adapter.unit_testing.test_case_insensitivity import ( + BaseUnitTestCaseInsensivity, +) +from dbt.tests.adapter.unit_testing.test_invalid_input import BaseUnitTestInvalidInput +from dbt.tests.adapter.unit_testing.test_types import BaseUnitTestingTypes + + +class TestTrinoUnitTestingTypes(BaseUnitTestingTypes): + @pytest.fixture + def data_types(self): + # sql_value, yaml_value + return [ + ["1", "1"], + ["'1'", "1"], + ["true", "true"], + ["DATE '2020-01-02'", "2020-01-02"], + ["TIMESTAMP '2013-11-03 00:00:00'", "2013-11-03 00:00:00"], + ["TIMESTAMP '2013-11-03 00:00:00-0'", "2013-11-03 00:00:00-0"], + ["DECIMAL '1'", "1"], + [ + """JSON '{"bar": "baz", "balance": 7.77, "active": false}'""", + """'{"bar": "baz", "balance": 7.77, "active": false}'""", + ], + ] + + +class TestTrinoUnitTestCaseInsensitivity(BaseUnitTestCaseInsensivity): + pass + + +class TestTrinoUnitTestInvalidInput(BaseUnitTestInvalidInput): + pass From 8427115fec540d59f8d34bb8dabdf9df4f0a4d98 Mon Sep 17 00:00:00 2001 From: Damian Owsianny Date: Mon, 8 Apr 2024 13:51:13 +0200 Subject: [PATCH 3/4] Add tests for --empty flag --- .changes/unreleased/Under the Hood-20240408-134750.yaml | 7 +++++++ tests/functional/adapter/empty/test_empty.py | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20240408-134750.yaml create mode 100644 tests/functional/adapter/empty/test_empty.py diff --git a/.changes/unreleased/Under the Hood-20240408-134750.yaml b/.changes/unreleased/Under the Hood-20240408-134750.yaml new file mode 100644 index 00000000..2fbf15c1 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240408-134750.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: Add tests for --empty flag +time: 2024-04-08T13:47:50.027069+02:00 +custom: + Author: damian3031 + Issue: "391" + PR: "393" diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/adapter/empty/test_empty.py new file mode 100644 index 00000000..d76a83d5 --- /dev/null +++ b/tests/functional/adapter/empty/test_empty.py @@ -0,0 +1,5 @@ +from dbt.tests.adapter.empty.test_empty import BaseTestEmpty + + +class TestTrinoEmpty(BaseTestEmpty): + pass From a75a1cec0acd7105d82f43bbe5abdd400759e3aa Mon Sep 17 00:00:00 2001 From: Damian Owsianny Date: Mon, 8 Apr 2024 14:36:42 +0200 Subject: [PATCH 4/4] Bumping version to 1.8.0b2 and generate CHANGELOG --- .changes/1.8.0-b2.md | 10 ++++++++++ .../Dependencies-20240405-122927.yaml | 0 .../Features-20240405-174603.yaml | 0 .../Under the Hood-20240408-134750.yaml | 0 CHANGELOG.md | 10 ++++++++++ dbt/adapters/trino/__version__.py | 2 +- 6 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .changes/1.8.0-b2.md rename .changes/{unreleased => 1.8.0}/Dependencies-20240405-122927.yaml (100%) rename .changes/{unreleased => 1.8.0}/Features-20240405-174603.yaml (100%) rename .changes/{unreleased => 1.8.0}/Under the Hood-20240408-134750.yaml (100%) diff --git a/.changes/1.8.0-b2.md b/.changes/1.8.0-b2.md new file mode 100644 index 00000000..3e51523a --- /dev/null +++ b/.changes/1.8.0-b2.md @@ -0,0 +1,10 @@ +## dbt-trino 1.8.0-b2 - April 08, 2024 +### Features +- Support all types for unit testing ([#391](https://github.com/starburstdata/dbt-trino/issues/391), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) +### Under the Hood +- Add tests for --empty flag ([#391](https://github.com/starburstdata/dbt-trino/issues/391), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) +### Dependencies +- Add `dbt-core` as a dependency to preserve backwards compatibility for installation ([#387](https://github.com/starburstdata/dbt-trino/issues/387), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) + +### Contributors +- [@damian3031](https://github.com/damian3031) ([#393](https://github.com/starburstdata/dbt-trino/pull/393), [#393](https://github.com/starburstdata/dbt-trino/pull/393), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) diff --git a/.changes/unreleased/Dependencies-20240405-122927.yaml b/.changes/1.8.0/Dependencies-20240405-122927.yaml similarity index 100% rename from .changes/unreleased/Dependencies-20240405-122927.yaml rename to .changes/1.8.0/Dependencies-20240405-122927.yaml diff --git a/.changes/unreleased/Features-20240405-174603.yaml b/.changes/1.8.0/Features-20240405-174603.yaml similarity index 100% rename from .changes/unreleased/Features-20240405-174603.yaml rename to .changes/1.8.0/Features-20240405-174603.yaml diff --git a/.changes/unreleased/Under the Hood-20240408-134750.yaml b/.changes/1.8.0/Under the Hood-20240408-134750.yaml similarity index 100% rename from .changes/unreleased/Under the Hood-20240408-134750.yaml rename to .changes/1.8.0/Under the Hood-20240408-134750.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 57892287..77a51452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ - Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases. - "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version. - Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/starburstdata/dbt-trino/blob/master/CONTRIBUTING.md#adding-changelog-entry) +## dbt-trino 1.8.0-b2 - April 08, 2024 +### Features +- Support all types for unit testing ([#391](https://github.com/starburstdata/dbt-trino/issues/391), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) +### Under the Hood +- Add tests for --empty flag ([#391](https://github.com/starburstdata/dbt-trino/issues/391), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) +### Dependencies +- Add `dbt-core` as a dependency to preserve backwards compatibility for installation ([#387](https://github.com/starburstdata/dbt-trino/issues/387), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) + +### Contributors +- [@damian3031](https://github.com/damian3031) ([#393](https://github.com/starburstdata/dbt-trino/pull/393), [#393](https://github.com/starburstdata/dbt-trino/pull/393), [#393](https://github.com/starburstdata/dbt-trino/pull/393)) ## dbt-trino 1.8.0-b1 - March 12, 2024 ### Under the Hood - Add tests against Python 3.12 ([#383](https://github.com/starburstdata/dbt-trino/pull/383)) diff --git a/dbt/adapters/trino/__version__.py b/dbt/adapters/trino/__version__.py index 6496f3e2..7d16c28f 100644 --- a/dbt/adapters/trino/__version__.py +++ b/dbt/adapters/trino/__version__.py @@ -1 +1 @@ -version = "1.8.0b1" +version = "1.8.0b2"