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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,4 @@ jobs:
DATADIFF_CLICKHOUSE_URI: "clickhouse://clickhouse:Password1@localhost:9000/clickhouse"
run: |
uv run pytest tests/ \
-o addopts="--timeout=300 --tb=short" \
--ignore=tests/test_database_types.py \
--ignore=tests/test_dbt_config_validators.py \
--ignore=tests/test_main.py
-o addopts="--timeout=300 --tb=short"
5 changes: 1 addition & 4 deletions .github/workflows/ci_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ jobs:
DATADIFF_CLICKHOUSE_URI: "clickhouse://clickhouse:Password1@localhost:9000/clickhouse"
run: |
uv run pytest tests/ \
-o addopts="--timeout=300 --tb=short" \
--ignore=tests/test_database_types.py \
--ignore=tests/test_dbt_config_validators.py \
--ignore=tests/test_main.py
-o addopts="--timeout=300 --tb=short"
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ test-unit:
## export DATADIFF_VERTICA_URI="vertica://vertica:Password1@localhost:5433/vertica"
test: up
uv run pytest tests/ \
-o addopts="--timeout=300 --tb=short" \
--ignore=tests/test_database_types.py \
--ignore=tests/test_dbt_config_validators.py \
--ignore=tests/test_main.py
-o addopts="--timeout=300 --tb=short"

## Run data-diff against seed data to showcase diffing
demo: up
Expand Down
6 changes: 3 additions & 3 deletions data_diff/dbt_config_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
class ManifestJsonConfig(BaseModel):
class Metadata(BaseModel):
dbt_version: str = Field(..., pattern=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$")
project_id: str | None
user_id: str | None
project_id: str | None = None
user_id: str | None = None

class Nodes(BaseModel):
class Config(BaseModel):
Expand Down Expand Up @@ -38,7 +38,7 @@ class DependsOn(BaseModel):
meta: dict[str, Any]
config: Config
tags: list[str]
test_metadata: TestMetadata | None
test_metadata: TestMetadata | None = None
depends_on: DependsOn

metadata: Metadata
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dbt_config_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_run_results(self):
for version in versions:
with self.subTest(version=version):
with open(Path(RUN_RESULTS_PATH, f"run_results_{version}.json"), encoding="utf-8") as run_results:
RunResultsJsonConfig.parse_obj(json.load(run_results))
RunResultsJsonConfig.model_validate(json.load(run_results))


class TestManifestJsonConfig(unittest.TestCase):
Expand All @@ -30,4 +30,4 @@ def test_manifest(self):
for version in versions:
with self.subTest(version=version):
with open(Path(MANIFEST_PATH, f"manifest_{version}.json"), encoding="utf-8") as manifest:
ManifestJsonConfig.parse_obj(json.load(manifest))
ManifestJsonConfig.model_validate(json.load(manifest))
Loading