sqlmesh 0.189.3.dev10__py3-none-any.whl → 0.189.3.dev11__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/custom.py +19 -0
- sqlmesh/lsp/main.py +23 -0
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.dist-info}/METADATA +1 -1
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.dist-info}/RECORD +9 -9
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.dist-info}/WHEEL +0 -0
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.189.3.dev10.dist-info → sqlmesh-0.189.3.dev11.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.189.3.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 189, 3, '
|
|
20
|
+
__version__ = version = '0.189.3.dev11'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 189, 3, 'dev11')
|
sqlmesh/lsp/custom.py
CHANGED
|
@@ -99,3 +99,22 @@ class SupportedMethodsResponse(PydanticModel):
|
|
|
99
99
|
"""
|
|
100
100
|
|
|
101
101
|
methods: t.List[CustomMethod]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
FORMAT_PROJECT_FEATURE = "sqlmesh/format_project"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class FormatProjectRequest(PydanticModel):
|
|
108
|
+
"""
|
|
109
|
+
Request to format all models in the current project.
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class FormatProjectResponse(PydanticModel):
|
|
116
|
+
"""
|
|
117
|
+
Response to format project request.
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
pass
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -30,6 +30,7 @@ from sqlmesh.lsp.custom import (
|
|
|
30
30
|
ALL_MODELS_FOR_RENDER_FEATURE,
|
|
31
31
|
RENDER_MODEL_FEATURE,
|
|
32
32
|
SUPPORTED_METHODS_FEATURE,
|
|
33
|
+
FORMAT_PROJECT_FEATURE,
|
|
33
34
|
AllModelsRequest,
|
|
34
35
|
AllModelsResponse,
|
|
35
36
|
AllModelsForRenderRequest,
|
|
@@ -38,6 +39,8 @@ from sqlmesh.lsp.custom import (
|
|
|
38
39
|
RenderModelResponse,
|
|
39
40
|
SupportedMethodsRequest,
|
|
40
41
|
SupportedMethodsResponse,
|
|
42
|
+
FormatProjectRequest,
|
|
43
|
+
FormatProjectResponse,
|
|
41
44
|
CustomMethod,
|
|
42
45
|
)
|
|
43
46
|
from sqlmesh.lsp.hints import get_hints
|
|
@@ -52,6 +55,7 @@ SUPPORTED_CUSTOM_METHODS = [
|
|
|
52
55
|
ALL_MODELS_FOR_RENDER_FEATURE,
|
|
53
56
|
API_FEATURE,
|
|
54
57
|
SUPPORTED_METHODS_FEATURE,
|
|
58
|
+
FORMAT_PROJECT_FEATURE,
|
|
55
59
|
]
|
|
56
60
|
|
|
57
61
|
|
|
@@ -175,6 +179,25 @@ class SQLMeshLanguageServer:
|
|
|
175
179
|
]
|
|
176
180
|
)
|
|
177
181
|
|
|
182
|
+
@self.server.feature(FORMAT_PROJECT_FEATURE)
|
|
183
|
+
def format_project(
|
|
184
|
+
ls: LanguageServer, params: FormatProjectRequest
|
|
185
|
+
) -> FormatProjectResponse:
|
|
186
|
+
"""Format all models in the current project."""
|
|
187
|
+
try:
|
|
188
|
+
if self.lsp_context is None:
|
|
189
|
+
current_path = Path.cwd()
|
|
190
|
+
self._ensure_context_in_folder(current_path)
|
|
191
|
+
if self.lsp_context is None:
|
|
192
|
+
raise RuntimeError("No context found")
|
|
193
|
+
|
|
194
|
+
# Call the format method on the context
|
|
195
|
+
self.lsp_context.context.format()
|
|
196
|
+
return FormatProjectResponse()
|
|
197
|
+
except Exception as e:
|
|
198
|
+
ls.log_trace(f"Error formatting project: {e}")
|
|
199
|
+
return FormatProjectResponse()
|
|
200
|
+
|
|
178
201
|
@self.server.feature(API_FEATURE)
|
|
179
202
|
def api(ls: LanguageServer, request: ApiRequest) -> t.Dict[str, t.Any]:
|
|
180
203
|
ls.log_trace(f"API request: {request}")
|
|
@@ -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=GGHauvJDXUWxx9Mql_BmbVfuHXfzF2PjlQHe88K7IrE,530
|
|
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
|
|
@@ -161,10 +161,10 @@ sqlmesh/integrations/github/cicd/controller.py,sha256=IgUWK9orYSMiElO3GaL6Ja-osF
|
|
|
161
161
|
sqlmesh/lsp/api.py,sha256=LJdECSaEZoPbu_Xl4KscVG-WLt7_g4dY-zKGO68dH14,2162
|
|
162
162
|
sqlmesh/lsp/completions.py,sha256=Y6zNKNne91tzRm5vRk82JmhIpo7dIBUoK8GGQesGlT8,5746
|
|
163
163
|
sqlmesh/lsp/context.py,sha256=36bUTiMSyfX91bri_F1aivDvSllq0rKidIM_RGAtirs,6253
|
|
164
|
-
sqlmesh/lsp/custom.py,sha256=
|
|
164
|
+
sqlmesh/lsp/custom.py,sha256=f6-s5gJop6YjTmX7jfwTIqjYvinhMpv_T9v0H7g4DuM,2172
|
|
165
165
|
sqlmesh/lsp/description.py,sha256=4QIGC9ix8IzmWF6DVUNhY4m1Crk3sNQA6hZ1RbyqU78,827
|
|
166
166
|
sqlmesh/lsp/hints.py,sha256=j-blccBUil94yRoDjWfkSM0HqMmsKD6hP2TaWdWWVk4,3734
|
|
167
|
-
sqlmesh/lsp/main.py,sha256=
|
|
167
|
+
sqlmesh/lsp/main.py,sha256=mi8N7qKybd1aDUhPAinwYXNSxSeZ6Eh3Gop8-_Zopuw,35279
|
|
168
168
|
sqlmesh/lsp/reference.py,sha256=dyeacD_MHATGRIrl8Ax86nDK9EC_dh3TaaVNAepPce0,17902
|
|
169
169
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
170
170
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -274,7 +274,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
274
274
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
275
275
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
276
276
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
277
|
-
sqlmesh-0.189.3.
|
|
277
|
+
sqlmesh-0.189.3.dev11.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
278
278
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
279
279
|
web/client/dist/index.html,sha256=OVPMTMsqC8zy0qnBcMb7PpVcqTHdIJoCmJLYh7gC1Xs,5472
|
|
280
280
|
web/client/dist/assets/Audits-Bvr7M5Cg.js,sha256=GrigkyEVYbM5zy0PAjOXdqmVV0kL-STP5gFQmx35vhw,1041
|
|
@@ -392,8 +392,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
392
392
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
393
393
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
394
394
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
395
|
-
sqlmesh-0.189.3.
|
|
396
|
-
sqlmesh-0.189.3.
|
|
397
|
-
sqlmesh-0.189.3.
|
|
398
|
-
sqlmesh-0.189.3.
|
|
399
|
-
sqlmesh-0.189.3.
|
|
395
|
+
sqlmesh-0.189.3.dev11.dist-info/METADATA,sha256=k4YFGazCi4pyHe5ALEQ-INtBSbOkCj547_720DlYtpA,26541
|
|
396
|
+
sqlmesh-0.189.3.dev11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
397
|
+
sqlmesh-0.189.3.dev11.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
398
|
+
sqlmesh-0.189.3.dev11.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
399
|
+
sqlmesh-0.189.3.dev11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|