sqlmesh 0.200.1.dev5__py3-none-any.whl → 0.200.1.dev7__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/config/loader.py +13 -3
- sqlmesh/lsp/main.py +8 -4
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.dist-info}/METADATA +1 -1
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.dist-info}/RECORD +9 -9
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.dist-info}/WHEEL +0 -0
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.200.1.dev5.dist-info → sqlmesh-0.200.1.dev7.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.200.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 200, 1, '
|
|
20
|
+
__version__ = version = '0.200.1.dev7'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 200, 1, 'dev7')
|
sqlmesh/core/config/loader.py
CHANGED
|
@@ -91,6 +91,7 @@ def load_config_from_paths(
|
|
|
91
91
|
"SQLMesh project config could not be found. Point the cli to the project path with `sqlmesh -p`. If you haven't set up the SQLMesh project, run `sqlmesh init`."
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
+
yaml_config_path: t.Optional[Path] = None
|
|
94
95
|
for path in [*project_paths, *personal_paths]:
|
|
95
96
|
if not path.exists():
|
|
96
97
|
continue
|
|
@@ -107,8 +108,9 @@ def load_config_from_paths(
|
|
|
107
108
|
if extension in ("yml", "yaml"):
|
|
108
109
|
if config_name != "config" and not python_config:
|
|
109
110
|
raise ConfigError(
|
|
110
|
-
"YAML configs do not support multiple configs. Use Python instead."
|
|
111
|
+
"YAML configs do not support multiple configs. Use Python instead.",
|
|
111
112
|
)
|
|
113
|
+
yaml_config_path = path.resolve()
|
|
112
114
|
non_python_configs.append(load_config_from_yaml(path))
|
|
113
115
|
elif extension == "py":
|
|
114
116
|
try:
|
|
@@ -149,7 +151,8 @@ def load_config_from_paths(
|
|
|
149
151
|
except ValidationError as e:
|
|
150
152
|
raise ConfigError(
|
|
151
153
|
validation_error_message(e, "Invalid project config:")
|
|
152
|
-
+ "\n\nVerify your config.yaml and environment variables."
|
|
154
|
+
+ "\n\nVerify your config.yaml and environment variables.",
|
|
155
|
+
location=yaml_config_path,
|
|
153
156
|
)
|
|
154
157
|
|
|
155
158
|
no_dialect_err_msg = "Default model SQL dialect is a required configuration parameter. Set it in the `model_defaults` `dialect` key in your config file."
|
|
@@ -166,7 +169,14 @@ def load_config_from_paths(
|
|
|
166
169
|
|
|
167
170
|
|
|
168
171
|
def load_config_from_yaml(path: Path) -> t.Dict[str, t.Any]:
|
|
169
|
-
|
|
172
|
+
content = yaml_load(path)
|
|
173
|
+
if not isinstance(content, dict):
|
|
174
|
+
raise ConfigError(
|
|
175
|
+
f"Invalid YAML configuration: expected a dictionary but got {type(content).__name__}. "
|
|
176
|
+
f"Please check the YAML syntax in your config file.",
|
|
177
|
+
location=path,
|
|
178
|
+
)
|
|
179
|
+
return content
|
|
170
180
|
|
|
171
181
|
|
|
172
182
|
def load_config_from_python_module(
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -767,7 +767,7 @@ class SQLMeshLanguageServer:
|
|
|
767
767
|
get_sql_completions(None, URI(params.text_document.uri))
|
|
768
768
|
return None
|
|
769
769
|
|
|
770
|
-
def _get_diagnostics_for_uri(self, uri: URI) -> t.Tuple[t.List[types.Diagnostic],
|
|
770
|
+
def _get_diagnostics_for_uri(self, uri: URI) -> t.Tuple[t.List[types.Diagnostic], str]:
|
|
771
771
|
"""Get diagnostics for a specific URI, returning (diagnostics, result_id).
|
|
772
772
|
|
|
773
773
|
Since we no longer track version numbers, we always return 0 as the result_id.
|
|
@@ -776,12 +776,16 @@ class SQLMeshLanguageServer:
|
|
|
776
776
|
try:
|
|
777
777
|
context = self._context_get_or_load(uri)
|
|
778
778
|
diagnostics = context.lint_model(uri)
|
|
779
|
-
return LSPContext.diagnostics_to_lsp_diagnostics(
|
|
779
|
+
return LSPContext.diagnostics_to_lsp_diagnostics(
|
|
780
|
+
diagnostics
|
|
781
|
+
), self.context_state.version_id
|
|
780
782
|
except ConfigError as config_error:
|
|
781
783
|
diagnostic, error = context_error_to_diagnostic(config_error, uri_filter=uri)
|
|
782
784
|
if diagnostic:
|
|
783
|
-
|
|
784
|
-
|
|
785
|
+
location, diag = diagnostic
|
|
786
|
+
if location == uri.value:
|
|
787
|
+
return [diag], self.context_state.version_id
|
|
788
|
+
return [], self.context_state.version_id
|
|
785
789
|
|
|
786
790
|
def _context_get_or_load(self, document_uri: t.Optional[URI] = None) -> LSPContext:
|
|
787
791
|
state = self.context_state
|
|
@@ -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=MQg0lV_302j4u4_7pDmNZHvOOujcXyUZw-vbKIwul8E,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
|
|
@@ -47,7 +47,7 @@ sqlmesh/core/config/format.py,sha256=6CXFbvnor56xbldKE-Vrm9k_ABRoY4v6vgIb3mCihiQ
|
|
|
47
47
|
sqlmesh/core/config/gateway.py,sha256=tYngyqwd_4Qr9lhcv2hlvLvb_2pgYYtKu6hdGsTr-4I,1931
|
|
48
48
|
sqlmesh/core/config/janitor.py,sha256=NP0i51V8XwMrHw8uuwQknivuudIleNiFBtBnMuXmfIY,362
|
|
49
49
|
sqlmesh/core/config/linter.py,sha256=4Fh6UgY5FrRD9tk_R41Y-M_r91Wh7EQW3Pc1IdRN9Cg,1287
|
|
50
|
-
sqlmesh/core/config/loader.py,sha256=
|
|
50
|
+
sqlmesh/core/config/loader.py,sha256=uN4ljhj2ANEYW3ulny4JVQklmdu4LUtrTluB7-eWuYQ,8371
|
|
51
51
|
sqlmesh/core/config/migration.py,sha256=3lZIlmIcQH3_hIEm3Y3jFtvpw0YXzRzAnk4OdiklO6M,408
|
|
52
52
|
sqlmesh/core/config/model.py,sha256=GIz9kAfKD2NEXNzCZCQ17-CK2OtqN6WgeG1fvibcChM,3650
|
|
53
53
|
sqlmesh/core/config/naming.py,sha256=KVGaxUgswoQajXR_cHFJvgkmEFcU1V182GkOH1SJxuE,326
|
|
@@ -171,7 +171,7 @@ sqlmesh/lsp/description.py,sha256=PjguwyVw5YeYSgT0JMhkf5U1Jry-sDPLvQ2caIR9JPQ,85
|
|
|
171
171
|
sqlmesh/lsp/errors.py,sha256=3NMim_5J00Eypz7t8b7XbkBfy8gIsRkeq-VcjD4COtc,1489
|
|
172
172
|
sqlmesh/lsp/helpers.py,sha256=EFc1u3-b7kSv5-tNwmKUDxId72RCLDBnN2lLTgRSzzQ,1020
|
|
173
173
|
sqlmesh/lsp/hints.py,sha256=j-blccBUil94yRoDjWfkSM0HqMmsKD6hP2TaWdWWVk4,3734
|
|
174
|
-
sqlmesh/lsp/main.py,sha256=
|
|
174
|
+
sqlmesh/lsp/main.py,sha256=7tlnTZtm709-GafEo5OSMo2DbFlVW4340iUcp645lOI,39965
|
|
175
175
|
sqlmesh/lsp/reference.py,sha256=CjIXCJ5qM5mHyKRyM1brKyvpK9oQfLI0LiNKHfjJuVw,32257
|
|
176
176
|
sqlmesh/lsp/rename.py,sha256=399v1vyVRHHxvbCHVcuS4Pl8K2N-Z60JdZ6e1znOI4s,4397
|
|
177
177
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
@@ -284,7 +284,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
284
284
|
sqlmesh/utils/rich.py,sha256=BpB47G0-JcU41LkGkeGKroexj4NOV5fox4-GOIXPgIc,3545
|
|
285
285
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
286
286
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
287
|
-
sqlmesh-0.200.1.
|
|
287
|
+
sqlmesh-0.200.1.dev7.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
288
288
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
289
289
|
web/client/dist/index.html,sha256=DAv6ABGogw4xRLb0T_92WP_S7XWyqVhwBgGKWtuQwU4,5472
|
|
290
290
|
web/client/dist/assets/Audits-BuHAmFO8.js,sha256=zbYUF6WdUGMbnMm01GMNPb7xAJwj-o5wMdL56vPo2qE,1041
|
|
@@ -402,8 +402,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
402
402
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
403
403
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
404
404
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
405
|
-
sqlmesh-0.200.1.
|
|
406
|
-
sqlmesh-0.200.1.
|
|
407
|
-
sqlmesh-0.200.1.
|
|
408
|
-
sqlmesh-0.200.1.
|
|
409
|
-
sqlmesh-0.200.1.
|
|
405
|
+
sqlmesh-0.200.1.dev7.dist-info/METADATA,sha256=lNK3JzVTRLPCTXxBFUdlwN8yyFmjtxozqX6olr2jQNc,26657
|
|
406
|
+
sqlmesh-0.200.1.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
407
|
+
sqlmesh-0.200.1.dev7.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
408
|
+
sqlmesh-0.200.1.dev7.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
409
|
+
sqlmesh-0.200.1.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|