From 0fb509cec38a37384c5114b0eaa41c2fbc52f6b4 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 23 Oct 2024 10:51:24 -0400 Subject: [PATCH 1/6] pin build dependencies to final releases --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9ad9bfa38..5d9d882e0 100644 --- a/setup.py +++ b/setup.py @@ -65,10 +65,10 @@ def _get_plugin_version_dict(): include_package_data=True, install_requires=[ "sqlparams>=3.0.0", - "dbt-common>=0.1.0a1,<2.0", - "dbt-adapters>=0.1.0a1,<2.0", + "dbt-common>=0.1.0,<2.0", + "dbt-adapters>=0.1.0,<2.0", # add dbt-core to ensure backwards compatibility of installation, this is not a functional dependency - "dbt-core>=1.8.0a1", + "dbt-core>=1.8.0", ], extras_require={ "ODBC": odbc_extras, From 9f115769e9fa48aa0d6db9e2c2f1421c34113052 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 23 Oct 2024 10:54:11 -0400 Subject: [PATCH 2/6] pin build dependencies to final releases --- .changes/unreleased/Fixes-20241023-105407.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixes-20241023-105407.yaml diff --git a/.changes/unreleased/Fixes-20241023-105407.yaml b/.changes/unreleased/Fixes-20241023-105407.yaml new file mode 100644 index 000000000..9c8c9b554 --- /dev/null +++ b/.changes/unreleased/Fixes-20241023-105407.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Pin build dependencies to final releases +time: 2024-10-23T10:54:07.142933-04:00 +custom: + Author: mikealfare + Issue: "1129" From e79b263a510d07718afc9d8c00b65625356bcf8d Mon Sep 17 00:00:00 2001 From: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:42:52 -0700 Subject: [PATCH 3/6] Cherry pick versioning from above to fix test --- tests/functional/adapter/test_python_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/adapter/test_python_model.py b/tests/functional/adapter/test_python_model.py index 05e25c5f4..c5905bee4 100644 --- a/tests/functional/adapter/test_python_model.py +++ b/tests/functional/adapter/test_python_model.py @@ -53,7 +53,7 @@ def model(dbt, spark): "ResourceClass": "SingleNode" } }, - packages=['spacy', 'torch', 'pydantic<1.10.3'] + packages=['spacy', 'torch', 'pydantic>=1.10.8', 'numpy<2'] ) data = [[1,2]] * 10 return spark.createDataFrame(data, schema=['test', 'test2']) From efbcb45f2aec8a8e40f584282412bc1f10c12d2d Mon Sep 17 00:00:00 2001 From: VersusFacit <67295367+VersusFacit@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:17:56 -0700 Subject: [PATCH 4/6] Try more dependencies --- tests/functional/adapter/test_python_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/adapter/test_python_model.py b/tests/functional/adapter/test_python_model.py index c5905bee4..998a511f3 100644 --- a/tests/functional/adapter/test_python_model.py +++ b/tests/functional/adapter/test_python_model.py @@ -53,7 +53,7 @@ def model(dbt, spark): "ResourceClass": "SingleNode" } }, - packages=['spacy', 'torch', 'pydantic>=1.10.8', 'numpy<2'] + packages=['spacy', 'torch', 'pydantic<1.10.3', 'numpy<1.2'] ) data = [[1,2]] * 10 return spark.createDataFrame(data, schema=['test', 'test2']) From fca3b560385d69436006220a44a2f2c573c4eb93 Mon Sep 17 00:00:00 2001 From: VersusFacit <67295367+VersusFacit@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:38:55 -0700 Subject: [PATCH 5/6] Other version attempt. --- tests/functional/adapter/test_python_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/adapter/test_python_model.py b/tests/functional/adapter/test_python_model.py index 998a511f3..85807ccfd 100644 --- a/tests/functional/adapter/test_python_model.py +++ b/tests/functional/adapter/test_python_model.py @@ -53,7 +53,7 @@ def model(dbt, spark): "ResourceClass": "SingleNode" } }, - packages=['spacy', 'torch', 'pydantic<1.10.3', 'numpy<1.2'] + packages=['spacy', 'torch', 'pydantic<1.10.3', 'numpy<1.20'] ) data = [[1,2]] * 10 return spark.createDataFrame(data, schema=['test', 'test2']) From 5bdc4d1dd9bf0d4556afc176037497d5e4cd32a5 Mon Sep 17 00:00:00 2001 From: VersusFacit <67295367+VersusFacit@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:05:17 -0700 Subject: [PATCH 6/6] remove the koalas fixture. --- tests/functional/adapter/test_python_model.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/functional/adapter/test_python_model.py b/tests/functional/adapter/test_python_model.py index 85807ccfd..70a74e0be 100644 --- a/tests/functional/adapter/test_python_model.py +++ b/tests/functional/adapter/test_python_model.py @@ -5,7 +5,12 @@ BasePythonModelTests, BasePythonIncrementalTests, ) -from dbt.tests.adapter.python_model.test_spark import BasePySparkTests +from dbt.tests.adapter.python_model.test_spark import ( + BasePySparkTests, + PANDAS_MODEL, + PANDAS_ON_SPARK_MODEL, + PYSPARK_MODEL, +) @pytest.mark.skip_profile("apache_spark", "spark_session", "databricks_sql_endpoint") @@ -15,7 +20,13 @@ class TestPythonModelSpark(BasePythonModelTests): @pytest.mark.skip_profile("apache_spark", "spark_session", "databricks_sql_endpoint") class TestPySpark(BasePySparkTests): - pass + @pytest.fixture(scope="class") + def models(self): + return { + "pandas_df.py": PANDAS_MODEL, + "pyspark_df.py": PYSPARK_MODEL, + "pandas_on_spark_df.py": PANDAS_ON_SPARK_MODEL, + } @pytest.mark.skip_profile("apache_spark", "spark_session", "databricks_sql_endpoint") @@ -53,7 +64,7 @@ def model(dbt, spark): "ResourceClass": "SingleNode" } }, - packages=['spacy', 'torch', 'pydantic<1.10.3', 'numpy<1.20'] + packages=['spacy', 'torch', 'pydantic<1.10.3'] ) data = [[1,2]] * 10 return spark.createDataFrame(data, schema=['test', 'test2'])