tinybird 0.0.1.dev26__py3-none-any.whl → 0.0.1.dev27__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- tinybird/config.py +1 -1
- tinybird/datatypes.py +46 -57
- tinybird/git_settings.py +4 -4
- tinybird/prompts.py +644 -0
- tinybird/sql.py +9 -0
- tinybird/sql_toolset.py +17 -3
- tinybird/syncasync.py +1 -1
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/cli.py +2 -0
- tinybird/tb/modules/build.py +44 -16
- tinybird/tb/modules/build_server.py +75 -0
- tinybird/tb/modules/cli.py +22 -0
- tinybird/tb/modules/common.py +2 -2
- tinybird/tb/modules/config.py +13 -14
- tinybird/tb/modules/create.py +124 -119
- tinybird/tb/modules/datafile/build.py +28 -0
- tinybird/tb/modules/datafile/common.py +1 -0
- tinybird/tb/modules/datafile/fixture.py +10 -6
- tinybird/tb/modules/datafile/parse_pipe.py +2 -0
- tinybird/tb/modules/datasource.py +1 -1
- tinybird/tb/modules/deploy.py +160 -0
- tinybird/tb/modules/llm.py +32 -16
- tinybird/tb/modules/llm_utils.py +24 -0
- tinybird/tb/modules/local.py +2 -2
- tinybird/tb/modules/login.py +8 -6
- tinybird/tb/modules/mock.py +10 -6
- tinybird/tb/modules/test.py +69 -47
- tinybird/tb/modules/watch.py +1 -1
- tinybird/tb_cli_modules/common.py +2 -2
- tinybird/tb_cli_modules/config.py +5 -5
- tinybird/tornado_template.py +1 -3
- {tinybird-0.0.1.dev26.dist-info → tinybird-0.0.1.dev27.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev26.dist-info → tinybird-0.0.1.dev27.dist-info}/RECORD +36 -33
- {tinybird-0.0.1.dev26.dist-info → tinybird-0.0.1.dev27.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev26.dist-info → tinybird-0.0.1.dev27.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev26.dist-info → tinybird-0.0.1.dev27.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import re
|
|
2
|
+
from typing import List
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def extract_xml(text: str, tag: str) -> str:
|
|
6
|
+
"""
|
|
7
|
+
Extracts the content of the specified XML tag from the given text. Used for parsing structured responses
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
text (str): The text containing the XML.
|
|
11
|
+
tag (str): The XML tag to extract content from.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
str: The content of the specified XML tag, or an empty string if the tag is not found.
|
|
15
|
+
"""
|
|
16
|
+
match = re.search(f"<{tag}>(.*?)</{tag}>", text, re.DOTALL)
|
|
17
|
+
return match.group(1) if match else ""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def parse_xml(text: str, tag: str) -> List[str]:
|
|
21
|
+
"""
|
|
22
|
+
Parses the text for the specified XML tag and returns a list of the contents of each tag.
|
|
23
|
+
"""
|
|
24
|
+
return re.findall(f"<{tag}.*?>(.*?)</{tag}>", text, re.DOTALL)
|
tinybird/tb/modules/local.py
CHANGED
|
@@ -65,7 +65,7 @@ def start_tinybird_local(
|
|
|
65
65
|
if health == "healthy":
|
|
66
66
|
break
|
|
67
67
|
if health == "unhealthy":
|
|
68
|
-
raise CLIException("Tinybird Local is unhealthy.
|
|
68
|
+
raise CLIException("Tinybird Local is unhealthy. Try running `tb local restart` in a few seconds.")
|
|
69
69
|
|
|
70
70
|
time.sleep(5)
|
|
71
71
|
|
|
@@ -82,7 +82,7 @@ def get_docker_client():
|
|
|
82
82
|
client.ping()
|
|
83
83
|
return client
|
|
84
84
|
except Exception:
|
|
85
|
-
raise CLIException("Docker is not running or installed.
|
|
85
|
+
raise CLIException("Docker is not running or installed. Make sure Docker is installed and running.")
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
def stop_tinybird_local(docker_client):
|
tinybird/tb/modules/login.py
CHANGED
|
@@ -110,15 +110,15 @@ def start_server(auth_callback):
|
|
|
110
110
|
@cli.command()
|
|
111
111
|
@click.option(
|
|
112
112
|
"--host",
|
|
113
|
-
help="Set custom host if it's different than https://api.tinybird.co.
|
|
113
|
+
help="Set custom host if it's different than https://api.tinybird.co. See https://www.tinybird.co/docs/api-reference/overview#regions-and-endpoints for the available list of regions.",
|
|
114
114
|
)
|
|
115
115
|
@click.option(
|
|
116
116
|
"--workspace",
|
|
117
|
-
help="Set the workspace to authenticate to. If
|
|
117
|
+
help="Set the workspace to authenticate to. If unset, the default workspace will be used.",
|
|
118
118
|
)
|
|
119
119
|
@coro
|
|
120
120
|
async def login(host: str, workspace: str):
|
|
121
|
-
"""Authenticate
|
|
121
|
+
"""Authenticate using the browser."""
|
|
122
122
|
auth_event = threading.Event()
|
|
123
123
|
auth_code = [None] # Using a list to store the code, as it's mutable
|
|
124
124
|
host = host or "https://api.tinybird.co"
|
|
@@ -127,7 +127,7 @@ async def login(host: str, workspace: str):
|
|
|
127
127
|
auth_code[0] = code
|
|
128
128
|
auth_event.set()
|
|
129
129
|
|
|
130
|
-
click.echo("Opening browser for authentication...")
|
|
130
|
+
click.echo(FeedbackManager.highlight(message="» Opening browser for authentication..."))
|
|
131
131
|
|
|
132
132
|
# Start the local server in a separate thread
|
|
133
133
|
server_thread = threading.Thread(target=start_server, args=(auth_callback,))
|
|
@@ -169,7 +169,9 @@ async def login(host: str, workspace: str):
|
|
|
169
169
|
cli_config[k] = ws[k]
|
|
170
170
|
|
|
171
171
|
cli_config.persist_to_file()
|
|
172
|
-
|
|
173
|
-
click.echo(FeedbackManager.
|
|
172
|
+
click.echo(FeedbackManager.info(message="\nWorkspace: %s" % ws["name"]))
|
|
173
|
+
click.echo(FeedbackManager.info(message="User: %s" % ws["user_email"]))
|
|
174
|
+
click.echo(FeedbackManager.info(message="Host: %s" % host))
|
|
175
|
+
click.echo(FeedbackManager.success(message="\n✓ Authentication successful!"))
|
|
174
176
|
else:
|
|
175
177
|
click.echo(FeedbackManager.error(message="Authentication failed or timed out."))
|
tinybird/tb/modules/mock.py
CHANGED
|
@@ -4,12 +4,14 @@ from pathlib import Path
|
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
6
|
|
|
7
|
+
from tinybird.prompts import mock_prompt
|
|
7
8
|
from tinybird.tb.modules.cli import cli
|
|
8
9
|
from tinybird.tb.modules.common import CLIException, check_user_token_with_client, coro
|
|
9
10
|
from tinybird.tb.modules.config import CLIConfig
|
|
10
11
|
from tinybird.tb.modules.datafile.fixture import build_fixture_name, persist_fixture
|
|
11
12
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
12
13
|
from tinybird.tb.modules.llm import LLM
|
|
14
|
+
from tinybird.tb.modules.llm_utils import extract_xml
|
|
13
15
|
from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
14
16
|
|
|
15
17
|
|
|
@@ -18,14 +20,15 @@ from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
|
18
20
|
@click.option("--rows", type=int, default=10, help="Number of events to send")
|
|
19
21
|
@click.option("--prompt", type=str, default="", help="Extra context to use for data generation")
|
|
20
22
|
@click.option("--folder", type=str, default=".", help="Folder where datafiles will be placed")
|
|
21
|
-
@click.pass_context
|
|
22
23
|
@coro
|
|
23
|
-
async def mock(
|
|
24
|
+
async def mock(datasource: str, rows: int, prompt: str, folder: str) -> None:
|
|
24
25
|
"""Load sample data into a Data Source.
|
|
25
26
|
|
|
26
27
|
Args:
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
datasource: Path to the datasource file to load sample data into
|
|
29
|
+
rows: Number of events to send
|
|
30
|
+
prompt: Extra context to use for data generation
|
|
31
|
+
folder: Folder where datafiles will be placed
|
|
29
32
|
"""
|
|
30
33
|
|
|
31
34
|
try:
|
|
@@ -62,13 +65,14 @@ async def mock(ctx: click.Context, datasource: str, rows: int, prompt: str, fold
|
|
|
62
65
|
user_client.token = user_token
|
|
63
66
|
llm = LLM(user_token=user_token, client=user_client)
|
|
64
67
|
tb_client = await get_tinybird_local_client(os.path.abspath(folder))
|
|
65
|
-
|
|
68
|
+
response = await llm.ask(prompt, system_prompt=mock_prompt(rows))
|
|
69
|
+
sql = extract_xml(response, "sql")
|
|
66
70
|
if os.environ.get("TB_DEBUG", "") != "":
|
|
67
71
|
logging.debug(sql)
|
|
68
72
|
result = await tb_client.query(f"{sql} FORMAT JSON")
|
|
69
73
|
data = result.get("data", [])[:rows]
|
|
70
74
|
fixture_name = build_fixture_name(datasource_path.absolute().as_posix(), datasource_name, datasource_content)
|
|
71
|
-
persist_fixture(fixture_name, data)
|
|
75
|
+
persist_fixture(fixture_name, data, folder)
|
|
72
76
|
click.echo(FeedbackManager.success(message=f"✓ /fixtures/{fixture_name}.ndjson created with {rows} rows"))
|
|
73
77
|
|
|
74
78
|
except Exception as e:
|
tinybird/tb/modules/test.py
CHANGED
|
@@ -12,12 +12,14 @@ from typing import Any, Dict, Iterable, List, Optional, Tuple
|
|
|
12
12
|
import click
|
|
13
13
|
import yaml
|
|
14
14
|
|
|
15
|
+
from tinybird.prompts import test_create_prompt
|
|
15
16
|
from tinybird.tb.modules.cli import cli
|
|
16
17
|
from tinybird.tb.modules.common import coro
|
|
17
18
|
from tinybird.tb.modules.config import CLIConfig
|
|
18
19
|
from tinybird.tb.modules.exceptions import CLIException
|
|
19
20
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
20
21
|
from tinybird.tb.modules.llm import LLM
|
|
22
|
+
from tinybird.tb.modules.llm_utils import extract_xml, parse_xml
|
|
21
23
|
from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
22
24
|
|
|
23
25
|
yaml.SafeDumper.org_represent_str = yaml.SafeDumper.represent_str # type: ignore[attr-defined]
|
|
@@ -55,9 +57,9 @@ def test(ctx: click.Context) -> None:
|
|
|
55
57
|
|
|
56
58
|
@test.command(
|
|
57
59
|
name="create",
|
|
58
|
-
help="Create a test for an existing
|
|
60
|
+
help="Create a test for an existing pipe",
|
|
59
61
|
)
|
|
60
|
-
@click.argument("
|
|
62
|
+
@click.argument("name_or_filename", type=str)
|
|
61
63
|
@click.option(
|
|
62
64
|
"--folder",
|
|
63
65
|
default=".",
|
|
@@ -66,64 +68,84 @@ def test(ctx: click.Context) -> None:
|
|
|
66
68
|
)
|
|
67
69
|
@click.option("--prompt", type=str, default=None, help="Prompt to be used to create the test")
|
|
68
70
|
@coro
|
|
69
|
-
async def test_create(
|
|
71
|
+
async def test_create(name_or_filename: str, prompt: Optional[str], folder: str) -> None:
|
|
70
72
|
"""
|
|
71
|
-
Create a test for an existing
|
|
73
|
+
Create a test for an existing pipe
|
|
72
74
|
"""
|
|
73
|
-
|
|
75
|
+
root_path = Path(folder)
|
|
74
76
|
try:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if pipe_path.suffix == ".pipe":
|
|
78
|
-
pipe_name = pipe_path.stem
|
|
79
|
-
else:
|
|
80
|
-
pipe_path = Path("endpoints", f"{pipe}.pipe")
|
|
77
|
+
if ".pipe" in name_or_filename:
|
|
78
|
+
pipe_path = Path(name_or_filename)
|
|
81
79
|
if not pipe_path.exists():
|
|
82
|
-
|
|
80
|
+
raise CLIException(FeedbackManager.error(message=f"Pipe {name_or_filename} not found"))
|
|
81
|
+
else:
|
|
82
|
+
pipe_folders = ("endpoints", "copies", "materializations", "sinks", "pipes")
|
|
83
|
+
pipe_path = next(
|
|
84
|
+
(
|
|
85
|
+
root_path / folder / f"{name_or_filename}.pipe"
|
|
86
|
+
for folder in pipe_folders
|
|
87
|
+
if (root_path / folder / f"{name_or_filename}.pipe").exists()
|
|
88
|
+
),
|
|
89
|
+
None,
|
|
90
|
+
)
|
|
91
|
+
if not pipe_path:
|
|
92
|
+
raise CLIException(FeedbackManager.error(message=f"Pipe {name_or_filename} not found"))
|
|
83
93
|
|
|
94
|
+
pipe_name = pipe_path.stem
|
|
84
95
|
click.echo(FeedbackManager.highlight(message=f"\n» Creating tests for {pipe_name} endpoint..."))
|
|
85
|
-
pipe_path =
|
|
96
|
+
pipe_path = root_path / pipe_path
|
|
86
97
|
pipe_content = pipe_path.read_text()
|
|
87
98
|
|
|
88
99
|
client = await get_tinybird_local_client(os.path.abspath(folder))
|
|
89
100
|
pipe_nodes = await client._req(f"/v0/pipes/{pipe_name}")
|
|
90
|
-
|
|
101
|
+
parameters = set([param["name"] for node in pipe_nodes["nodes"] for param in node["params"]])
|
|
91
102
|
|
|
103
|
+
system_prompt = test_create_prompt.format(
|
|
104
|
+
name=pipe_name,
|
|
105
|
+
content=pipe_content,
|
|
106
|
+
parameters=parameters or "No parameters",
|
|
107
|
+
)
|
|
92
108
|
config = CLIConfig.get_project_config(folder)
|
|
93
109
|
user_token = config.get_user_token()
|
|
94
110
|
llm = LLM(user_token=user_token, client=config.get_client())
|
|
95
111
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
)
|
|
112
|
+
response = await llm.ask(prompt, system_prompt=system_prompt)
|
|
113
|
+
response = extract_xml(response, "response")
|
|
114
|
+
tests_content = parse_xml(response, "test")
|
|
115
|
+
|
|
116
|
+
tests: List[Dict[str, Any]] = []
|
|
117
|
+
for test_content in tests_content:
|
|
118
|
+
test = {}
|
|
119
|
+
test["name"] = extract_xml(test_content, "name")
|
|
120
|
+
test["description"] = extract_xml(test_content, "description")
|
|
121
|
+
parameters = extract_xml(test_content, "parameters")
|
|
122
|
+
test["parameters"] = parameters.split("?")[1] if "?" in parameters else parameters
|
|
123
|
+
test["expected_result"] = ""
|
|
105
124
|
|
|
106
125
|
response = None
|
|
107
126
|
try:
|
|
108
|
-
response = await client._req_raw(f"/v0/pipes/{pipe_name}.ndjson{
|
|
127
|
+
response = await client._req_raw(f"/v0/pipes/{pipe_name}.ndjson?{parameters}")
|
|
109
128
|
except Exception:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if response.status_code >= 400:
|
|
113
|
-
valid_test["expected_http_status"] = response.status_code
|
|
114
|
-
valid_test["expected_result"] = response.json()["error"]
|
|
115
|
-
else:
|
|
116
|
-
if "expected_http_status" in valid_test:
|
|
117
|
-
del valid_test["expected_http_status"]
|
|
118
|
-
valid_test["expected_result"] = response.text or ""
|
|
119
|
-
|
|
120
|
-
valid_test_expectations.append(valid_test)
|
|
129
|
+
pass
|
|
121
130
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
if response:
|
|
132
|
+
if response.status_code >= 400:
|
|
133
|
+
test["expected_http_status"] = response.status_code
|
|
134
|
+
test["expected_result"] = response.json()["error"]
|
|
135
|
+
else:
|
|
136
|
+
if "expected_http_status" in test:
|
|
137
|
+
del test["expected_http_status"]
|
|
138
|
+
test["expected_result"] = response.text or ""
|
|
139
|
+
|
|
140
|
+
tests.append(test)
|
|
141
|
+
|
|
142
|
+
if len(tests) > 0:
|
|
143
|
+
generate_test_file(pipe_name, tests, folder, mode="a")
|
|
144
|
+
for test in tests:
|
|
125
145
|
test_name = test["name"]
|
|
126
146
|
click.echo(FeedbackManager.info(message=f"✓ {test_name} created"))
|
|
147
|
+
else:
|
|
148
|
+
click.echo(FeedbackManager.info(message="* No tests created"))
|
|
127
149
|
|
|
128
150
|
click.echo(FeedbackManager.success(message="✓ Done!\n"))
|
|
129
151
|
except Exception as e:
|
|
@@ -156,10 +178,10 @@ async def test_update(pipe: str, folder: str) -> None:
|
|
|
156
178
|
pipe_tests_path = Path(folder) / pipe_tests_path
|
|
157
179
|
pipe_tests_content = yaml.safe_load(pipe_tests_path.read_text())
|
|
158
180
|
for test in pipe_tests_content:
|
|
159
|
-
test_params = test["parameters"] if test["parameters"]
|
|
181
|
+
test_params = test["parameters"].split("?")[1] if "?" in test["parameters"] else test["parameters"]
|
|
160
182
|
response = None
|
|
161
183
|
try:
|
|
162
|
-
response = await client._req_raw(f"/v0/pipes/{pipe_name}.ndjson{test_params}")
|
|
184
|
+
response = await client._req_raw(f"/v0/pipes/{pipe_name}.ndjson?{test_params}")
|
|
163
185
|
except Exception:
|
|
164
186
|
continue
|
|
165
187
|
|
|
@@ -194,12 +216,12 @@ async def test_update(pipe: str, folder: str) -> None:
|
|
|
194
216
|
help="Folder where tests will be placed",
|
|
195
217
|
)
|
|
196
218
|
@coro
|
|
197
|
-
async def
|
|
219
|
+
async def run_tests(name: Tuple[str, ...], folder: str) -> None:
|
|
198
220
|
click.echo(FeedbackManager.highlight(message="\n» Running tests"))
|
|
199
221
|
client = await get_tinybird_local_client(os.path.abspath(folder))
|
|
200
222
|
paths = [Path(n) for n in name]
|
|
201
223
|
endpoints = [f"./tests/{p.stem}.yaml" for p in paths]
|
|
202
|
-
|
|
224
|
+
test_files: Iterable[str] = endpoints if len(endpoints) > 0 else glob.glob("./tests/**/*.y*ml", recursive=True)
|
|
203
225
|
|
|
204
226
|
async def run_test(test_file):
|
|
205
227
|
test_file_path = Path(test_file)
|
|
@@ -207,11 +229,10 @@ async def test_run(name: Tuple[str, ...], folder: str) -> None:
|
|
|
207
229
|
test_file_content = yaml.safe_load(test_file_path.read_text())
|
|
208
230
|
for test in test_file_content:
|
|
209
231
|
try:
|
|
210
|
-
test_params = test["parameters"] if test["parameters"]
|
|
211
|
-
|
|
232
|
+
test_params = test["parameters"].split("?")[1] if "?" in test["parameters"] else test["parameters"]
|
|
212
233
|
response = None
|
|
213
234
|
try:
|
|
214
|
-
response = await client._req_raw(f"/v0/pipes/{test_file_path.stem}.ndjson{test_params}")
|
|
235
|
+
response = await client._req_raw(f"/v0/pipes/{test_file_path.stem}.ndjson?{test_params}")
|
|
215
236
|
except Exception:
|
|
216
237
|
raise Exception("Expected to not fail but got an error")
|
|
217
238
|
|
|
@@ -239,8 +260,9 @@ async def test_run(name: Tuple[str, ...], folder: str) -> None:
|
|
|
239
260
|
return True
|
|
240
261
|
|
|
241
262
|
failed_tests_count = 0
|
|
242
|
-
test_count = len(
|
|
243
|
-
|
|
263
|
+
test_count = len(test_files)
|
|
264
|
+
|
|
265
|
+
for test_file in test_files:
|
|
244
266
|
if not await run_test(test_file):
|
|
245
267
|
failed_tests_count += 1
|
|
246
268
|
|
tinybird/tb/modules/watch.py
CHANGED
|
@@ -281,7 +281,7 @@ def load_connector_config(ctx: Context, connector_name: str, debug: bool, check_
|
|
|
281
281
|
click.echo(FeedbackManager.warning_connector_not_installed(connector=connector_name))
|
|
282
282
|
return
|
|
283
283
|
ctx.ensure_object(dict)[connector_name] = create_connector(connector_name, config)
|
|
284
|
-
except
|
|
284
|
+
except OSError:
|
|
285
285
|
if debug:
|
|
286
286
|
click.echo(f"** {connector_name} connector not configured")
|
|
287
287
|
pass
|
|
@@ -1062,7 +1062,7 @@ async def push_data(
|
|
|
1062
1062
|
if connector not in ctx.obj:
|
|
1063
1063
|
raise CLIException(FeedbackManager.error_connector_not_configured(connector=connector))
|
|
1064
1064
|
else:
|
|
1065
|
-
_connector:
|
|
1065
|
+
_connector: Connector = ctx.obj[connector]
|
|
1066
1066
|
click.echo(FeedbackManager.info_starting_export_process(connector=connector))
|
|
1067
1067
|
try:
|
|
1068
1068
|
url = _connector.export_to_gcs(sql, datasource_name, mode)
|
|
@@ -45,10 +45,10 @@ def compare_versions(a: str, b: str) -> int:
|
|
|
45
45
|
class ConfigValueOrigin(Enum):
|
|
46
46
|
# Sources for config values (environment variables, .tinyb file or default value)
|
|
47
47
|
|
|
48
|
-
ENVIRONMENT
|
|
49
|
-
CONFIG
|
|
50
|
-
DEFAULT
|
|
51
|
-
NONE
|
|
48
|
+
ENVIRONMENT = "env"
|
|
49
|
+
CONFIG = "conf"
|
|
50
|
+
DEFAULT = "default"
|
|
51
|
+
NONE = ""
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
@dataclass
|
|
@@ -153,7 +153,7 @@ class CLIConfig:
|
|
|
153
153
|
for k, v in values.items():
|
|
154
154
|
self[k] = v
|
|
155
155
|
return True
|
|
156
|
-
except
|
|
156
|
+
except OSError:
|
|
157
157
|
return False
|
|
158
158
|
|
|
159
159
|
def override_with_environment(self) -> None:
|
tinybird/tornado_template.py
CHANGED
|
@@ -195,8 +195,6 @@ if you need to include a literal ``{{``, ``{%``, or ``{#`` in the output.
|
|
|
195
195
|
`filter_whitespace` for available options. New in Tornado 4.3.
|
|
196
196
|
"""
|
|
197
197
|
|
|
198
|
-
from __future__ import absolute_import, division, print_function
|
|
199
|
-
|
|
200
198
|
import ast
|
|
201
199
|
import datetime
|
|
202
200
|
import linecache
|
|
@@ -1163,7 +1161,7 @@ def check_valid_expr(expr):
|
|
|
1163
1161
|
elif isinstance(expr, ast.Subscript):
|
|
1164
1162
|
check_valid_expr(expr.value)
|
|
1165
1163
|
if isinstance(expr.slice, ast.Index):
|
|
1166
|
-
check_valid_expr(expr.slice.value)
|
|
1164
|
+
check_valid_expr(expr.slice.value)
|
|
1167
1165
|
elif isinstance(expr.slice, ast.Slice):
|
|
1168
1166
|
if expr.slice.lower is not None:
|
|
1169
1167
|
check_valid_expr(expr.slice.lower)
|
|
@@ -1,76 +1,79 @@
|
|
|
1
1
|
tinybird/__cli__.py,sha256=pgYsVLcqL16wtSn6KtKweNZYoYJdEksTgSvQAW7hH64,250
|
|
2
2
|
tinybird/client.py,sha256=xM9Czi9JRjt3VpTAoe2di4m36VYIT3ngpn-DgkWFv-Y,51505
|
|
3
|
-
tinybird/config.py,sha256=
|
|
3
|
+
tinybird/config.py,sha256=RRNb3Z1zkykTpusBTSyszuIySHGMsfL5aVxxt1kdr6w,6147
|
|
4
4
|
tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
|
|
5
5
|
tinybird/context.py,sha256=kutUQ0kCwparowI74_YLXx6wtTzGLRouJ6oGHVBPzBo,1291
|
|
6
|
-
tinybird/datatypes.py,sha256=
|
|
6
|
+
tinybird/datatypes.py,sha256=XNypumfqNjsvLJ5iNXnbVHRvAJe0aQwI3lS6Cxox-e0,10979
|
|
7
7
|
tinybird/feedback_manager.py,sha256=cNUbt0Jxim02UiIdlyP12DJfXfFFzxDCfJK9XRWZ9A0,67488
|
|
8
|
-
tinybird/git_settings.py,sha256=
|
|
9
|
-
tinybird/prompts.py,sha256=
|
|
10
|
-
tinybird/sql.py,sha256=
|
|
8
|
+
tinybird/git_settings.py,sha256=Sw_8rGmribEFJ4Z_6idrVytxpFYk7ez8ei0qHULzs3E,3934
|
|
9
|
+
tinybird/prompts.py,sha256=RWxOD3Bimpf9_Wa0igpLcVt1HPd6k1U2MoumVKt9EpY,28087
|
|
10
|
+
tinybird/sql.py,sha256=eulpRe05ZFrKFrxYawgxDxxrktFE8uL6hSL1gHIWKyg,46166
|
|
11
11
|
tinybird/sql_template.py,sha256=IqYRfUxDYBCoOYjqqvn--_8QXLv9FSRnJ0bInx7q1Xs,93051
|
|
12
12
|
tinybird/sql_template_fmt.py,sha256=1z-PuqSZXtzso8Z_mPqUc-NxIxUrNUcVIPezNieZk-M,10196
|
|
13
|
-
tinybird/sql_toolset.py,sha256=
|
|
14
|
-
tinybird/syncasync.py,sha256=
|
|
15
|
-
tinybird/tornado_template.py,sha256=
|
|
13
|
+
tinybird/sql_toolset.py,sha256=HAo6xtCjlbhikdpK6xfMC_RvEG6uzRropwhKSHEkIIc,14343
|
|
14
|
+
tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
|
|
15
|
+
tinybird/tornado_template.py,sha256=oflXyoL2LSCegvl6bAzqw2JIqRaN5WPjhYYDtQcfuOE,41869
|
|
16
16
|
tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
|
|
17
17
|
tinybird/ch_utils/engine.py,sha256=OXkBhlzGjZotjD0vaT-rFIbSGV4tpiHxE8qO_ip0SyQ,40454
|
|
18
|
-
tinybird/tb/__cli__.py,sha256=
|
|
19
|
-
tinybird/tb/cli.py,sha256=
|
|
18
|
+
tinybird/tb/__cli__.py,sha256=YhapEm3rjTYNhWDc3f8TEyCLnxEDxGcnJp19vDYGzvA,251
|
|
19
|
+
tinybird/tb/cli.py,sha256=D5Xs9RPbBY6U6lXTtzRSWNs2pG6uSzax-cfoKMpO7Jg,889
|
|
20
20
|
tinybird/tb/modules/auth.py,sha256=EzRWFmwRkXNhUmRaruEVFLdkbUg8xMSix0cAWl5D4Jg,9029
|
|
21
|
-
tinybird/tb/modules/build.py,sha256=
|
|
21
|
+
tinybird/tb/modules/build.py,sha256=8wzHG_8xrA5D3rjnACTuSeJS4AqFL5rJFzpJnYWCBnQ,8150
|
|
22
|
+
tinybird/tb/modules/build_server.py,sha256=6LbJYCSIY6TEEH9DDjZ19pzaAH08roYcWpiP0QNuO6c,2674
|
|
22
23
|
tinybird/tb/modules/cicd.py,sha256=SjCyvvy0WUnsjFs2biwwXvcf0Ddpmghhd8-SnMyfsRM,5355
|
|
23
|
-
tinybird/tb/modules/cli.py,sha256=
|
|
24
|
-
tinybird/tb/modules/common.py,sha256=
|
|
25
|
-
tinybird/tb/modules/config.py,sha256=
|
|
24
|
+
tinybird/tb/modules/cli.py,sha256=J3s9RHw1Xwx0q4qUYw0QQGAtjpxhbmKNEFpRiPf4NIU,20844
|
|
25
|
+
tinybird/tb/modules/common.py,sha256=W4MyzUAMYl1xRF9bG374NzVjZrz9JCo90MGP5HDBf8o,71529
|
|
26
|
+
tinybird/tb/modules/config.py,sha256=fUO-rVPImPnk8DNt0_AUYDlG77eC9Cs2jiVlB9LXCmg,11255
|
|
26
27
|
tinybird/tb/modules/connection.py,sha256=FhDM-OAnLN2epbO2YonpjJQhHqBjyuanBsZmKlDXrqg,28679
|
|
27
|
-
tinybird/tb/modules/create.py,sha256=
|
|
28
|
-
tinybird/tb/modules/datasource.py,sha256=
|
|
28
|
+
tinybird/tb/modules/create.py,sha256=tw6aS2z_gbDEnMm0Kbw-NrLPeGSs1Ny93Sm3W2TbkOs,10121
|
|
29
|
+
tinybird/tb/modules/datasource.py,sha256=Xz2syobLp7SSDFFjCNT90uI8iH-MZ4KC8p7g1SY499Y,32897
|
|
30
|
+
tinybird/tb/modules/deploy.py,sha256=QxiD5i1fWFYMlenN8Mf95Bl3X8jkcfGU_po_7oPPLko,5926
|
|
29
31
|
tinybird/tb/modules/exceptions.py,sha256=4A2sSjCEqKUMqpP3WI00zouCWW4uLaghXXLZBSw04mY,3363
|
|
30
32
|
tinybird/tb/modules/feedback_manager.py,sha256=e8tqehRR0Buhs8O0n8N2Sg2vnnBVb1NLtnZqkPrYD_A,68379
|
|
31
33
|
tinybird/tb/modules/fmt.py,sha256=poh6_cwVGSf-sBu6LKWuO2TANL_J8Sgm25sPpwxa3Aw,3558
|
|
32
34
|
tinybird/tb/modules/job.py,sha256=956Pj8BEEsiD2GZsV9RKKVM3I_CveOLgS82lykO5ukk,2963
|
|
33
|
-
tinybird/tb/modules/llm.py,sha256=
|
|
34
|
-
tinybird/tb/modules/
|
|
35
|
+
tinybird/tb/modules/llm.py,sha256=yBa_XwWd-iuMMYNg7BZWXxZcwDyW9sfLrcdK81hX6Dk,3215
|
|
36
|
+
tinybird/tb/modules/llm_utils.py,sha256=hIfBU7vMUHUt25pljim3WdZdJTNr9hDo3mHezqI5B7w,766
|
|
37
|
+
tinybird/tb/modules/local.py,sha256=lHUji6FMhRv4J9sLrHDqyMT-8OwzFSVzDfapnUKS-ZA,5242
|
|
35
38
|
tinybird/tb/modules/local_common.py,sha256=fRHJrEix19lAOE4EpzRhWBJH8FUk7hCCvynP0Icf7Ww,2298
|
|
36
|
-
tinybird/tb/modules/login.py,sha256=
|
|
37
|
-
tinybird/tb/modules/mock.py,sha256=
|
|
39
|
+
tinybird/tb/modules/login.py,sha256=NwpwPQYMVb0mW5-uPR5zb5hl06XqH7xAJfA1GntZzPk,6315
|
|
40
|
+
tinybird/tb/modules/mock.py,sha256=Le3DBVwW8QMLIu4NHvdGPliQDLgcQ2VzDDhtwPYm-l4,3543
|
|
38
41
|
tinybird/tb/modules/pipe.py,sha256=eYmMBiSj1Ur_hXUs74YZ9mCSAyiICDmkuKuTemlxPUY,27018
|
|
39
42
|
tinybird/tb/modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
40
43
|
tinybird/tb/modules/shell.py,sha256=OfFQ4lx3v_XSTr5cm_mTDG6CLc3zFdikM2pOamifG84,13469
|
|
41
44
|
tinybird/tb/modules/table.py,sha256=4XrtjM-N0zfNtxVkbvLDQQazno1EPXnxTyo7llivfXk,11035
|
|
42
45
|
tinybird/tb/modules/tag.py,sha256=anPmMUBc-TbFovlpFi8GPkKA18y7Y0GczMsMms5TZsU,3502
|
|
43
46
|
tinybird/tb/modules/telemetry.py,sha256=iEGnMuCuNhvF6ln__j6X9MSTwL_0Hm-GgFHHHvhfknk,10466
|
|
44
|
-
tinybird/tb/modules/test.py,sha256=
|
|
47
|
+
tinybird/tb/modules/test.py,sha256=8rsj8HC9mrldMRx0ViF0XtkF8NHWOsFvQtMTQnJqhpM,10834
|
|
45
48
|
tinybird/tb/modules/token.py,sha256=AePr-QMv_vtWwZDWQ92Zp0kPrCjze61i4npiPhoLMZg,12717
|
|
46
|
-
tinybird/tb/modules/watch.py,sha256=
|
|
49
|
+
tinybird/tb/modules/watch.py,sha256=9D6NTo9cllyJfvObtOzZEbv3SJN42EgfVdYQPN1liZU,3964
|
|
47
50
|
tinybird/tb/modules/workspace.py,sha256=6icAgnTvfL3d1kx4L1Z1cGXCD_2Yx0fNRjbZHNxRbYc,10927
|
|
48
51
|
tinybird/tb/modules/workspace_members.py,sha256=Ai6iCOzXX1zQ8q9iXIFSFHsBJlT-8Q28DaG5Ie-UweY,8726
|
|
49
|
-
tinybird/tb/modules/datafile/build.py,sha256
|
|
52
|
+
tinybird/tb/modules/datafile/build.py,sha256=AAyMOkrliBKF0ZPVQBuSx9Qc1D-Y-08sXw90YAg_LiM,57559
|
|
50
53
|
tinybird/tb/modules/datafile/build_common.py,sha256=IXl-Z51zUi1dypV7meNenX0iu2UmowNeqgG6WHyMHlk,4562
|
|
51
54
|
tinybird/tb/modules/datafile/build_datasource.py,sha256=4aP8_DYCRGghXntZSeWDNJxjps1QRVa7WHoYCzQwQts,17355
|
|
52
55
|
tinybird/tb/modules/datafile/build_pipe.py,sha256=n6jjfBaDl014-jxM5gI9XjUb0XCmgEVoAoAuy_Br8nw,27842
|
|
53
|
-
tinybird/tb/modules/datafile/common.py,sha256=
|
|
56
|
+
tinybird/tb/modules/datafile/common.py,sha256=TSJozXsXzxvkAC_N7dV-Iv_cy2AIGHUNtCYgwlQAbtU,75762
|
|
54
57
|
tinybird/tb/modules/datafile/diff.py,sha256=-0J7PsBO64T7LOZSkZ4ZFHHCPvT7cKItnJkbz2PkndU,6754
|
|
55
58
|
tinybird/tb/modules/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
56
|
-
tinybird/tb/modules/datafile/fixture.py,sha256=
|
|
59
|
+
tinybird/tb/modules/datafile/fixture.py,sha256=bdZndItV6ibOegPCrN3OgKdkpjDFCFvoSoiZVsCV_XQ,1852
|
|
57
60
|
tinybird/tb/modules/datafile/format_common.py,sha256=WaNV4tXrQU5gjV6MJP-5TGqg_Bre6ilNS8emvFl-X3c,1967
|
|
58
61
|
tinybird/tb/modules/datafile/format_datasource.py,sha256=xXs8uL3N546CFMOFwqJpJdz-6YD01IfUVwNvWKgeMwY,6156
|
|
59
62
|
tinybird/tb/modules/datafile/format_pipe.py,sha256=XJAtwJeq9gCwNyaVK3qpBRH-Y2Tpi2YPA7sR3O5yVD4,7418
|
|
60
63
|
tinybird/tb/modules/datafile/parse_datasource.py,sha256=NewT4TSDYlQOWEewtea50nQCLYAVu7DUXnc-vs-X8aI,1475
|
|
61
|
-
tinybird/tb/modules/datafile/parse_pipe.py,sha256=
|
|
64
|
+
tinybird/tb/modules/datafile/parse_pipe.py,sha256=v38RpqrQaOc2TDjOwLGVT7EHeZtjmVV8JXZimRlSN28,3097
|
|
62
65
|
tinybird/tb/modules/datafile/pipe_checker.py,sha256=cp80Bru41GlyMRvyERpdJNXns2MjmtIAWFnBLF4cPXs,24667
|
|
63
66
|
tinybird/tb/modules/datafile/pull.py,sha256=vcjMUbjnZ9XQMGmL33J3ElpbXBTat8Yzp-haeDggZd4,5967
|
|
64
67
|
tinybird/tb/modules/tinyunit/tinyunit.py,sha256=3EBqKzNCfyDuZiO4H61ihanFBRLFUGeuXf3nDXnYFcU,11727
|
|
65
68
|
tinybird/tb/modules/tinyunit/tinyunit_lib.py,sha256=hGh1ZaXC1af7rKnX7222urkj0QJMhMWclqMy59dOqwE,1922
|
|
66
69
|
tinybird/tb_cli_modules/cicd.py,sha256=0lMkb6CVOFZl5HOwgY8mK4T4mgI7O8335UngLXtCc-c,13851
|
|
67
|
-
tinybird/tb_cli_modules/common.py,sha256=
|
|
68
|
-
tinybird/tb_cli_modules/config.py,sha256=
|
|
70
|
+
tinybird/tb_cli_modules/common.py,sha256=yl_EM8IjSZelMduzgLwugZ0HeKisTkNyF2YOBIPhFQk,78704
|
|
71
|
+
tinybird/tb_cli_modules/config.py,sha256=6u6B5QCdiQLbJkCkwtnKGs9H3nP-KXXhC75mF7B-1DQ,11464
|
|
69
72
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
70
73
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
71
74
|
tinybird/tb_cli_modules/telemetry.py,sha256=iEGnMuCuNhvF6ln__j6X9MSTwL_0Hm-GgFHHHvhfknk,10466
|
|
72
|
-
tinybird-0.0.1.
|
|
73
|
-
tinybird-0.0.1.
|
|
74
|
-
tinybird-0.0.1.
|
|
75
|
-
tinybird-0.0.1.
|
|
76
|
-
tinybird-0.0.1.
|
|
75
|
+
tinybird-0.0.1.dev27.dist-info/METADATA,sha256=g2eLtTKr0P3auScC1qK7Ee1PvHYE3nlPKZwuBZXfhrs,2446
|
|
76
|
+
tinybird-0.0.1.dev27.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
77
|
+
tinybird-0.0.1.dev27.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
78
|
+
tinybird-0.0.1.dev27.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
|
|
79
|
+
tinybird-0.0.1.dev27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|