tinybird 0.0.1.dev16__py3-none-any.whl → 0.0.1.dev18__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.
- tinybird/tb/cli.py +0 -1
- tinybird/tb/modules/build.py +50 -33
- tinybird/tb/modules/build_shell.py +231 -38
- tinybird/tb/modules/cicd.py +9 -89
- tinybird/tb/modules/cli.py +4 -89
- tinybird/tb/modules/common.py +8 -206
- tinybird/tb/modules/config.py +0 -10
- tinybird/tb/modules/create.py +54 -223
- tinybird/tb/modules/datafile/build_pipe.py +1 -1
- tinybird/tb/modules/datafile/common.py +223 -247
- tinybird/tb/modules/datafile/parse_datasource.py +8 -0
- tinybird/tb/modules/datafile/parse_pipe.py +10 -1
- tinybird/tb/modules/datasource.py +0 -10
- tinybird/tb/modules/llm.py +4 -3
- tinybird/tb/modules/local_common.py +1 -1
- tinybird/tb/modules/login.py +1 -1
- tinybird/tb/modules/mock.py +14 -12
- tinybird/tb/modules/pipe.py +0 -4
- tinybird/tb/modules/test.py +90 -17
- {tinybird-0.0.1.dev16.dist-info → tinybird-0.0.1.dev18.dist-info}/METADATA +2 -1
- {tinybird-0.0.1.dev16.dist-info → tinybird-0.0.1.dev18.dist-info}/RECORD +24 -25
- tinybird/tb/modules/branch.py +0 -1023
- {tinybird-0.0.1.dev16.dist-info → tinybird-0.0.1.dev18.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev16.dist-info → tinybird-0.0.1.dev18.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev16.dist-info → tinybird-0.0.1.dev18.dist-info}/top_level.txt +0 -0
|
@@ -6,6 +6,7 @@ import click
|
|
|
6
6
|
from tinybird.feedback_manager import FeedbackManager
|
|
7
7
|
from tinybird.tb.modules.datafile.common import (
|
|
8
8
|
Datafile,
|
|
9
|
+
DatafileSyntaxError,
|
|
9
10
|
format_filename,
|
|
10
11
|
parse,
|
|
11
12
|
)
|
|
@@ -18,6 +19,7 @@ def parse_datasource(
|
|
|
18
19
|
content: Optional[str] = None,
|
|
19
20
|
skip_eval: bool = False,
|
|
20
21
|
hide_folders: bool = False,
|
|
22
|
+
add_context_to_datafile_syntax_errors: bool = True,
|
|
21
23
|
) -> Datafile:
|
|
22
24
|
basepath = ""
|
|
23
25
|
if not content:
|
|
@@ -30,6 +32,12 @@ def parse_datasource(
|
|
|
30
32
|
filename = format_filename(filename, hide_folders)
|
|
31
33
|
try:
|
|
32
34
|
doc = parse(s, "default", basepath, replace_includes=replace_includes, skip_eval=skip_eval)
|
|
35
|
+
except DatafileSyntaxError as e:
|
|
36
|
+
try:
|
|
37
|
+
if add_context_to_datafile_syntax_errors:
|
|
38
|
+
e.get_context_from_file_contents(s)
|
|
39
|
+
finally:
|
|
40
|
+
raise e
|
|
33
41
|
except ParseException as e:
|
|
34
42
|
raise click.ClickException(
|
|
35
43
|
FeedbackManager.error_parsing_file(filename=filename, lineno=e.lineno, error=e)
|
|
@@ -7,6 +7,7 @@ from tinybird.feedback_manager import FeedbackManager
|
|
|
7
7
|
from tinybird.sql_template import get_template_and_variables, render_sql_template
|
|
8
8
|
from tinybird.tb.modules.datafile.common import (
|
|
9
9
|
Datafile,
|
|
10
|
+
DatafileSyntaxError,
|
|
10
11
|
format_filename,
|
|
11
12
|
parse,
|
|
12
13
|
)
|
|
@@ -20,6 +21,7 @@ def parse_pipe(
|
|
|
20
21
|
content: Optional[str] = None,
|
|
21
22
|
skip_eval: bool = False,
|
|
22
23
|
hide_folders: bool = False,
|
|
24
|
+
add_context_to_datafile_syntax_errors: bool = True,
|
|
23
25
|
) -> Datafile:
|
|
24
26
|
basepath = ""
|
|
25
27
|
if not content:
|
|
@@ -32,7 +34,14 @@ def parse_pipe(
|
|
|
32
34
|
filename = format_filename(filename, hide_folders)
|
|
33
35
|
try:
|
|
34
36
|
sql = ""
|
|
35
|
-
|
|
37
|
+
try:
|
|
38
|
+
doc = parse(s, basepath=basepath, replace_includes=replace_includes, skip_eval=skip_eval)
|
|
39
|
+
except DatafileSyntaxError as e:
|
|
40
|
+
try:
|
|
41
|
+
if add_context_to_datafile_syntax_errors:
|
|
42
|
+
e.get_context_from_file_contents(s)
|
|
43
|
+
finally:
|
|
44
|
+
raise e
|
|
36
45
|
for node in doc.nodes:
|
|
37
46
|
sql = node.get("sql", "")
|
|
38
47
|
if sql.strip()[0] == "%":
|
|
@@ -21,7 +21,6 @@ if TYPE_CHECKING:
|
|
|
21
21
|
from tinybird.connectors import Connector
|
|
22
22
|
|
|
23
23
|
from tinybird.feedback_manager import FeedbackManager
|
|
24
|
-
from tinybird.tb.modules.branch import warn_if_in_live
|
|
25
24
|
from tinybird.tb.modules.cli import cli
|
|
26
25
|
from tinybird.tb.modules.common import (
|
|
27
26
|
_analyze,
|
|
@@ -358,9 +357,6 @@ async def datasource_delete(ctx: Context, datasource_name: str, yes: bool):
|
|
|
358
357
|
FeedbackManager.error_datasource_can_not_be_deleted(datasource=datasource_name, error=e)
|
|
359
358
|
)
|
|
360
359
|
|
|
361
|
-
semver: str = ctx.ensure_object(dict)["config"]["semver"]
|
|
362
|
-
await warn_if_in_live(semver)
|
|
363
|
-
|
|
364
360
|
if yes or click.confirm(
|
|
365
361
|
FeedbackManager.warning_confirm_delete_datasource(
|
|
366
362
|
warning_message=warning_message, dependencies_information=dependencies_information
|
|
@@ -391,9 +387,6 @@ async def datasource_delete(ctx: Context, datasource_name: str, yes: bool):
|
|
|
391
387
|
async def datasource_truncate(ctx, datasource_name, yes, cascade):
|
|
392
388
|
"""Truncate a data source"""
|
|
393
389
|
|
|
394
|
-
semver: str = ctx.ensure_object(dict)["config"]["semver"]
|
|
395
|
-
await warn_if_in_live(semver)
|
|
396
|
-
|
|
397
390
|
client = ctx.obj["client"]
|
|
398
391
|
if yes or click.confirm(FeedbackManager.warning_confirm_truncate_datasource(datasource=datasource_name)):
|
|
399
392
|
try:
|
|
@@ -453,9 +446,6 @@ async def datasource_delete_rows(ctx, datasource_name, sql_condition, yes, wait,
|
|
|
453
446
|
- Delete rows with SQL condition and wait for the job to finish: `tb datasource delete [datasource_name] --sql-condition "country='ES'" --wait`
|
|
454
447
|
"""
|
|
455
448
|
|
|
456
|
-
semver: str = ctx.ensure_object(dict)["config"]["semver"]
|
|
457
|
-
await warn_if_in_live(semver)
|
|
458
|
-
|
|
459
449
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
460
450
|
if (
|
|
461
451
|
dry_run
|
tinybird/tb/modules/llm.py
CHANGED
|
@@ -26,7 +26,6 @@ class TestExpectation(BaseModel):
|
|
|
26
26
|
name: str
|
|
27
27
|
description: str
|
|
28
28
|
parameters: str
|
|
29
|
-
expected_result: str
|
|
30
29
|
|
|
31
30
|
|
|
32
31
|
class TestExpectations(BaseModel):
|
|
@@ -69,11 +68,11 @@ class LLM:
|
|
|
69
68
|
except Exception:
|
|
70
69
|
return DataProject(datasources=[], pipes=[])
|
|
71
70
|
|
|
72
|
-
async def generate_sql_sample_data(self, schema: str, rows: int = 20,
|
|
71
|
+
async def generate_sql_sample_data(self, schema: str, rows: int = 20, prompt: str = "") -> str:
|
|
73
72
|
response = await self.user_client._req(
|
|
74
73
|
"/v0/llm/mock",
|
|
75
74
|
method="POST",
|
|
76
|
-
data=f'{{"schema": "{urllib.parse.quote(schema)}", "rows": {rows}, "context": "{
|
|
75
|
+
data=f'{{"schema": "{urllib.parse.quote(schema)}", "rows": {rows}, "context": "{prompt}"}}',
|
|
77
76
|
headers={"Content-Type": "application/json"},
|
|
78
77
|
)
|
|
79
78
|
return response.get("result", "")
|
|
@@ -90,6 +89,8 @@ class LLM:
|
|
|
90
89
|
{"role": "system", "content": create_test_calls_prompt.format(context=context)},
|
|
91
90
|
{"role": "user", "content": f"Pipe content: {pipe_content}\nPipe params: {pipe_params}"},
|
|
92
91
|
],
|
|
92
|
+
temperature=0.2,
|
|
93
|
+
seed=42,
|
|
93
94
|
response_format=TestExpectations,
|
|
94
95
|
)
|
|
95
96
|
return completion.choices[0].message.parsed or TestExpectations(tests=[])
|
|
@@ -9,7 +9,7 @@ from tinybird.tb.modules.config import CLIConfig
|
|
|
9
9
|
from tinybird.tb.modules.exceptions import CLIException
|
|
10
10
|
|
|
11
11
|
# TODO: Use the official Tinybird image once it's available 'tinybirdco/tinybird-local:latest'
|
|
12
|
-
TB_IMAGE_NAME = "
|
|
12
|
+
TB_IMAGE_NAME = "tinybirdco/tinybird-local:latest"
|
|
13
13
|
TB_CONTAINER_NAME = "tinybird-local"
|
|
14
14
|
TB_LOCAL_PORT = int(os.getenv("TB_LOCAL_PORT", 80))
|
|
15
15
|
TB_LOCAL_HOST = f"http://localhost:{TB_LOCAL_PORT}"
|
tinybird/tb/modules/login.py
CHANGED
|
@@ -151,7 +151,7 @@ def login(host: str, workspace: str):
|
|
|
151
151
|
if workspace:
|
|
152
152
|
params["workspace_id"] = workspace
|
|
153
153
|
response = requests.get(
|
|
154
|
-
f"
|
|
154
|
+
f"{host}/v0/user/tokens?{urlencode(params)}",
|
|
155
155
|
headers={"Authorization": f"Bearer {auth_code[0]}"},
|
|
156
156
|
)
|
|
157
157
|
data = response.json()
|
tinybird/tb/modules/mock.py
CHANGED
|
@@ -15,10 +15,10 @@ from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
|
15
15
|
@cli.command()
|
|
16
16
|
@click.argument("datasource", type=str)
|
|
17
17
|
@click.option("--rows", type=int, default=10, help="Number of events to send")
|
|
18
|
-
@click.option("--
|
|
18
|
+
@click.option("--prompt", type=str, default="", help="Extra context to use for data generation")
|
|
19
19
|
@click.option("--folder", type=str, default=".", help="Folder where datafiles will be placed")
|
|
20
20
|
@coro
|
|
21
|
-
async def mock(datasource: str, rows: int,
|
|
21
|
+
async def mock(datasource: str, rows: int, prompt: str, folder: str) -> None:
|
|
22
22
|
"""Load sample data into a Data Source.
|
|
23
23
|
|
|
24
24
|
Args:
|
|
@@ -35,15 +35,15 @@ async def mock(datasource: str, rows: int, context: str, folder: str) -> None:
|
|
|
35
35
|
datasource_path = Path("datasources", f"{datasource}.datasource")
|
|
36
36
|
datasource_path = Path(folder) / datasource_path
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
if not
|
|
40
|
-
# load the
|
|
41
|
-
if
|
|
42
|
-
click.echo(FeedbackManager.gray(message=f"Using
|
|
43
|
-
|
|
38
|
+
prompt_path = Path(folder) / "fixtures" / f"{datasource_name}.prompt"
|
|
39
|
+
if not prompt:
|
|
40
|
+
# load the prompt from the fixture.prompt file if it exists
|
|
41
|
+
if prompt_path.exists():
|
|
42
|
+
click.echo(FeedbackManager.gray(message=f"Using prompt for {prompt_path}..."))
|
|
43
|
+
prompt = prompt_path.read_text()
|
|
44
44
|
else:
|
|
45
|
-
click.echo(FeedbackManager.gray(message=f"Overriding
|
|
46
|
-
|
|
45
|
+
click.echo(FeedbackManager.gray(message=f"Overriding prompt for {datasource_name}..."))
|
|
46
|
+
prompt_path.write_text(prompt)
|
|
47
47
|
|
|
48
48
|
click.echo(FeedbackManager.gray(message=f"Creating fixture for {datasource_name}..."))
|
|
49
49
|
datasource_content = datasource_path.read_text()
|
|
@@ -52,7 +52,9 @@ async def mock(datasource: str, rows: int, context: str, folder: str) -> None:
|
|
|
52
52
|
user_client.token = config.get_user_token()
|
|
53
53
|
llm = LLM(client=user_client)
|
|
54
54
|
tb_client = await get_tinybird_local_client(os.path.abspath(folder))
|
|
55
|
-
sql = await llm.generate_sql_sample_data(datasource_content, rows=rows,
|
|
55
|
+
sql = await llm.generate_sql_sample_data(datasource_content, rows=rows, prompt=prompt)
|
|
56
|
+
if os.environ.get('TB_DEBUG', '') != '':
|
|
57
|
+
print(sql)
|
|
56
58
|
result = await tb_client.query(f"{sql} FORMAT JSON")
|
|
57
59
|
data = result.get("data", [])[:rows]
|
|
58
60
|
fixture_name = build_fixture_name(datasource_path.absolute(), datasource_name, datasource_content)
|
|
@@ -60,4 +62,4 @@ async def mock(datasource: str, rows: int, context: str, folder: str) -> None:
|
|
|
60
62
|
click.echo(FeedbackManager.success(message="✓ Done!"))
|
|
61
63
|
|
|
62
64
|
except Exception as e:
|
|
63
|
-
raise CLIException(FeedbackManager.error
|
|
65
|
+
raise CLIException(FeedbackManager.error_exception(error=e))
|
tinybird/tb/modules/pipe.py
CHANGED
|
@@ -17,7 +17,6 @@ import tinybird.context as context
|
|
|
17
17
|
from tinybird.client import AuthNoTokenException, DoesNotExistException, TinyB
|
|
18
18
|
from tinybird.config import DEFAULT_API_HOST, FeatureFlags
|
|
19
19
|
from tinybird.feedback_manager import FeedbackManager
|
|
20
|
-
from tinybird.tb.modules.branch import warn_if_in_live
|
|
21
20
|
from tinybird.tb.modules.cli import cli
|
|
22
21
|
from tinybird.tb.modules.common import (
|
|
23
22
|
coro,
|
|
@@ -499,9 +498,6 @@ async def pipe_delete(ctx: click.Context, pipe_name_or_id: str, yes: bool):
|
|
|
499
498
|
result = await process_file(file_path, client)
|
|
500
499
|
pipe_name_or_id = result[0]["name"]
|
|
501
500
|
|
|
502
|
-
semver: str = ctx.ensure_object(dict)["config"]["semver"]
|
|
503
|
-
await warn_if_in_live(semver)
|
|
504
|
-
|
|
505
501
|
if yes or click.confirm(FeedbackManager.warning_confirm_delete_pipe(pipe=pipe_name_or_id)):
|
|
506
502
|
try:
|
|
507
503
|
await client.pipe_delete(pipe_name_or_id)
|
tinybird/tb/modules/test.py
CHANGED
|
@@ -20,6 +20,32 @@ from tinybird.tb.modules.exceptions import CLIException
|
|
|
20
20
|
from tinybird.tb.modules.llm import LLM, TestExpectation
|
|
21
21
|
from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
22
22
|
|
|
23
|
+
yaml.SafeDumper.org_represent_str = yaml.SafeDumper.represent_str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def repr_str(dumper, data):
|
|
27
|
+
if "\n" in data:
|
|
28
|
+
return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|")
|
|
29
|
+
return dumper.org_represent_str(data)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
yaml.add_representer(str, repr_str, Dumper=yaml.SafeDumper)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def generate_test_file(pipe_name: str, tests: List[TestExpectation], folder: Optional[str], mode: str = "w"):
|
|
36
|
+
base = Path("tests")
|
|
37
|
+
if folder:
|
|
38
|
+
base = Path(folder) / base
|
|
39
|
+
|
|
40
|
+
base.mkdir(parents=True, exist_ok=True)
|
|
41
|
+
|
|
42
|
+
yaml_str = yaml.safe_dump(tests, sort_keys=False)
|
|
43
|
+
formatted_yaml = yaml_str.replace("- name:", "\n- name:")
|
|
44
|
+
|
|
45
|
+
path = base / f"{pipe_name}.yaml"
|
|
46
|
+
with open(path, mode) as f:
|
|
47
|
+
f.write(formatted_yaml)
|
|
48
|
+
|
|
23
49
|
|
|
24
50
|
@cli.group()
|
|
25
51
|
@click.pass_context
|
|
@@ -46,16 +72,6 @@ async def test_create(ctx: click.Context, pipe: str, prompt: Optional[str], fold
|
|
|
46
72
|
Create a test for an existing endpoint
|
|
47
73
|
"""
|
|
48
74
|
|
|
49
|
-
def generate_test_file(pipe_name: str, tests: List[TestExpectation]):
|
|
50
|
-
base = Path("tests")
|
|
51
|
-
if folder:
|
|
52
|
-
base = Path(folder) / base
|
|
53
|
-
base.mkdir(parents=True, exist_ok=True)
|
|
54
|
-
|
|
55
|
-
path = base / f"{pipe_name}.yaml"
|
|
56
|
-
with open(path, "w") as f:
|
|
57
|
-
yaml.dump(tests, f)
|
|
58
|
-
|
|
59
75
|
try:
|
|
60
76
|
pipe_path = Path(pipe)
|
|
61
77
|
pipe_name = pipe
|
|
@@ -82,25 +98,73 @@ async def test_create(ctx: click.Context, pipe: str, prompt: Optional[str], fold
|
|
|
82
98
|
)
|
|
83
99
|
valid_test_expectations = []
|
|
84
100
|
for test in test_expectations.tests:
|
|
85
|
-
|
|
101
|
+
valid_test = test.model_dump()
|
|
102
|
+
test_params = (
|
|
103
|
+
valid_test["parameters"] if valid_test["parameters"].startswith("?") else f"?{valid_test['parameters']}"
|
|
104
|
+
)
|
|
105
|
+
response = ""
|
|
86
106
|
try:
|
|
87
107
|
response = await client._req(f"/v0/pipes/{pipe_name}.ndjson{test_params}")
|
|
88
108
|
except Exception:
|
|
89
|
-
|
|
109
|
+
valid_test["expected_http_status"] = 500
|
|
90
110
|
|
|
91
|
-
|
|
92
|
-
valid_test_expectations.append(
|
|
111
|
+
valid_test["expected_result"] = response
|
|
112
|
+
valid_test_expectations.append(valid_test)
|
|
93
113
|
if valid_test_expectations:
|
|
94
|
-
generate_test_file(pipe_name, valid_test_expectations)
|
|
114
|
+
generate_test_file(pipe_name, valid_test_expectations, folder, mode="a")
|
|
95
115
|
click.echo(FeedbackManager.info(message=f"✓ /tests/{pipe_name}.yaml"))
|
|
96
116
|
click.echo(FeedbackManager.success(message="✓ Done!\n"))
|
|
97
117
|
except Exception as e:
|
|
98
118
|
raise CLIException(FeedbackManager.error_exception(error=e))
|
|
99
119
|
|
|
100
120
|
|
|
121
|
+
@test.command(
|
|
122
|
+
name="update",
|
|
123
|
+
help="Update the test expectations for a file or a test.",
|
|
124
|
+
)
|
|
125
|
+
@click.argument("pipe", type=str)
|
|
126
|
+
@click.option(
|
|
127
|
+
"--folder",
|
|
128
|
+
default=".",
|
|
129
|
+
type=click.Path(exists=True, file_okay=False),
|
|
130
|
+
help="Folder where datafiles will be placed",
|
|
131
|
+
)
|
|
132
|
+
@click.pass_context
|
|
133
|
+
@coro
|
|
134
|
+
async def test_update(ctx: click.Context, pipe: str, folder: Optional[str]) -> None:
|
|
135
|
+
client = await get_tinybird_local_client(os.path.abspath(folder))
|
|
136
|
+
|
|
137
|
+
pipe_tests_path = Path(pipe)
|
|
138
|
+
pipe_name = pipe
|
|
139
|
+
if pipe_tests_path.suffix == ".yaml":
|
|
140
|
+
pipe_name = pipe_tests_path.stem
|
|
141
|
+
else:
|
|
142
|
+
pipe_tests_path = Path("tests", f"{pipe}.yaml")
|
|
143
|
+
|
|
144
|
+
click.echo(FeedbackManager.gray(message=f"\nUpdating tests expectations for {pipe_name} endpoint..."))
|
|
145
|
+
pipe_tests_path = Path(folder) / pipe_tests_path
|
|
146
|
+
pipe_tests_content = yaml.safe_load(pipe_tests_path.read_text())
|
|
147
|
+
for test in pipe_tests_content:
|
|
148
|
+
test_params = test["parameters"] if test["parameters"].startswith("?") else f"?{test['parameters']}"
|
|
149
|
+
response = ""
|
|
150
|
+
try:
|
|
151
|
+
response = await client._req(f"/v0/pipes/{pipe_name}.ndjson{test_params}")
|
|
152
|
+
except Exception:
|
|
153
|
+
test["expected_http_status"] = 500
|
|
154
|
+
else:
|
|
155
|
+
if "expected_http_status" in test:
|
|
156
|
+
del test["expected_http_status"]
|
|
157
|
+
|
|
158
|
+
test["expected_result"] = response
|
|
159
|
+
|
|
160
|
+
generate_test_file(pipe_name, pipe_tests_content, folder)
|
|
161
|
+
click.echo(FeedbackManager.info(message=f"✓ /tests/{pipe_name}.yaml"))
|
|
162
|
+
click.echo(FeedbackManager.success(message="✓ Done!\n"))
|
|
163
|
+
|
|
164
|
+
|
|
101
165
|
@test.command(
|
|
102
166
|
name="run",
|
|
103
|
-
help="Run the test suite, a file, or a test.
|
|
167
|
+
help="Run the test suite, a file, or a test.",
|
|
104
168
|
)
|
|
105
169
|
@click.argument("file", nargs=-1)
|
|
106
170
|
@click.option(
|
|
@@ -120,7 +184,16 @@ async def test_run(ctx: click.Context, file: Tuple[str, ...], folder: Optional[s
|
|
|
120
184
|
test_file_content = yaml.safe_load(test_file_path.read_text())
|
|
121
185
|
for test in test_file_content:
|
|
122
186
|
try:
|
|
123
|
-
|
|
187
|
+
test_params = test["parameters"] if test["parameters"].startswith("?") else f"?{test['parameters']}"
|
|
188
|
+
response = ""
|
|
189
|
+
try:
|
|
190
|
+
response = await client._req(f"/v0/pipes/{test_file_path.stem}.ndjson{test_params}")
|
|
191
|
+
except Exception:
|
|
192
|
+
if "expected_http_status" not in test:
|
|
193
|
+
raise Exception("Expected to not fail but got an error")
|
|
194
|
+
if test["expected_http_status"] != 500:
|
|
195
|
+
raise Exception(f"Expected {test['expected_http_status']} but got another status")
|
|
196
|
+
|
|
124
197
|
if test["expected_result"] != response:
|
|
125
198
|
diff = difflib.ndiff(
|
|
126
199
|
test["expected_result"].splitlines(keepends=True), response.splitlines(keepends=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev18
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -16,6 +16,7 @@ Requires-Dist: croniter (==1.3.8)
|
|
|
16
16
|
Requires-Dist: docker (==7.1.0)
|
|
17
17
|
Requires-Dist: GitPython (~=3.1.32)
|
|
18
18
|
Requires-Dist: humanfriendly (~=8.2)
|
|
19
|
+
Requires-Dist: prompt-toolkit (==3.0.48)
|
|
19
20
|
Requires-Dist: pydantic (~=2.8.0)
|
|
20
21
|
Requires-Dist: pyperclip (==1.8.2)
|
|
21
22
|
Requires-Dist: pyyaml (<6.1,>=6.0)
|
|
@@ -15,48 +15,47 @@ tinybird/syncasync.py,sha256=fAvq0qkRgqXqXMKwbY2iJNYqLT_r6mDsh1MRpGKrdRU,27763
|
|
|
15
15
|
tinybird/tornado_template.py,sha256=o2HguxrL1Evnt8o3IvrsI8Zm6JtRQ3zhLJKf1XyR3SQ,41965
|
|
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=
|
|
18
|
+
tinybird/tb/cli.py,sha256=onCxcKvTV4RuokC5V3t82OXWAIwgU6pMWs8rpWOUi_o,815
|
|
19
19
|
tinybird/tb/modules/auth.py,sha256=hynZ-Temot8YBsySUWKSFzZlYadtFPxG3o6lCSu1n6E,9018
|
|
20
|
-
tinybird/tb/modules/
|
|
21
|
-
tinybird/tb/modules/
|
|
22
|
-
tinybird/tb/modules/
|
|
23
|
-
tinybird/tb/modules/
|
|
24
|
-
tinybird/tb/modules/
|
|
25
|
-
tinybird/tb/modules/
|
|
26
|
-
tinybird/tb/modules/config.py,sha256=ppWvACHrSLkb5hOoQLYNby2w8jR76-8Kx2NBCst7ntQ,11760
|
|
20
|
+
tinybird/tb/modules/build.py,sha256=RILQAcx6Im8JSaL3ybJTOAm_oatuxdEfbVYl-5eAIgo,8998
|
|
21
|
+
tinybird/tb/modules/build_shell.py,sha256=hmOlKl_rz3cG8z4pAybi2WnzuaD4NbCBU-IQ_zWrock,12254
|
|
22
|
+
tinybird/tb/modules/cicd.py,sha256=Xa3M7Egq4eDS6QIhrx8C8Ixf-R7oiZpO-5ZBPqYAKtI,5344
|
|
23
|
+
tinybird/tb/modules/cli.py,sha256=PRURYKphzjqVltMG647D8ADGS-YFR2rAkDNEwUTTDjk,53082
|
|
24
|
+
tinybird/tb/modules/common.py,sha256=XfpzFVT9xJZ_HH7EZRLAjRMkTtz5rP7Njld5-EwMqiA,72400
|
|
25
|
+
tinybird/tb/modules/config.py,sha256=ri4Gwyzqol6-NofTjHnWquuDzJOjHbkaAnboO8JNENY,11499
|
|
27
26
|
tinybird/tb/modules/connection.py,sha256=ZSqBGoRiJedjHKEyB_fr1ybucOHtaad8d7uqGa2Q92M,28668
|
|
28
|
-
tinybird/tb/modules/create.py,sha256=
|
|
29
|
-
tinybird/tb/modules/datasource.py,sha256=
|
|
27
|
+
tinybird/tb/modules/create.py,sha256=jSVh8ysT5OoQ0EUg3ETU3VtKZayqFWBjPjcQSdYa7Sc,9882
|
|
28
|
+
tinybird/tb/modules/datasource.py,sha256=rX7RnrXl4xxPwGxkj1DgLr521wjNXEixAeAyxMrkJJk,35472
|
|
30
29
|
tinybird/tb/modules/exceptions.py,sha256=4A2sSjCEqKUMqpP3WI00zouCWW4uLaghXXLZBSw04mY,3363
|
|
31
30
|
tinybird/tb/modules/fmt.py,sha256=UszEQO15fdzQ49QEj7Unhu68IKwSuKPsOrKhk2p2TAg,3547
|
|
32
31
|
tinybird/tb/modules/job.py,sha256=eoBVyA24lYIPonU88Jn7FF9hBKz1kScy9_w_oWreuc4,2952
|
|
33
|
-
tinybird/tb/modules/llm.py,sha256=
|
|
32
|
+
tinybird/tb/modules/llm.py,sha256=OcyRzQ0V392XsiGFwrrpjkCuV6AdE6cnhh6cDKPQt7U,3102
|
|
34
33
|
tinybird/tb/modules/local.py,sha256=hV2fvHPaVHVzKwVoVDFAIbJZslOX1_COx96DZrR-dW8,5151
|
|
35
|
-
tinybird/tb/modules/local_common.py,sha256=
|
|
36
|
-
tinybird/tb/modules/login.py,sha256=
|
|
37
|
-
tinybird/tb/modules/mock.py,sha256=
|
|
38
|
-
tinybird/tb/modules/pipe.py,sha256=
|
|
34
|
+
tinybird/tb/modules/local_common.py,sha256=PsQu0Sg8BruusPzlzvs6dd2WlomvOcks-B37A798-Ls,2133
|
|
35
|
+
tinybird/tb/modules/login.py,sha256=kx3I197rOaBzyBMNyFKUoLK7sGXD5NWURJFvUbU6lZc,5832
|
|
36
|
+
tinybird/tb/modules/mock.py,sha256=cpEmfSv5Osy_YF5eaFcAlpAYi0oVlX1NQH4mnAKvlUI,2884
|
|
37
|
+
tinybird/tb/modules/pipe.py,sha256=P_W5HW1-UEidWlw0pty-n_qYvCAyMlNorBmWzmCP7cU,30906
|
|
39
38
|
tinybird/tb/modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
40
39
|
tinybird/tb/modules/table.py,sha256=hG-PRDVuFp2uph41WpoLRV1yjp3RI2fi_iGGiI0rdxU,7695
|
|
41
40
|
tinybird/tb/modules/tag.py,sha256=1qQWyk1p3Btv3LzM8VbJG-k7x2-pFuAlYCg3QL6QewI,3480
|
|
42
41
|
tinybird/tb/modules/telemetry.py,sha256=iEGnMuCuNhvF6ln__j6X9MSTwL_0Hm-GgFHHHvhfknk,10466
|
|
43
|
-
tinybird/tb/modules/test.py,sha256=
|
|
42
|
+
tinybird/tb/modules/test.py,sha256=wvD3wDDAhvNyrFtsGXYfk45OuKY9Kix-1n8pzIhlhx4,8024
|
|
44
43
|
tinybird/tb/modules/token.py,sha256=r0oeG1RpOOzHtqbUaHBiOmhE55HfNIvReAAWyKl9fJg,12695
|
|
45
44
|
tinybird/tb/modules/workspace.py,sha256=FVlh-kbiZp5Gvp6dGFxi0UD8ail77rMamXLhqdVwrZ0,10916
|
|
46
45
|
tinybird/tb/modules/workspace_members.py,sha256=08W0onEYkKLEC5TkAI07cxN9XSquEm7HnL7OkHAVDjo,8715
|
|
47
46
|
tinybird/tb/modules/datafile/build.py,sha256=rFdK_GerPDgPfyPfZ4EZ0-cQqWfHd6htS0ls-Yy7khk,92491
|
|
48
47
|
tinybird/tb/modules/datafile/build_common.py,sha256=74547h5ja4C66DAwDMabj75FA_BUTJxTJv-24tSFmrs,4551
|
|
49
48
|
tinybird/tb/modules/datafile/build_datasource.py,sha256=fquzEGwk9NL_0K5YYG86Xtvgn4J5YHtRUoKJxbQGO0s,17344
|
|
50
|
-
tinybird/tb/modules/datafile/build_pipe.py,sha256=
|
|
51
|
-
tinybird/tb/modules/datafile/common.py,sha256=
|
|
49
|
+
tinybird/tb/modules/datafile/build_pipe.py,sha256=V5u21NEpSCWNVl46Cdn_I_bOojxpgSrg1MnScPDqx4U,27648
|
|
50
|
+
tinybird/tb/modules/datafile/common.py,sha256=NEX_fzDD1WGdo1oYMX8_w_M_wZQPvLAEOzGwC3Ph1mc,75632
|
|
52
51
|
tinybird/tb/modules/datafile/diff.py,sha256=-iaP7GvAzZtZSa8jPgVpOFlTRutxgxRBLBcGL1_RFr4,6743
|
|
53
52
|
tinybird/tb/modules/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
54
53
|
tinybird/tb/modules/datafile/fixture.py,sha256=YHlL4tojmPwm343Y8KO6r7d5Bhsk7U3lKP-oLMeBMsY,1771
|
|
55
54
|
tinybird/tb/modules/datafile/format_common.py,sha256=zNWDXvwSKC9_T5e9R92LLj9ekDflVWwsllhGQilZsnY,2184
|
|
56
55
|
tinybird/tb/modules/datafile/format_datasource.py,sha256=tsnCjONISvhFuucKNbIHkT__UmlUbcswx5mwI9hiDQc,6216
|
|
57
56
|
tinybird/tb/modules/datafile/format_pipe.py,sha256=R5tnlEccLn3KX6ehtC_H2sGQNrthuJUiVSN9z_-KGCY,7474
|
|
58
|
-
tinybird/tb/modules/datafile/parse_datasource.py,sha256=
|
|
59
|
-
tinybird/tb/modules/datafile/parse_pipe.py,sha256=
|
|
57
|
+
tinybird/tb/modules/datafile/parse_datasource.py,sha256=mAGN72mviRS0rtpAD0kODhlu-N8j1fX2kp5D1GUzP6U,1464
|
|
58
|
+
tinybird/tb/modules/datafile/parse_pipe.py,sha256=9_j-wB4gsWtrXY8Gypt4EkOH6BepJpZkjFdZfbW-H50,2914
|
|
60
59
|
tinybird/tb/modules/datafile/pipe_checker.py,sha256=cp80Bru41GlyMRvyERpdJNXns2MjmtIAWFnBLF4cPXs,24667
|
|
61
60
|
tinybird/tb/modules/datafile/pull.py,sha256=wBXBAZIruIyCRQZvfYxMc7h1q35NlKF-hFIF-bUm4iY,5956
|
|
62
61
|
tinybird/tb/modules/tinyunit/tinyunit.py,sha256=IkjRCvb8HnNEE84rtl0I1b9gQVpE_zCE8MvFFet51sg,11716
|
|
@@ -67,8 +66,8 @@ tinybird/tb_cli_modules/config.py,sha256=6NTgIdwf0X132A1j6G_YrdPep87ymZ9b5pABabK
|
|
|
67
66
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
68
67
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
69
68
|
tinybird/tb_cli_modules/telemetry.py,sha256=iEGnMuCuNhvF6ln__j6X9MSTwL_0Hm-GgFHHHvhfknk,10466
|
|
70
|
-
tinybird-0.0.1.
|
|
71
|
-
tinybird-0.0.1.
|
|
72
|
-
tinybird-0.0.1.
|
|
73
|
-
tinybird-0.0.1.
|
|
74
|
-
tinybird-0.0.1.
|
|
69
|
+
tinybird-0.0.1.dev18.dist-info/METADATA,sha256=BXYeNyT3BS_18oePeU18RfW9Zbx0p6Rq_uPFRCN_Ss8,2446
|
|
70
|
+
tinybird-0.0.1.dev18.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
71
|
+
tinybird-0.0.1.dev18.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
72
|
+
tinybird-0.0.1.dev18.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
|
|
73
|
+
tinybird-0.0.1.dev18.dist-info/RECORD,,
|