tcloud
Advanced tools
+1
-1
| Metadata-Version: 2.4 | ||
| Name: tcloud | ||
| Version: 2.10.0 | ||
| Version: 2.10.1 | ||
| Author: TobikoData Inc. | ||
@@ -5,0 +5,0 @@ Author-email: engineering@tobikodata.com |
+1
-1
@@ -235,3 +235,3 @@ | ||
| 'readme': 'README.md', | ||
| 'version': '2.10.0', | ||
| 'version': '2.10.1', | ||
| }) |
| Metadata-Version: 2.4 | ||
| Name: tcloud | ||
| Version: 2.10.0 | ||
| Version: 2.10.1 | ||
| Author: TobikoData Inc. | ||
@@ -5,0 +5,0 @@ Author-email: engineering@tobikodata.com |
@@ -1,1 +0,1 @@ | ||
| __version__ = version = '2.10.0' | ||
| __version__ = version = '2.10.1' |
@@ -7,2 +7,3 @@ import json | ||
| import typing as t | ||
| from dataclasses import dataclass | ||
@@ -37,10 +38,23 @@ import click | ||
| @dataclass | ||
| class Command: | ||
| name: str | ||
| short_help: str | ||
| hidden: bool = False | ||
| class DynamicGroup(click.Group): | ||
| COMMANDS = { | ||
| "sqlmesh": "Run SQLMesh Enterprise commands", | ||
| "sqlmesh_cicd": "Run SQLMesh Enterprise CI/CD commands", | ||
| COMMANDS: t.Dict[str, Command] = { | ||
| "sqlmesh": Command(name="sqlmesh", short_help="Run SQLMesh Enterprise commands"), | ||
| "sqlmesh_cicd": Command( | ||
| name="sqlmesh_cicd", short_help="Run SQLMesh Enterprise CI/CD commands" | ||
| ), | ||
| "sqlmesh_lsp": Command( | ||
| name="sqlmesh_lsp", short_help="Run SQLMesh Language Server Protocol", hidden=True | ||
| ), | ||
| } | ||
| def list_commands(self, ctx: click.Context) -> t.List[str]: | ||
| return super().list_commands(ctx) + list(self.COMMANDS) | ||
| # Exclude sqlmesh_lsp from the visible command list | ||
| return super().list_commands(ctx) + [c.name for c in self.COMMANDS.values() if not c.hidden] | ||
@@ -51,3 +65,3 @@ def get_command(self, ctx: click.Context, cmd_name: str) -> t.Optional[click.Command]: | ||
| # Help was invoked, return a stub command instead | ||
| return click.Command(name=cmd_name, short_help=self.COMMANDS[cmd_name]) | ||
| return click.Command(name=cmd_name, short_help=self.COMMANDS[cmd_name].short_help) | ||
| return self._load_sqlmesh_enterprise(cmd_name, ctx.params.get("project")) | ||
@@ -67,2 +81,17 @@ return super().get_command(ctx, cmd_name) | ||
| return bot | ||
| if cmd_name == "sqlmesh_lsp": | ||
| from tobikodata.sqlmesh_enterprise.cli.lsp import ( # type: ignore | ||
| main, # pants: no-infer-dep | ||
| ) | ||
| @click.command(hidden=True, context_settings=dict(ignore_unknown_options=True)) | ||
| @click.argument("args", nargs=-1, type=click.UNPROCESSED) | ||
| def lsp(args: t.Tuple[str, ...]) -> None: | ||
| """Run SQLMesh Language Server Protocol""" | ||
| import sys | ||
| sys.argv = ["sqlmesh_lsp", *args] | ||
| main() | ||
| return lsp | ||
| try: | ||
@@ -69,0 +98,0 @@ from tobikodata.sqlmesh_enterprise.cli.main import ( # type: ignore |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
104419
1.03%1711
1.42%