sqlmesh 0.184.4.dev7__py3-none-any.whl → 0.184.4.dev9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlmesh/_version.py +2 -2
- sqlmesh/cli/main.py +7 -0
- sqlmesh/core/test/definition.py +17 -14
- sqlmesh/core/test/result.py +12 -6
- sqlmesh/core/test/runner.py +4 -2
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/METADATA +1 -1
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/RECORD +11 -11
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/WHEEL +0 -0
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.184.4.dev7.dist-info → sqlmesh-0.184.4.dev9.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.184.4.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 184, 4, '
|
|
20
|
+
__version__ = version = '0.184.4.dev9'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 184, 4, 'dev9')
|
sqlmesh/cli/main.py
CHANGED
|
@@ -346,11 +346,13 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
|
|
|
346
346
|
"--skip-tests",
|
|
347
347
|
is_flag=True,
|
|
348
348
|
help="Skip tests prior to generating the plan if they are defined.",
|
|
349
|
+
default=None,
|
|
349
350
|
)
|
|
350
351
|
@click.option(
|
|
351
352
|
"--skip-linter",
|
|
352
353
|
is_flag=True,
|
|
353
354
|
help="Skip linting prior to generating the plan if the linter is enabled.",
|
|
355
|
+
default=None,
|
|
354
356
|
)
|
|
355
357
|
@click.option(
|
|
356
358
|
"--restate-model",
|
|
@@ -363,17 +365,20 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
|
|
|
363
365
|
"--no-gaps",
|
|
364
366
|
is_flag=True,
|
|
365
367
|
help="Ensure that new snapshots have no data gaps when comparing to existing snapshots for matching models in the target environment.",
|
|
368
|
+
default=None,
|
|
366
369
|
)
|
|
367
370
|
@click.option(
|
|
368
371
|
"--skip-backfill",
|
|
369
372
|
"--dry-run",
|
|
370
373
|
is_flag=True,
|
|
371
374
|
help="Skip the backfill step and only create a virtual update for the plan.",
|
|
375
|
+
default=None,
|
|
372
376
|
)
|
|
373
377
|
@click.option(
|
|
374
378
|
"--empty-backfill",
|
|
375
379
|
is_flag=True,
|
|
376
380
|
help="Produce empty backfill. Like --skip-backfill no models will be backfilled, unlike --skip-backfill missing intervals will be recorded as if they were backfilled.",
|
|
381
|
+
default=None,
|
|
377
382
|
)
|
|
378
383
|
@click.option(
|
|
379
384
|
"--forward-only",
|
|
@@ -439,6 +444,7 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
|
|
|
439
444
|
"--run",
|
|
440
445
|
is_flag=True,
|
|
441
446
|
help="Run latest intervals as part of the plan application (prod environment only).",
|
|
447
|
+
default=None,
|
|
442
448
|
)
|
|
443
449
|
@click.option(
|
|
444
450
|
"--enable-preview",
|
|
@@ -450,6 +456,7 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
|
|
|
450
456
|
"--diff-rendered",
|
|
451
457
|
is_flag=True,
|
|
452
458
|
help="Output text differences for the rendered versions of the models and standalone audits",
|
|
459
|
+
default=None,
|
|
453
460
|
)
|
|
454
461
|
@opt.verbose
|
|
455
462
|
@click.pass_context
|
sqlmesh/core/test/definition.py
CHANGED
|
@@ -349,18 +349,21 @@ class ModelTest(unittest.TestCase):
|
|
|
349
349
|
else:
|
|
350
350
|
_raise_error(f"Model '{name}' is an unsupported model type for testing", path)
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
352
|
+
try:
|
|
353
|
+
return test_type(
|
|
354
|
+
body,
|
|
355
|
+
test_name,
|
|
356
|
+
t.cast(Model, model),
|
|
357
|
+
models,
|
|
358
|
+
engine_adapter,
|
|
359
|
+
dialect,
|
|
360
|
+
path,
|
|
361
|
+
preserve_fixtures,
|
|
362
|
+
default_catalog,
|
|
363
|
+
concurrency,
|
|
364
|
+
)
|
|
365
|
+
except Exception as e:
|
|
366
|
+
raise TestError(f"Failed to create test {test_name} ({path})\n{str(e)}")
|
|
364
367
|
|
|
365
368
|
def __str__(self) -> str:
|
|
366
369
|
return f"{self.test_name} ({self.path})"
|
|
@@ -905,8 +908,8 @@ def _row_difference(left: pd.DataFrame, right: pd.DataFrame) -> pd.DataFrame:
|
|
|
905
908
|
|
|
906
909
|
def _raise_error(msg: str, path: Path | None = None) -> None:
|
|
907
910
|
if path:
|
|
908
|
-
raise TestError(f"
|
|
909
|
-
raise TestError(msg)
|
|
911
|
+
raise TestError(f"Failed to run test at {path}:\n{msg}")
|
|
912
|
+
raise TestError(f"Failed to run test:\n{msg}")
|
|
910
913
|
|
|
911
914
|
|
|
912
915
|
def _normalize_df_value(value: t.Any) -> t.Any:
|
sqlmesh/core/test/result.py
CHANGED
|
@@ -17,6 +17,8 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
17
17
|
def __init__(self, *args: t.Any, **kwargs: t.Any):
|
|
18
18
|
super().__init__(*args, **kwargs)
|
|
19
19
|
self.successes = []
|
|
20
|
+
self.original_failures: t.List[t.Tuple[unittest.TestCase, ErrorType]] = []
|
|
21
|
+
self.original_errors: t.List[t.Tuple[unittest.TestCase, ErrorType]] = []
|
|
20
22
|
|
|
21
23
|
def addSubTest(
|
|
22
24
|
self,
|
|
@@ -48,8 +50,9 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
48
50
|
test: The test case.
|
|
49
51
|
err: A tuple of the form returned by sys.exc_info(), i.e., (type, value, traceback).
|
|
50
52
|
"""
|
|
51
|
-
exctype, value,
|
|
52
|
-
self.
|
|
53
|
+
exctype, value, _ = err
|
|
54
|
+
self.original_failures.append((test, err))
|
|
55
|
+
# Intentionally ignore the traceback to hide it from the user
|
|
53
56
|
return super().addFailure(test, (exctype, value, None)) # type: ignore
|
|
54
57
|
|
|
55
58
|
def addError(self, test: unittest.TestCase, err: ErrorType) -> None:
|
|
@@ -59,8 +62,10 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
59
62
|
test: The test case.
|
|
60
63
|
err: A tuple of the form returned by sys.exc_info(), i.e., (type, value, traceback).
|
|
61
64
|
"""
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
exctype, value, _ = err
|
|
66
|
+
self.original_errors.append((test, err))
|
|
67
|
+
# Intentionally ignore the traceback to hide it from the user
|
|
68
|
+
return super().addError(test, (exctype, value, None)) # type: ignore
|
|
64
69
|
|
|
65
70
|
def addSuccess(self, test: unittest.TestCase) -> None:
|
|
66
71
|
"""Called when the test case test succeeds.
|
|
@@ -105,9 +110,10 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
105
110
|
stream.writeln(unittest.TextTestResult.separator2)
|
|
106
111
|
stream.writeln(failure)
|
|
107
112
|
|
|
108
|
-
for
|
|
113
|
+
for test_case, error in errors:
|
|
109
114
|
stream.writeln(unittest.TextTestResult.separator1)
|
|
110
|
-
stream.writeln(f"ERROR: {
|
|
115
|
+
stream.writeln(f"ERROR: {test_case}")
|
|
116
|
+
stream.writeln(error)
|
|
111
117
|
|
|
112
118
|
# Output final report
|
|
113
119
|
stream.writeln(unittest.TextTestResult.separator2)
|
sqlmesh/core/test/runner.py
CHANGED
|
@@ -150,9 +150,11 @@ def run_tests(
|
|
|
150
150
|
if result.successes:
|
|
151
151
|
combined_results.addSuccess(result.successes[0])
|
|
152
152
|
elif result.errors:
|
|
153
|
-
|
|
153
|
+
for error_test, error in result.original_errors:
|
|
154
|
+
combined_results.addError(error_test, error)
|
|
154
155
|
elif result.failures:
|
|
155
|
-
|
|
156
|
+
for failure_test, failure in result.original_failures:
|
|
157
|
+
combined_results.addFailure(failure_test, failure)
|
|
156
158
|
elif result.skipped:
|
|
157
159
|
skipped_args = result.skipped[0]
|
|
158
160
|
combined_results.addSkip(skipped_args[0], skipped_args[1])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=aTOiQWzzfFbriTqHwCIWtymZIsySsD1XJm4dEe1V6V4,528
|
|
3
3
|
sqlmesh/magics.py,sha256=aeOyTdeNnyGzGtJXECDAbqJ8OAplrV4UAYl0I2hhtig,39670
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -7,7 +7,7 @@ sqlmesh/cicd/bot.py,sha256=2zlbn-DXkqQzr3lA0__IGU4XaIfXBXBKLWXNI2DRJX8,759
|
|
|
7
7
|
sqlmesh/cicd/config.py,sha256=mpgkisSBBovlNrNZir2unT8Wes6b38RW2UsU_o4e8vY,109
|
|
8
8
|
sqlmesh/cli/__init__.py,sha256=MAXAyO7isbyM-PaSdFjkJNcjn32WjOl0XzxT5gvp_vo,1690
|
|
9
9
|
sqlmesh/cli/example_project.py,sha256=QAFQbw_kzqn30GLTthqsuWXbFDBpX8W6RsCgQ-jx65M,9308
|
|
10
|
-
sqlmesh/cli/main.py,sha256=
|
|
10
|
+
sqlmesh/cli/main.py,sha256=WNwiqXjbnlfr3ky159IXIMZWd1V4SNx1cZHjNSAyd9Q,32269
|
|
11
11
|
sqlmesh/cli/options.py,sha256=aC_L5WnMScKzMU55BD1Y-8R-QzqCkPSYrlCI-payHRA,1333
|
|
12
12
|
sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=e1f7xO2aZCy38M_3VoDy-XI3shyd99-IFctgIFSgXWM,497
|
|
@@ -116,10 +116,10 @@ sqlmesh/core/state_sync/db/utils.py,sha256=204OpT3ISFPCwWP9Aqq8nr6ETl24sbG5uOyo8
|
|
|
116
116
|
sqlmesh/core/state_sync/db/version.py,sha256=CZN2o1jxfsPxTGouncQIT51q61ObZKCuQdvWUWyTrI0,2201
|
|
117
117
|
sqlmesh/core/test/__init__.py,sha256=e83TJPwPRR_rAG29Y0OVbZb-5oWVBzz-_wrcd22Qk10,418
|
|
118
118
|
sqlmesh/core/test/context.py,sha256=Shmft5gRWCsk8Hropfmd4otWkLmw43r_uzrr6Azu5Ns,2220
|
|
119
|
-
sqlmesh/core/test/definition.py,sha256=
|
|
119
|
+
sqlmesh/core/test/definition.py,sha256=LhsRkmCxpMOlf4niBdRV1Anv2VBGsqxJ2k-odfsIbbw,37146
|
|
120
120
|
sqlmesh/core/test/discovery.py,sha256=WXIwPidLoacAGHoT_3TVFFEKamG89nHNtaMsZ01uGjs,1188
|
|
121
|
-
sqlmesh/core/test/result.py,sha256=
|
|
122
|
-
sqlmesh/core/test/runner.py,sha256=
|
|
121
|
+
sqlmesh/core/test/result.py,sha256=CR8c_tdBK7p8jx-dMibbj4zCtxVAmE_Xah9GQ5oPBTE,4218
|
|
122
|
+
sqlmesh/core/test/runner.py,sha256=yno0GDUW9angCy2ZeLIZE9lKrqBiJOnFibu6RLuct6I,6647
|
|
123
123
|
sqlmesh/dbt/__init__.py,sha256=KUv-lW5sG9D2ceXAIzA4MLcjyhzq3E-7qJP4P_PH2EU,144
|
|
124
124
|
sqlmesh/dbt/adapter.py,sha256=_mqeRE6HGj3rHeFQyYKsMXvydkuxX9G-dO-z2gSI7lw,16538
|
|
125
125
|
sqlmesh/dbt/basemodel.py,sha256=XuiK9-r5JWzvZGEk98Jt4ukR2exfMDsotGZqYx5xluc,12561
|
|
@@ -268,7 +268,7 @@ sqlmesh/utils/pydantic.py,sha256=-u69PDY-4FLR7ODNKBoN7PsPNmZ0wdhsJcCAG2P6vyY,110
|
|
|
268
268
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
269
269
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
270
270
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
271
|
-
sqlmesh-0.184.4.
|
|
271
|
+
sqlmesh-0.184.4.dev9.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
272
272
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
273
|
web/client/dist/index.html,sha256=x9qfdHkVkXOwWRFRCZGaixiLj5e9tOQsCDRR92vW9QI,5472
|
|
274
274
|
web/client/dist/assets/Audits-cGDtiiKB.js,sha256=jrS4x1nQ8Klx67744_LjNI2oBOI9XnnygDR-0wmlme8,1041
|
|
@@ -386,8 +386,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
386
386
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
387
387
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
388
388
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
389
|
-
sqlmesh-0.184.4.
|
|
390
|
-
sqlmesh-0.184.4.
|
|
391
|
-
sqlmesh-0.184.4.
|
|
392
|
-
sqlmesh-0.184.4.
|
|
393
|
-
sqlmesh-0.184.4.
|
|
389
|
+
sqlmesh-0.184.4.dev9.dist-info/METADATA,sha256=86dk0VfS-NnMyGBObwCNsTV8Mb7O2c870HJXsCTq7JA,25498
|
|
390
|
+
sqlmesh-0.184.4.dev9.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
391
|
+
sqlmesh-0.184.4.dev9.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
392
|
+
sqlmesh-0.184.4.dev9.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
393
|
+
sqlmesh-0.184.4.dev9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|