tinybird 0.0.1.dev182__tar.gz → 0.0.1.dev184__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.dev182 → tinybird-0.0.1.dev184}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/create.py +46 -10
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/fixture.py +11 -5
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datasource.py +7 -9
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/auth.py +2 -3
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/branch.py +2 -3
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/cli.py +8 -10
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/workspace.py +11 -12
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/setup.cfg +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/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.dev184'
|
|
8
|
+
__revision__ = '0d5d2de'
|
|
@@ -3,8 +3,10 @@ import os
|
|
|
3
3
|
import re
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any, Dict, List, Optional
|
|
6
|
+
from urllib.parse import urlparse
|
|
6
7
|
|
|
7
8
|
import click
|
|
9
|
+
import requests
|
|
8
10
|
|
|
9
11
|
from tinybird.prompts import create_prompt, readme_prompt, rules_prompt
|
|
10
12
|
from tinybird.tb.client import TinyB
|
|
@@ -25,7 +27,7 @@ from tinybird.tb.modules.project import Project
|
|
|
25
27
|
@cli.command()
|
|
26
28
|
@click.option(
|
|
27
29
|
"--data",
|
|
28
|
-
type=
|
|
30
|
+
type=str,
|
|
29
31
|
default=None,
|
|
30
32
|
help="Initial data to be used to create the project. Tinybird Local and authentication are required.",
|
|
31
33
|
)
|
|
@@ -87,7 +89,10 @@ async def create(
|
|
|
87
89
|
|
|
88
90
|
data_result: List[Path] = []
|
|
89
91
|
if data:
|
|
90
|
-
|
|
92
|
+
if urlparse(data).scheme in ("http", "https"):
|
|
93
|
+
data_result = await create_resources_from_url(data, project, ctx_config)
|
|
94
|
+
else:
|
|
95
|
+
data_result = await create_resources_from_data(data, project, ctx_config)
|
|
91
96
|
result.extend(data_result)
|
|
92
97
|
|
|
93
98
|
prompt_result: List[Path] = []
|
|
@@ -134,14 +139,22 @@ async def create(
|
|
|
134
139
|
|
|
135
140
|
if data:
|
|
136
141
|
for ds_path in [ds for ds in data_result if ds.suffix == ".datasource"]:
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
parsed_url = urlparse(data)
|
|
143
|
+
if parsed_url.scheme in ("http", "https"):
|
|
144
|
+
response = requests.get(data) # noqa: ASYNC210
|
|
145
|
+
data_content = response.text
|
|
146
|
+
data_format = parsed_url.path.split(".")[-1]
|
|
147
|
+
else:
|
|
148
|
+
data_path = Path(data)
|
|
149
|
+
data_content = data_path.read_text()
|
|
150
|
+
data_format = data_path.suffix.lstrip(".")
|
|
151
|
+
|
|
139
152
|
ds_name = ds_path.stem
|
|
140
|
-
data_format = data_path.suffix.lstrip(".")
|
|
141
153
|
datasource_path = Path(folder) / "datasources" / f"{ds_name}.datasource"
|
|
142
|
-
click.echo(FeedbackManager.info(message=f"✓ /fixtures/{ds_name}"))
|
|
154
|
+
click.echo(FeedbackManager.info(message=f"✓ /fixtures/{ds_name}.{data_format}"))
|
|
143
155
|
persist_fixture(ds_name, data_content, folder, format=data_format)
|
|
144
156
|
created_something = True
|
|
157
|
+
|
|
145
158
|
elif prompt and prompt_result:
|
|
146
159
|
ds_results = [path for path in prompt_result if path.suffix == ".datasource"]
|
|
147
160
|
for datasource_path in ds_results:
|
|
@@ -452,8 +465,8 @@ async def create_resources_from_data(
|
|
|
452
465
|
project: Project,
|
|
453
466
|
config: Dict[str, Any],
|
|
454
467
|
) -> List[Path]:
|
|
455
|
-
folder_path = project.path
|
|
456
468
|
local_client = await get_tinybird_local_client(config)
|
|
469
|
+
folder_path = project.path
|
|
457
470
|
path = folder_path / data
|
|
458
471
|
result: List[Path] = []
|
|
459
472
|
format = path.suffix.lstrip(".")
|
|
@@ -465,10 +478,33 @@ async def create_resources_from_data(
|
|
|
465
478
|
pipe_file = generate_pipe_file(
|
|
466
479
|
f"{name}_endpoint",
|
|
467
480
|
f"""
|
|
468
|
-
|
|
469
|
-
|
|
481
|
+
NODE endpoint
|
|
482
|
+
SQL >
|
|
483
|
+
SELECT * from {name}
|
|
484
|
+
TYPE ENDPOINT
|
|
485
|
+
""",
|
|
486
|
+
project.folder,
|
|
487
|
+
)
|
|
488
|
+
result.append(pipe_file)
|
|
489
|
+
return result
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
async def create_resources_from_url(url: str, project: Project, config: Dict[str, Any]) -> List[Path]:
|
|
493
|
+
result: List[Path] = []
|
|
494
|
+
local_client = await get_tinybird_local_client(config)
|
|
495
|
+
format = url.split(".")[-1]
|
|
496
|
+
ds_file = await _generate_datafile(url, local_client, format=format, force=True)
|
|
497
|
+
result.append(ds_file)
|
|
498
|
+
name = ds_file.stem
|
|
499
|
+
no_pipes = len(project.get_pipe_files()) == 0
|
|
500
|
+
if no_pipes:
|
|
501
|
+
pipe_file = generate_pipe_file(
|
|
502
|
+
f"{name}_endpoint",
|
|
503
|
+
f"""
|
|
504
|
+
NODE endpoint
|
|
505
|
+
SQL >
|
|
470
506
|
SELECT * from {name}
|
|
471
|
-
|
|
507
|
+
TYPE ENDPOINT
|
|
472
508
|
""",
|
|
473
509
|
project.folder,
|
|
474
510
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
-
from typing import Any, Dict, List, Union
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
3
|
|
|
4
4
|
from tinybird.tb.modules.common import format_data_to_ndjson
|
|
5
5
|
|
|
@@ -17,10 +17,16 @@ def persist_fixture_sql(fixture_name: str, sql: str, folder: str) -> Path:
|
|
|
17
17
|
return fixture_file
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def persist_fixture(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
def persist_fixture(
|
|
21
|
+
fixture_name: str, data: Union[List[Dict[str, Any]], str], folder: str, format: str, target: Optional[str] = None
|
|
22
|
+
) -> Path:
|
|
23
|
+
if target:
|
|
24
|
+
fixture_file = Path(target)
|
|
25
|
+
extension = fixture_file.suffix
|
|
26
|
+
else:
|
|
27
|
+
fixture_dir = get_fixture_dir(folder)
|
|
28
|
+
fixture_file = fixture_dir / f"{fixture_name}.{format}"
|
|
29
|
+
extension = f".{format}"
|
|
24
30
|
if extension == FixtureExtension.NDJSON:
|
|
25
31
|
fixture_file.write_text(data if isinstance(data, str) else format_data_to_ndjson(data))
|
|
26
32
|
elif extension == FixtureExtension.CSV:
|
|
@@ -423,19 +423,15 @@ async def datasource_export(
|
|
|
423
423
|
Example usage:
|
|
424
424
|
- Export all rows as CSV: tb datasource export my_datasource
|
|
425
425
|
- Export 1000 rows as NDJSON: tb datasource export my_datasource --format ndjson --rows 1000
|
|
426
|
-
- Export to specific file: tb datasource export my_datasource --
|
|
426
|
+
- Export to specific file: tb datasource export my_datasource --target ./data/export.csv
|
|
427
427
|
"""
|
|
428
428
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
429
429
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
430
430
|
|
|
431
|
-
# Determine output filename if not provided
|
|
432
|
-
if not target:
|
|
433
|
-
target = f"{datasource}.{format_}"
|
|
434
|
-
|
|
435
431
|
# Build query with optional row limit
|
|
436
432
|
query = f"SELECT * FROM {datasource} WHERE {where or 1} LIMIT {rows}"
|
|
437
433
|
|
|
438
|
-
click.echo(FeedbackManager.highlight(message=f"\n» Exporting {datasource}
|
|
434
|
+
click.echo(FeedbackManager.highlight(message=f"\n» Exporting {datasource}"))
|
|
439
435
|
|
|
440
436
|
try:
|
|
441
437
|
if format_ == "csv":
|
|
@@ -445,11 +441,13 @@ async def datasource_export(
|
|
|
445
441
|
|
|
446
442
|
res = await client.query(query)
|
|
447
443
|
|
|
448
|
-
|
|
449
|
-
file_size = os.path.getsize(
|
|
444
|
+
target_path = persist_fixture(datasource, res, project.folder, format=format_, target=target)
|
|
445
|
+
file_size = os.path.getsize(target_path)
|
|
450
446
|
|
|
451
447
|
click.echo(
|
|
452
|
-
FeedbackManager.success(
|
|
448
|
+
FeedbackManager.success(
|
|
449
|
+
message=f"✓ Exported data to {str(target_path).replace(project.folder, '')} ({humanfriendly.format_size(file_size)})"
|
|
450
|
+
)
|
|
453
451
|
)
|
|
454
452
|
|
|
455
453
|
except Exception as e:
|
|
@@ -74,9 +74,8 @@ async def auth(ctx: click.Context, token: str, host: str, region: str, connector
|
|
|
74
74
|
# do a clean auth
|
|
75
75
|
if not token and not ctx.parent.params.get("token") and not env_token:
|
|
76
76
|
config.set_token(None)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
click.echo(FeedbackManager.info_reading_from_env(value="token", envvar="TB_TOKEN"))
|
|
77
|
+
elif env_token and not token:
|
|
78
|
+
click.echo(FeedbackManager.info_reading_from_env(value="token", envvar="TB_TOKEN"))
|
|
80
79
|
|
|
81
80
|
regions: Optional[List[Region]] = None
|
|
82
81
|
try_all_regions = True
|
|
@@ -597,9 +597,8 @@ async def regression_tests(
|
|
|
597
597
|
await print_branch_regression_tests_summary(client, job_id, config["host"])
|
|
598
598
|
except Exception as e:
|
|
599
599
|
raise CLIBranchException(FeedbackManager.error_exception(error=str(e)))
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
await _run_regression(type="coverage", wait=wait, run_in_main=main)
|
|
600
|
+
elif not ctx.invoked_subcommand:
|
|
601
|
+
await _run_regression(type="coverage", wait=wait, run_in_main=main)
|
|
603
602
|
|
|
604
603
|
|
|
605
604
|
async def _run_regression(
|
|
@@ -431,10 +431,9 @@ async def init(
|
|
|
431
431
|
error = True
|
|
432
432
|
else:
|
|
433
433
|
click.echo(FeedbackManager.info_cicd_already_exists(provider=cicd_provider.name))
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
await init_cicd(client, path=cli_git_release.working_dir(), data_project_dir=data_project_dir)
|
|
434
|
+
elif cicd:
|
|
435
|
+
data_project_dir = os.path.relpath(folder, cli_git_release.working_dir())
|
|
436
|
+
await init_cicd(client, path=cli_git_release.working_dir(), data_project_dir=data_project_dir)
|
|
438
437
|
|
|
439
438
|
if final_response:
|
|
440
439
|
if error:
|
|
@@ -1463,12 +1462,11 @@ async def deploy(
|
|
|
1463
1462
|
)
|
|
1464
1463
|
else:
|
|
1465
1464
|
click.echo(FeedbackManager.info_minor_patch_release_with_autopromote(version=new_version))
|
|
1466
|
-
|
|
1467
|
-
if
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
click.echo(FeedbackManager.info_minor_patch_release_no_autopromote(version=new_version))
|
|
1465
|
+
elif show_feedback:
|
|
1466
|
+
if dry_run:
|
|
1467
|
+
click.echo(FeedbackManager.info_dry_minor_patch_release_no_autopromote(version=new_version))
|
|
1468
|
+
else:
|
|
1469
|
+
click.echo(FeedbackManager.info_minor_patch_release_no_autopromote(version=new_version))
|
|
1472
1470
|
new_release = True
|
|
1473
1471
|
|
|
1474
1472
|
if new_release:
|
|
@@ -234,20 +234,19 @@ async def create_workspace(
|
|
|
234
234
|
if not organization:
|
|
235
235
|
raise CLIWorkspaceException(FeedbackManager.error_organization_not_found(organization_id=organization_id))
|
|
236
236
|
organization_name = organization.get("name")
|
|
237
|
+
elif len(organizations) == 0:
|
|
238
|
+
click.echo(FeedbackManager.warning_none_organization(ui_host=ui_host))
|
|
239
|
+
elif len(organizations) == 1:
|
|
240
|
+
organization_id = organizations[0].get("id")
|
|
241
|
+
organization_name = organizations[0].get("name")
|
|
237
242
|
else:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
organization_id =
|
|
242
|
-
organization_name =
|
|
243
|
+
sorted_organizations = sort_organizations_by_user(organizations, user_email=config.get_user_email())
|
|
244
|
+
current_organization = await ask_for_organization_interactively(sorted_organizations)
|
|
245
|
+
if current_organization:
|
|
246
|
+
organization_id = current_organization.get("id")
|
|
247
|
+
organization_name = current_organization.get("name")
|
|
243
248
|
else:
|
|
244
|
-
|
|
245
|
-
current_organization = await ask_for_organization_interactively(sorted_organizations)
|
|
246
|
-
if current_organization:
|
|
247
|
-
organization_id = current_organization.get("id")
|
|
248
|
-
organization_name = current_organization.get("name")
|
|
249
|
-
else:
|
|
250
|
-
return
|
|
249
|
+
return
|
|
251
250
|
|
|
252
251
|
# If we have at least workspace_name, we start the non interactive
|
|
253
252
|
# process, creating an empty workspace
|
|
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.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/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
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/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
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev182 → tinybird-0.0.1.dev184}/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
|
|
File without changes
|