Skip to content

Commit 704bae4

Browse files
authored
Merge pull request #12 from coinlist/updated-pydantic
upgrade pydantic 2 The prefect worker now uses 3.0 version and i am tying that to latest versions of pydantic rather than keep it with a downgraded version that will not be supported. This goes into pipo.
2 parents 1641ef5 + c2d85de commit 704bae4

File tree

5 files changed

+150
-165
lines changed

5 files changed

+150
-165
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
matrix:
1212
os: [ubuntu-latest]
1313
python-version:
14-
- "3.8"
1514
- "3.9"
1615
- "3.10"
1716
- "3.11"

data_diff/dbt.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ def dbt_diff(
114114

115115
futures = {}
116116

117-
with log_status_handler.status if log_status_handler else nullcontext(), ThreadPoolExecutor(
118-
max_workers=dbt_parser.threads
119-
) as executor:
117+
with (
118+
log_status_handler.status if log_status_handler else nullcontext(),
119+
ThreadPoolExecutor(max_workers=dbt_parser.threads) as executor,
120+
):
120121
for model in models:
121122
if log_status_handler:
122123
log_status_handler.set_prefix(f"Diffing {model.alias} \n")

data_diff/dbt_config_validators.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
class ManifestJsonConfig(BaseModel):
77
class Metadata(BaseModel):
8-
dbt_version: str = Field(..., regex=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$")
9-
project_id: Optional[str]
10-
user_id: Optional[str]
8+
dbt_version: str = Field(..., pattern=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$")
9+
project_id: Optional[str] = None
10+
user_id: Optional[str] = None
1111

1212
class Nodes(BaseModel):
1313
class Config(BaseModel):
@@ -37,7 +37,7 @@ class DependsOn(BaseModel):
3737
meta: Dict[str, Any]
3838
config: Config
3939
tags: List[str]
40-
test_metadata: Optional[TestMetadata]
40+
test_metadata: Optional[TestMetadata] = None
4141
depends_on: DependsOn
4242

4343
metadata: Metadata
@@ -46,7 +46,7 @@ class DependsOn(BaseModel):
4646

4747
class RunResultsJsonConfig(BaseModel):
4848
class Metadata(BaseModel):
49-
dbt_version: str = Field(..., regex=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$")
49+
dbt_version: str = Field(..., pattern=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$")
5050

5151
class Results(BaseModel):
5252
class Status(Enum):

0 commit comments

Comments
 (0)