tinybird 0.0.1.dev237__tar.gz → 0.0.1.dev239__tar.gz
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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/sql_template.py +1 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/cli.py +1 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/client.py +4 -0
- tinybird-0.0.1.dev239/tinybird/tb/modules/agent.py +80 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/cli.py +11 -1
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/local.py +11 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/SOURCES.txt +1 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/setup.cfg +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev239'
|
|
8
|
+
__revision__ = '960f37b'
|
|
@@ -1394,3 +1394,7 @@ class TinyB:
|
|
|
1394
1394
|
|
|
1395
1395
|
def delete_tag(self, name: str):
|
|
1396
1396
|
self._req(f"/v0/tags/{name}", method="DELETE")
|
|
1397
|
+
|
|
1398
|
+
def explore_data(self, prompt: str) -> str:
|
|
1399
|
+
params = urlencode({"prompt": prompt, "host": self.host, "origin": "cli"})
|
|
1400
|
+
return self._req(f"/v1/agents/explore?{params}")
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
from typing import Any, Dict, Optional
|
|
4
|
+
|
|
5
|
+
import click
|
|
6
|
+
from prompt_toolkit import PromptSession
|
|
7
|
+
from prompt_toolkit.history import FileHistory
|
|
8
|
+
from prompt_toolkit.styles import Style
|
|
9
|
+
|
|
10
|
+
from tinybird.tb.client import TinyB
|
|
11
|
+
from tinybird.tb.modules.common import _get_tb_client
|
|
12
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def agent_banner():
|
|
16
|
+
# Define gradient colors (teal/turquoise range)
|
|
17
|
+
colors = [
|
|
18
|
+
"\033[38;2;0;128;128m", # Teal
|
|
19
|
+
"\033[38;2;0;150;136m", # Teal-ish
|
|
20
|
+
"\033[38;2;20;160;145m", # Turquoise blend
|
|
21
|
+
"\033[38;2;40;170;155m", # Light turquoise
|
|
22
|
+
"\033[38;2;60;180;165m", # Lighter turquoise
|
|
23
|
+
"\033[38;2;80;190;175m", # Very light turquoise
|
|
24
|
+
]
|
|
25
|
+
reset = "\033[0m"
|
|
26
|
+
|
|
27
|
+
# The Tinybird Code ASCII art banner
|
|
28
|
+
banner = [
|
|
29
|
+
" ████████╗██╗███╗ ██╗██╗ ██╗██████╗ ██╗██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗",
|
|
30
|
+
" ╚══██╔══╝██║████╗ ██║╚██╗ ██╔╝██╔══██╗██║██╔══██╗██╔══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝",
|
|
31
|
+
" ██║ ██║██╔██╗ ██║ ╚████╔╝ ██████╔╝██║██████╔╝██║ ██║ ██║ ██║ ██║██║ ██║█████╗ ",
|
|
32
|
+
" ██║ ██║██║╚██╗██║ ╚██╔╝ ██╔══██╗██║██╔══██╗██║ ██║ ██║ ██║ ██║██║ ██║██╔══╝ ",
|
|
33
|
+
" ██║ ██║██║ ╚████║ ██║ ██████╔╝██║██║ ██║██████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗",
|
|
34
|
+
" ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
# Print each line with a smooth horizontal gradient
|
|
38
|
+
for line in banner:
|
|
39
|
+
colored_line = ""
|
|
40
|
+
for j, char in enumerate(line):
|
|
41
|
+
# Skip coloring spaces
|
|
42
|
+
if char == " ":
|
|
43
|
+
colored_line += char
|
|
44
|
+
continue
|
|
45
|
+
|
|
46
|
+
# Calculate color index for a smooth gradient
|
|
47
|
+
color_index = min(int(j * len(colors) / len(line)), len(colors) - 1)
|
|
48
|
+
colored_line += f"{colors[color_index]}{char}"
|
|
49
|
+
|
|
50
|
+
click.echo(colored_line + reset)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def explore_data(client: TinyB, prompt: str):
|
|
54
|
+
click.echo(FeedbackManager.highlight(message="\nExploring data...\n"))
|
|
55
|
+
result = client.explore_data(prompt)
|
|
56
|
+
click.echo(result)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def run_agent_shell(config: Dict[str, Any]):
|
|
60
|
+
style = Style.from_dict({"prompt": "fg:#34D399 bold"})
|
|
61
|
+
history: Optional[FileHistory] = None
|
|
62
|
+
try:
|
|
63
|
+
history_file = os.path.expanduser("~/.tb_agent_history")
|
|
64
|
+
history = FileHistory(history_file)
|
|
65
|
+
except Exception:
|
|
66
|
+
pass
|
|
67
|
+
workspace_name = config.get("name", "No workspace found")
|
|
68
|
+
session: PromptSession = PromptSession(history=history)
|
|
69
|
+
user_input = session.prompt([("class:prompt", f"\ntb ({workspace_name}) » ")], style=style)
|
|
70
|
+
if user_input == "exit":
|
|
71
|
+
sys.exit(0)
|
|
72
|
+
else:
|
|
73
|
+
client = _get_tb_client(config.get("token", None), config["host"])
|
|
74
|
+
explore_data(client, user_input)
|
|
75
|
+
return run_agent_shell(config)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def run_agent(config: Dict[str, Any]):
|
|
79
|
+
agent_banner()
|
|
80
|
+
run_agent_shell(config)
|
|
@@ -22,6 +22,7 @@ from tinybird.tb.client import (
|
|
|
22
22
|
AuthException,
|
|
23
23
|
AuthNoTokenException,
|
|
24
24
|
)
|
|
25
|
+
from tinybird.tb.modules.agent import run_agent
|
|
25
26
|
from tinybird.tb.modules.common import (
|
|
26
27
|
CatchAuthExceptions,
|
|
27
28
|
CLIException,
|
|
@@ -46,6 +47,8 @@ DEFAULT_PATTERNS: List[Tuple[str, Union[str, Callable[[str], str]]]] = [
|
|
|
46
47
|
]
|
|
47
48
|
VERSION = f"{__cli__.__version__} (rev {__cli__.__revision__})"
|
|
48
49
|
|
|
50
|
+
agent_mode_flag = os.environ.get("TB_AGENT_MODE", "false") == "true"
|
|
51
|
+
|
|
49
52
|
|
|
50
53
|
@click.group(
|
|
51
54
|
cls=CatchAuthExceptions,
|
|
@@ -53,6 +56,7 @@ VERSION = f"{__cli__.__version__} (rev {__cli__.__revision__})"
|
|
|
53
56
|
"help_option_names": ["-h", "--help"],
|
|
54
57
|
"max_content_width": shutil.get_terminal_size().columns - 10,
|
|
55
58
|
},
|
|
59
|
+
invoke_without_command=agent_mode_flag,
|
|
56
60
|
)
|
|
57
61
|
@click.option(
|
|
58
62
|
"--debug/--no-debug",
|
|
@@ -93,6 +97,7 @@ def cli(
|
|
|
93
97
|
"""
|
|
94
98
|
Use `OBFUSCATE_REGEX_PATTERN` and `OBFUSCATE_PATTERN_SEPARATOR` environment variables to define a regex pattern and a separator (in case of a single string with multiple regex) to obfuscate secrets in the CLI output.
|
|
95
99
|
"""
|
|
100
|
+
|
|
96
101
|
# We need to unpatch for our tests not to break
|
|
97
102
|
if output != "human":
|
|
98
103
|
__hide_click_output()
|
|
@@ -188,6 +193,11 @@ def cli(
|
|
|
188
193
|
ctx.ensure_object(dict)["env"] = get_target_env(cloud)
|
|
189
194
|
ctx.ensure_object(dict)["output"] = output
|
|
190
195
|
|
|
196
|
+
is_agent_mode = agent_mode_flag and ctx.invoked_subcommand is None
|
|
197
|
+
|
|
198
|
+
if is_agent_mode:
|
|
199
|
+
run_agent(config)
|
|
200
|
+
|
|
191
201
|
|
|
192
202
|
@cli.command(hidden=True)
|
|
193
203
|
@click.option("-f", "--force", is_flag=True, default=False, help="Override existing files")
|
|
@@ -365,7 +375,7 @@ def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, staging
|
|
|
365
375
|
"init",
|
|
366
376
|
]
|
|
367
377
|
command = ctx.invoked_subcommand
|
|
368
|
-
if command in commands_without_ctx_client:
|
|
378
|
+
if not command or command in commands_without_ctx_client:
|
|
369
379
|
return None
|
|
370
380
|
|
|
371
381
|
commands_always_cloud = ["pull", "infra"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import subprocess
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
|
|
3
4
|
import click
|
|
4
5
|
import requests
|
|
@@ -148,6 +149,11 @@ def remove() -> None:
|
|
|
148
149
|
)
|
|
149
150
|
def start(use_aws_creds: bool, volumes_path: str) -> None:
|
|
150
151
|
"""Start Tinybird Local"""
|
|
152
|
+
if volumes_path is not None:
|
|
153
|
+
absolute_path = Path(volumes_path).absolute()
|
|
154
|
+
absolute_path.mkdir(parents=True, exist_ok=True)
|
|
155
|
+
volumes_path = str(absolute_path)
|
|
156
|
+
|
|
151
157
|
click.echo(FeedbackManager.highlight(message="» Starting Tinybird Local..."))
|
|
152
158
|
docker_client = get_docker_client()
|
|
153
159
|
start_tinybird_local(docker_client, use_aws_creds, volumes_path)
|
|
@@ -168,6 +174,11 @@ def start(use_aws_creds: bool, volumes_path: str) -> None:
|
|
|
168
174
|
)
|
|
169
175
|
def restart(use_aws_creds: bool, volumes_path: str) -> None:
|
|
170
176
|
"""Restart Tinybird Local"""
|
|
177
|
+
if volumes_path is not None:
|
|
178
|
+
absolute_path = Path(volumes_path).absolute()
|
|
179
|
+
absolute_path.mkdir(parents=True, exist_ok=True)
|
|
180
|
+
volumes_path = str(absolute_path)
|
|
181
|
+
|
|
171
182
|
click.echo(FeedbackManager.highlight(message="» Restarting Tinybird Local..."))
|
|
172
183
|
docker_client = get_docker_client()
|
|
173
184
|
remove_tinybird_local(docker_client, volumes_path is not None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev237 → tinybird-0.0.1.dev239}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|