sqlmesh 0.204.1.dev2__py3-none-any.whl → 0.204.1.dev4__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/core/console.py +19 -1
- sqlmesh/core/linter/definition.py +3 -2
- sqlmesh/core/linter/rule.py +3 -1
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.dist-info}/METADATA +2 -2
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.dist-info}/RECORD +10 -10
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.dist-info}/WHEEL +0 -0
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.204.1.dev2.dist-info → sqlmesh-0.204.1.dev4.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.204.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 204, 1, '
|
|
20
|
+
__version__ = version = '0.204.1.dev4'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 204, 1, 'dev4')
|
sqlmesh/core/console.py
CHANGED
|
@@ -2685,7 +2685,25 @@ class TerminalConsole(Console):
|
|
|
2685
2685
|
self, violations: t.List[RuleViolation], model: Model, is_error: bool = False
|
|
2686
2686
|
) -> None:
|
|
2687
2687
|
severity = "errors" if is_error else "warnings"
|
|
2688
|
-
|
|
2688
|
+
|
|
2689
|
+
# Sort violations by line, then alphabetically the name of the violation
|
|
2690
|
+
# Violations with no range go first
|
|
2691
|
+
sorted_violations = sorted(
|
|
2692
|
+
violations,
|
|
2693
|
+
key=lambda v: (
|
|
2694
|
+
v.violation_range.start.line if v.violation_range else -1,
|
|
2695
|
+
v.rule.name.lower(),
|
|
2696
|
+
),
|
|
2697
|
+
)
|
|
2698
|
+
violations_text = [
|
|
2699
|
+
(
|
|
2700
|
+
f" - Line {v.violation_range.start.line + 1}: {v.rule.name} - {v.violation_msg}"
|
|
2701
|
+
if v.violation_range
|
|
2702
|
+
else f" - {v.rule.name}: {v.violation_msg}"
|
|
2703
|
+
)
|
|
2704
|
+
for v in sorted_violations
|
|
2705
|
+
]
|
|
2706
|
+
violations_msg = "\n".join(violations_text)
|
|
2689
2707
|
msg = f"Linter {severity} for {model._path}:\n{violations_msg}"
|
|
2690
2708
|
|
|
2691
2709
|
if is_error:
|
|
@@ -108,9 +108,10 @@ class RuleSet(Mapping[str, type[Rule]]):
|
|
|
108
108
|
|
|
109
109
|
for rule in self._underlying.values():
|
|
110
110
|
violation = rule(context).check_model(model)
|
|
111
|
-
|
|
111
|
+
if isinstance(violation, RuleViolation):
|
|
112
|
+
violation = [violation]
|
|
112
113
|
if violation:
|
|
113
|
-
violations.
|
|
114
|
+
violations.extend(violation)
|
|
114
115
|
|
|
115
116
|
return violations
|
|
116
117
|
|
sqlmesh/core/linter/rule.py
CHANGED
|
@@ -70,7 +70,9 @@ class Rule(abc.ABC, metaclass=_Rule):
|
|
|
70
70
|
self.context = context
|
|
71
71
|
|
|
72
72
|
@abc.abstractmethod
|
|
73
|
-
def check_model(
|
|
73
|
+
def check_model(
|
|
74
|
+
self, model: Model
|
|
75
|
+
) -> t.Optional[t.Union[RuleViolation, t.List[RuleViolation]]]:
|
|
74
76
|
"""The evaluation function that'll check for a violation of this rule."""
|
|
75
77
|
|
|
76
78
|
@property
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlmesh
|
|
3
|
-
Version: 0.204.1.
|
|
3
|
+
Version: 0.204.1.dev4
|
|
4
4
|
Summary: Next-generation data transformation framework
|
|
5
5
|
Author-email: "TobikoData Inc." <engineering@tobikodata.com>
|
|
6
6
|
License: Apache License
|
|
@@ -234,7 +234,7 @@ Requires-Dist: python-dotenv
|
|
|
234
234
|
Requires-Dist: requests
|
|
235
235
|
Requires-Dist: rich[jupyter]
|
|
236
236
|
Requires-Dist: ruamel.yaml
|
|
237
|
-
Requires-Dist: sqlglot[rs]~=27.4.
|
|
237
|
+
Requires-Dist: sqlglot[rs]~=27.4.1
|
|
238
238
|
Requires-Dist: tenacity
|
|
239
239
|
Requires-Dist: time-machine
|
|
240
240
|
Requires-Dist: json-stream
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=QjwaamJIdW7voXoS880yAx7tHm-Im4_mqGA-XJgafos,7631
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=gSAeddtFclf2nCkBMyzhbPNAcqg0r8WazK7qEdi8_mY,528
|
|
3
3
|
sqlmesh/magics.py,sha256=bEzYqXHcM0P3CjyUZ1O9arlmXAdLAhoglKbQ29fD9AE,41842
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -11,7 +11,7 @@ sqlmesh/cli/options.py,sha256=8qEGWivk4urGikpEmaU9T8WsyaZtjCpmW4Ed25iQ73I,2543
|
|
|
11
11
|
sqlmesh/cli/project_init.py,sha256=5JmDmUK0WJs39hM-p76uzHYdo1Hnx6fKuJg_pR3Hn5A,16419
|
|
12
12
|
sqlmesh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
sqlmesh/core/_typing.py,sha256=e1f7xO2aZCy38M_3VoDy-XI3shyd99-IFctgIFSgXWM,497
|
|
14
|
-
sqlmesh/core/console.py,sha256=
|
|
14
|
+
sqlmesh/core/console.py,sha256=ovjM75l1A2rAi-ud3ovsIKSGwF9TsGYTK8NvokbCdL4,166111
|
|
15
15
|
sqlmesh/core/constants.py,sha256=gUABXWYgH_XOSbaZAJsR5o1dmA61JDCvBDyxqqXX3LM,2630
|
|
16
16
|
sqlmesh/core/context.py,sha256=34hhZPwqxdjLBuZ-kSlOen07CtlmD3KocQlQdXY8KeI,127454
|
|
17
17
|
sqlmesh/core/context_diff.py,sha256=_Ur55fGLJ58Icsp44I4pVhdi7_JHiHq45mWIco9oFzk,21792
|
|
@@ -76,9 +76,9 @@ sqlmesh/core/engine_adapter/snowflake.py,sha256=IEEzepxNpfqBIMe4ziz2k8fjOcJPeQPZ
|
|
|
76
76
|
sqlmesh/core/engine_adapter/spark.py,sha256=sYkVOPS0X43UPbI0z7Hh_EpKlI36qkOcr4NNFOTQlLs,21045
|
|
77
77
|
sqlmesh/core/engine_adapter/trino.py,sha256=Tws3GxqnC6BmXFohqru1TDxsgPH-21qV6Oky7FaaLpE,15908
|
|
78
78
|
sqlmesh/core/linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
sqlmesh/core/linter/definition.py,sha256=
|
|
79
|
+
sqlmesh/core/linter/definition.py,sha256=JDJTkhByUw4Tr3nF-BOHKFAx_eASQqEqzX6AUVQUz8I,5659
|
|
80
80
|
sqlmesh/core/linter/helpers.py,sha256=ygumMRAShxHITK_5vI64tHJoEa2mAdKen5hlMxaXKoQ,5022
|
|
81
|
-
sqlmesh/core/linter/rule.py,sha256=
|
|
81
|
+
sqlmesh/core/linter/rule.py,sha256=cyGoAz9HuhBYRfbgow_MZhzmDvQE7NK1gzzKsAN0cwY,3694
|
|
82
82
|
sqlmesh/core/linter/rules/__init__.py,sha256=gevzfb67vFqckTCoVAe_TBGf6hQ-YtE1_YuGuXyh1L0,77
|
|
83
83
|
sqlmesh/core/linter/rules/builtin.py,sha256=UNelGDGuzE-gPc6DsFw9h0BUbzmwx-Xyrx8wZh61Qq8,5163
|
|
84
84
|
sqlmesh/core/metric/__init__.py,sha256=H1HmoD5IwN4YWe9iJXyueLYNmTQFZwok5nSWNJcZIBQ,237
|
|
@@ -285,7 +285,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
285
285
|
sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
|
|
286
286
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
287
287
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
288
|
-
sqlmesh-0.204.1.
|
|
288
|
+
sqlmesh-0.204.1.dev4.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
289
289
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
290
290
|
web/client/dist/index.html,sha256=SXykdSRNgrT1k6I2dPZPEfpxPjIsi8-yVFijt-naSA4,5472
|
|
291
291
|
web/client/dist/assets/Audits-Jm353fhk.js,sha256=ry6b5IKT3hLAfD5C3T2BqxulfauEV0n0YZ2vsP4eQ_U,1041
|
|
@@ -403,8 +403,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
403
403
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
404
404
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
405
405
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
406
|
-
sqlmesh-0.204.1.
|
|
407
|
-
sqlmesh-0.204.1.
|
|
408
|
-
sqlmesh-0.204.1.
|
|
409
|
-
sqlmesh-0.204.1.
|
|
410
|
-
sqlmesh-0.204.1.
|
|
406
|
+
sqlmesh-0.204.1.dev4.dist-info/METADATA,sha256=O_WE277wyBA6qWGMWNhTkdmCV8yJrphTILnACvNFqPU,26678
|
|
407
|
+
sqlmesh-0.204.1.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
408
|
+
sqlmesh-0.204.1.dev4.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
409
|
+
sqlmesh-0.204.1.dev4.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
410
|
+
sqlmesh-0.204.1.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|