sqlmesh 0.190.1.dev6__py3-none-any.whl → 0.190.1.dev8__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/lsp/description.py +12 -13
- sqlmesh/lsp/main.py +17 -7
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.dist-info}/METADATA +1 -1
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.dist-info}/RECORD +9 -9
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.dist-info}/WHEEL +0 -0
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.190.1.dev6.dist-info → sqlmesh-0.190.1.dev8.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.190.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 190, 1, '
|
|
20
|
+
__version__ = version = '0.190.1.dev8'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 190, 1, 'dev8')
|
sqlmesh/lsp/description.py
CHANGED
|
@@ -10,21 +10,20 @@ import typing as t
|
|
|
10
10
|
def generate_markdown_description(
|
|
11
11
|
model: t.Union[SqlModel, ExternalModel, PythonModel, SeedModel],
|
|
12
12
|
) -> t.Optional[str]:
|
|
13
|
+
description = model.description
|
|
13
14
|
columns = model.columns_to_types
|
|
14
15
|
column_descriptions = model.column_descriptions
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[
|
|
19
|
-
f"| {column} | {column_type} | {column_descriptions.get(column, '')} |"
|
|
20
|
-
for column, column_type in columns.items()
|
|
21
|
-
]
|
|
22
|
-
)
|
|
23
|
-
if columns
|
|
24
|
-
else ""
|
|
25
|
-
)
|
|
17
|
+
if columns is None:
|
|
18
|
+
return description or None
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
columns_table = "\n".join(
|
|
21
|
+
[
|
|
22
|
+
f"| {column} | {column_type} | {column_descriptions.get(column, '')} |"
|
|
23
|
+
for column, column_type in columns.items()
|
|
24
|
+
]
|
|
30
25
|
)
|
|
26
|
+
|
|
27
|
+
table_header = "| Column | Type | Description |\n|--------|------|-------------|\n"
|
|
28
|
+
columns_text = table_header + columns_table
|
|
29
|
+
return f"{description}\n\n{columns_text}" if description else columns_text
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -106,10 +106,13 @@ class SQLMeshLanguageServer:
|
|
|
106
106
|
A new LSPContext instance wrapping the created context, or None if creation fails
|
|
107
107
|
"""
|
|
108
108
|
try:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
if self.lsp_context is None:
|
|
110
|
+
context = self.context_class(paths=paths)
|
|
111
|
+
else:
|
|
112
|
+
self.lsp_context.context.load()
|
|
113
|
+
context = self.lsp_context.context
|
|
114
|
+
self.lsp_context = LSPContext(context)
|
|
115
|
+
return self.lsp_context
|
|
113
116
|
except Exception as e:
|
|
114
117
|
self.server.log_trace(f"Error creating context: {e}")
|
|
115
118
|
return None
|
|
@@ -293,8 +296,16 @@ class SQLMeshLanguageServer:
|
|
|
293
296
|
|
|
294
297
|
@self.server.feature(types.TEXT_DOCUMENT_DID_CHANGE)
|
|
295
298
|
def did_change(ls: LanguageServer, params: types.DidChangeTextDocumentParams) -> None:
|
|
299
|
+
if self.lsp_context is None:
|
|
300
|
+
current_path = Path.cwd()
|
|
301
|
+
self._ensure_context_in_folder(current_path)
|
|
302
|
+
if self.lsp_context is None:
|
|
303
|
+
ls.log_trace("No context found after did_change")
|
|
304
|
+
return
|
|
305
|
+
|
|
296
306
|
uri = URI(params.text_document.uri)
|
|
297
307
|
context = self._context_get_or_load(uri)
|
|
308
|
+
|
|
298
309
|
models = context.map[uri.to_path()]
|
|
299
310
|
if models is None or not isinstance(models, ModelTarget):
|
|
300
311
|
return
|
|
@@ -731,9 +742,8 @@ class SQLMeshLanguageServer:
|
|
|
731
742
|
for a config.py or config.yml file in the parent directories.
|
|
732
743
|
"""
|
|
733
744
|
if self.lsp_context is not None:
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
self.lsp_context = LSPContext(context.context)
|
|
745
|
+
self.lsp_context.context.load()
|
|
746
|
+
self.lsp_context = LSPContext(self.lsp_context.context)
|
|
737
747
|
return
|
|
738
748
|
|
|
739
749
|
# No context yet: try to find config and load it
|
|
@@ -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=L9Hjq6o7TO4EcAMCq8IEAuJdYn9ib5xMWhJXtVtC1DI,528
|
|
3
3
|
sqlmesh/magics.py,sha256=gjzoxREb1XT8Yho_PQMlMqhhkLq_sEfBM8S3PTgxvWE,40337
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -162,10 +162,10 @@ sqlmesh/lsp/api.py,sha256=_lA_buSPZFIoLJuINbS53LbNOOaHp3orb0uFTE3aCqI,2328
|
|
|
162
162
|
sqlmesh/lsp/completions.py,sha256=Nt1XpFL_-QAIRM8BBBC6Ia6YG0hMZriiNJra7nGfD4Q,6676
|
|
163
163
|
sqlmesh/lsp/context.py,sha256=QGbNL0sifxzVJ7T1U5oWcJ5FXrOrLrVKt1jtH1qM_50,6099
|
|
164
164
|
sqlmesh/lsp/custom.py,sha256=IJ70li8d5RbOFDrjHfsI2UNOiOp-WB22lrgpdJ7lVSg,2942
|
|
165
|
-
sqlmesh/lsp/description.py,sha256=
|
|
165
|
+
sqlmesh/lsp/description.py,sha256=PjguwyVw5YeYSgT0JMhkf5U1Jry-sDPLvQ2caIR9JPQ,856
|
|
166
166
|
sqlmesh/lsp/helpers.py,sha256=EFc1u3-b7kSv5-tNwmKUDxId72RCLDBnN2lLTgRSzzQ,1020
|
|
167
167
|
sqlmesh/lsp/hints.py,sha256=j-blccBUil94yRoDjWfkSM0HqMmsKD6hP2TaWdWWVk4,3734
|
|
168
|
-
sqlmesh/lsp/main.py,sha256=
|
|
168
|
+
sqlmesh/lsp/main.py,sha256=wijvati9SOCmBzQ3rBRcbCg1VbwEhwzFkRIv648F8PU,37379
|
|
169
169
|
sqlmesh/lsp/reference.py,sha256=8hZT3wH8zmWiFEySS1_nVhhLg-CKCGncf9wG3LGBef8,26432
|
|
170
170
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
171
171
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -275,7 +275,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
275
275
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
276
276
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
277
277
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
278
|
-
sqlmesh-0.190.1.
|
|
278
|
+
sqlmesh-0.190.1.dev8.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
279
279
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
280
280
|
web/client/dist/index.html,sha256=k5bAEoPDJ0BhYQ4hBcKWObITCxIgqOUC28nGXvEDrt0,5472
|
|
281
281
|
web/client/dist/assets/Audits-Pgs8N6IE.js,sha256=BQuc9kiznZSqTnzNrJSDNqAAdOTGjNQJt32M1sHZFok,1041
|
|
@@ -393,8 +393,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
393
393
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
394
394
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
395
395
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
396
|
-
sqlmesh-0.190.1.
|
|
397
|
-
sqlmesh-0.190.1.
|
|
398
|
-
sqlmesh-0.190.1.
|
|
399
|
-
sqlmesh-0.190.1.
|
|
400
|
-
sqlmesh-0.190.1.
|
|
396
|
+
sqlmesh-0.190.1.dev8.dist-info/METADATA,sha256=yqtMm5HDmlJIUXP8u3bdDnVnhOt1aqwAgYWEQqGzLq8,26540
|
|
397
|
+
sqlmesh-0.190.1.dev8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
398
|
+
sqlmesh-0.190.1.dev8.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
399
|
+
sqlmesh-0.190.1.dev8.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
400
|
+
sqlmesh-0.190.1.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|