-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to dbt-common + dbt-adapters #342
Changes from all commits
1e25859
86eface
2d36968
3ad787e
d4d5939
10034b3
5712711
af5f989
9c8113a
80b709d
b8fdca0
6527752
9a0ba02
6dcc39c
5f594c4
8511b94
0750e0c
a85cef9
298f27c
08d5530
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,11 @@ def _dbt_duckdb_version(): | |
packages=find_namespace_packages(include=["dbt", "dbt.*"]), | ||
include_package_data=True, | ||
install_requires=[ | ||
"dbt-core~=1.7.0", | ||
"dbt-common>=1,<2", | ||
"dbt-adapters>=1,<2", | ||
"duckdb>=0.7.0", | ||
# add dbt-core to ensure backwards compatibility of installation, this is not a functional dependency | ||
"dbt-core>=1.8.0b1", | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though
|
||
], | ||
extras_require={"glue": ["boto3", "mypy-boto3-glue"], "md": ["duckdb>=0.10.2"]}, | ||
classifiers=[ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import pytest | ||
|
||
from dbt.tests.adapter.unit_testing.test_types import BaseUnitTestingTypes | ||
from dbt.tests.adapter.unit_testing.test_case_insensitivity import BaseUnitTestCaseInsensivity | ||
from dbt.tests.adapter.unit_testing.test_invalid_input import BaseUnitTestInvalidInput | ||
|
||
|
||
@pytest.mark.skip_profile("buenavista") | ||
class TestUnitTestingTypesDuckDB(BaseUnitTestingTypes): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jwills I pulled these in (selfishly), since it seemed like unit testing might "just work" on It's all well & good on the Real Duck, but it looks like the test is failing on BuenaVista for the last data type in the list (
How would you feel about me adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that’s just because I don’t properly support array types in the BV Postgres serialization, so it’s perfectly understandable and okay to mark it as skipped |
||
@pytest.fixture | ||
def data_types(self): | ||
# sql_value, yaml_value | ||
return [ | ||
["1", "1"], | ||
["2.0", "2.0"], | ||
["'12345'", "12345"], | ||
["'string'", "string"], | ||
["true", "true"], | ||
["DATE '2020-01-02'", "2020-01-02"], | ||
["TIMESTAMP '2013-11-03 00:00:00-0'", "2013-11-03 00:00:00-0"], | ||
["'2013-11-03 00:00:00-0'::TIMESTAMPTZ", "2013-11-03 00:00:00-0"], | ||
[ | ||
"{'Alberta':'Edmonton','Manitoba':'Winnipeg'}", | ||
"{'Alberta':'Edmonton','Manitoba':'Winnipeg'}", | ||
], | ||
["ARRAY['a','b','c']", "['a','b','c']"], | ||
["ARRAY[1,2,3]", "[1, 2, 3]"], | ||
] | ||
|
||
|
||
class TestUnitTestCaseInsensitivityDuckDB(BaseUnitTestCaseInsensivity): | ||
pass | ||
|
||
|
||
class TestUnitTestInvalidInputDuckDB(BaseUnitTestInvalidInput): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the safest since our usage of this config object is pretty much limited to
get
methods