tinybird-cli 5.8.2.dev0__tar.gz → 5.8.2.dev2__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.
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/PKG-INFO +11 -1
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/__cli__.py +2 -2
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/config.py +9 -1
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/datafile.py +26 -10
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/auth.py +1 -1
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/cli.py +3 -8
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/PKG-INFO +11 -1
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/setup.cfg +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/client.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/connectors.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/context.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/datatypes.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/feedback_manager.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/git_settings.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/sql.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/sql_template.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/syncasync.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/token.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.8.2.
|
|
3
|
+
Version: 5.8.2.dev2
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.8.2.dev2
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Changed` `tb pull` now applies the same formatting as `tb fmt` when pulling a Data Source file
|
|
25
|
+
|
|
26
|
+
5.8.2.dev1
|
|
27
|
+
***********
|
|
28
|
+
|
|
29
|
+
- `Removed` misleading output message when `tb auth --token` with TB_TOKEN env var also defined
|
|
30
|
+
|
|
21
31
|
5.8.1
|
|
22
32
|
***********
|
|
23
33
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '5.8.2.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '5.8.2.dev2'
|
|
8
|
+
__revision__ = '61ed1f8'
|
|
@@ -35,6 +35,10 @@ LEGACY_HOSTS = {
|
|
|
35
35
|
"https://api.wadus4.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus4",
|
|
36
36
|
"https://api.wadus5.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus5",
|
|
37
37
|
"https://api.wadus6.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus6",
|
|
38
|
+
"https://api.wadus1.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus1",
|
|
39
|
+
"https://api.wadus2.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus2",
|
|
40
|
+
"https://api.wadus3.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus3",
|
|
41
|
+
"https://api.wadus4.aws.tinybird.co": "https://app.wadus.tinybird.co/aws/wadus4",
|
|
38
42
|
"https://ui.tinybird.co": "https://app.tinybird.co/gcp/europe-west3",
|
|
39
43
|
"https://ui.us-east.tinybird.co": "https://app.tinybird.co/gcp/us-east4",
|
|
40
44
|
"https://ui.us-east.aws.tinybird.co": "https://app.tinybird.co/aws/us-east-1",
|
|
@@ -48,9 +52,13 @@ LEGACY_HOSTS = {
|
|
|
48
52
|
"https://inditex-rt-pro.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-rt-pro",
|
|
49
53
|
"https://inditex-pro.tinybird.co": "https://app.inditex.tinybird.co/gcp/inditex-pro",
|
|
50
54
|
"https://ui.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
|
|
51
|
-
"https://ui.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/
|
|
55
|
+
"https://ui.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/split-us-west-2",
|
|
52
56
|
"https://ui.split.azure.tinybird.co": "https://app.tinybird.co/azure/split-us-east",
|
|
53
57
|
"https://ui.split-westeurope.azure.tinybird.co": "https://app.tinybird.co/azure/split-westeurope",
|
|
58
|
+
"https://api.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
|
|
59
|
+
"https://api.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/split-us-west-2",
|
|
60
|
+
"https://api.split.azure.tinybird.co": "https://app.tinybird.co/azure/split-us-east",
|
|
61
|
+
"https://api.split-westeurope.azure.tinybird.co": "https://app.tinybird.co/azure/split-westeurope",
|
|
54
62
|
"https://ui.wadus1.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus1",
|
|
55
63
|
"https://ui.wadus2.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus2",
|
|
56
64
|
"https://ui.wadus3.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus3",
|
|
@@ -4788,11 +4788,12 @@ async def format_datasource(
|
|
|
4788
4788
|
datafile: Optional[Datafile] = None,
|
|
4789
4789
|
for_deploy_diff: bool = False,
|
|
4790
4790
|
skip_eval: bool = False,
|
|
4791
|
+
content: Optional[str] = None,
|
|
4791
4792
|
) -> str:
|
|
4792
4793
|
if datafile:
|
|
4793
4794
|
doc = datafile
|
|
4794
4795
|
else:
|
|
4795
|
-
doc = parse_datasource(filename, replace_includes=replace_includes, skip_eval=skip_eval)
|
|
4796
|
+
doc = parse_datasource(filename, replace_includes=replace_includes, skip_eval=skip_eval, content=content)
|
|
4796
4797
|
|
|
4797
4798
|
file_parts: List[str] = []
|
|
4798
4799
|
if for_diff:
|
|
@@ -5031,17 +5032,18 @@ async def format_node(
|
|
|
5031
5032
|
|
|
5032
5033
|
async def format_pipe(
|
|
5033
5034
|
filename: str,
|
|
5034
|
-
line_length: Optional[int],
|
|
5035
|
+
line_length: Optional[int] = DEFAULT_FMT_LINE_LENGTH,
|
|
5035
5036
|
unroll_includes: bool = False,
|
|
5036
5037
|
replace_includes: bool = False,
|
|
5037
5038
|
datafile: Optional[Datafile] = None,
|
|
5038
5039
|
for_deploy_diff: bool = False,
|
|
5039
5040
|
skip_eval: bool = False,
|
|
5041
|
+
content: Optional[str] = None,
|
|
5040
5042
|
) -> str:
|
|
5041
5043
|
if datafile:
|
|
5042
5044
|
doc = datafile
|
|
5043
5045
|
else:
|
|
5044
|
-
doc = parse_pipe(filename, replace_includes=replace_includes, skip_eval=skip_eval)
|
|
5046
|
+
doc = parse_pipe(filename, replace_includes=replace_includes, skip_eval=skip_eval, content=content)
|
|
5045
5047
|
|
|
5046
5048
|
file_parts: List[str] = []
|
|
5047
5049
|
format_sources(file_parts, doc)
|
|
@@ -5123,6 +5125,7 @@ async def folder_pull(
|
|
|
5123
5125
|
force: bool,
|
|
5124
5126
|
verbose: bool = True,
|
|
5125
5127
|
progress_bar: bool = False,
|
|
5128
|
+
fmt: bool = False,
|
|
5126
5129
|
): # noqa: C901
|
|
5127
5130
|
pattern = re.compile(match) if match else None
|
|
5128
5131
|
|
|
@@ -5157,6 +5160,7 @@ async def folder_pull(
|
|
|
5157
5160
|
extension: str,
|
|
5158
5161
|
get_resource_function: str,
|
|
5159
5162
|
progress_bar: bool = False,
|
|
5163
|
+
fmt: bool = False,
|
|
5160
5164
|
):
|
|
5161
5165
|
async def write_resource(k: Dict[str, Any]):
|
|
5162
5166
|
name = f"{k['name']}.{extension}"
|
|
@@ -5167,6 +5171,13 @@ async def folder_pull(
|
|
|
5167
5171
|
return
|
|
5168
5172
|
|
|
5169
5173
|
resource = await getattr(client, get_resource_function)(k["original_name"])
|
|
5174
|
+
resource_to_write = resource
|
|
5175
|
+
|
|
5176
|
+
if fmt:
|
|
5177
|
+
if extension == "datasource":
|
|
5178
|
+
resource_to_write = await format_datasource(name, content=resource)
|
|
5179
|
+
elif extension == "pipe":
|
|
5180
|
+
resource_to_write = await format_pipe(name, content=resource)
|
|
5170
5181
|
|
|
5171
5182
|
dest_folder = folder
|
|
5172
5183
|
if "." in k["name"] and extension != "token":
|
|
@@ -5189,14 +5200,17 @@ async def folder_pull(
|
|
|
5189
5200
|
# versions are a client only thing so
|
|
5190
5201
|
# datafiles from the server do not contains information about versions
|
|
5191
5202
|
if k["version"] >= 0:
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5203
|
+
if fmt:
|
|
5204
|
+
resource_to_write = "\n" + resource_to_write # fmt strips the first line
|
|
5205
|
+
|
|
5206
|
+
resource_to_write = f"VERSION {k['version']}\n" + resource_to_write
|
|
5207
|
+
if resource_to_write:
|
|
5208
|
+
matches = re.findall(r"([^\s\.]*__v\d+)", resource_to_write)
|
|
5195
5209
|
for match in set(matches):
|
|
5196
5210
|
m = match.split("__v")[0]
|
|
5197
5211
|
if m in resources or m in resource_names:
|
|
5198
|
-
|
|
5199
|
-
fd.write(
|
|
5212
|
+
resource_to_write = resource_to_write.replace(match, m)
|
|
5213
|
+
fd.write(resource_to_write)
|
|
5200
5214
|
else:
|
|
5201
5215
|
if verbose:
|
|
5202
5216
|
click.echo(FeedbackManager.info_skip_already_exists())
|
|
@@ -5224,8 +5238,10 @@ async def folder_pull(
|
|
|
5224
5238
|
|
|
5225
5239
|
resources = list(datasources_versions.keys()) + list(pipes_versions.keys())
|
|
5226
5240
|
|
|
5227
|
-
await write_files(
|
|
5228
|
-
|
|
5241
|
+
await write_files(
|
|
5242
|
+
datasources_versions, resources, "datasource", "datasource_file", progress_bar=progress_bar, fmt=fmt
|
|
5243
|
+
)
|
|
5244
|
+
await write_files(pipes_versions, resources, "pipe", "pipe_file", progress_bar=progress_bar, fmt=fmt)
|
|
5229
5245
|
|
|
5230
5246
|
return
|
|
5231
5247
|
|
|
@@ -73,7 +73,7 @@ async def auth(ctx: click.Context, token: str, host: str, region: str, connector
|
|
|
73
73
|
if not token and not ctx.parent.params.get("token") and not env_token:
|
|
74
74
|
config.set_token(None)
|
|
75
75
|
else:
|
|
76
|
-
if env_token:
|
|
76
|
+
if env_token and not token:
|
|
77
77
|
click.echo(FeedbackManager.info_reading_from_env(value="token", envvar="TB_TOKEN"))
|
|
78
78
|
|
|
79
79
|
regions: Optional[List[Region]] = None
|
|
@@ -691,21 +691,16 @@ async def push(
|
|
|
691
691
|
)
|
|
692
692
|
@click.option("--match", default=None, help="Retrieve any resourcing matching the pattern. eg --match _test")
|
|
693
693
|
@click.option("-f", "--force", is_flag=True, default=False, help="Override existing files")
|
|
694
|
+
@click.option("--fmt", is_flag=True, default=False, help="Format files before saving")
|
|
694
695
|
@click.pass_context
|
|
695
696
|
@coro
|
|
696
|
-
async def pull(
|
|
697
|
-
ctx: Context,
|
|
698
|
-
folder: str,
|
|
699
|
-
auto: bool,
|
|
700
|
-
match: Optional[str],
|
|
701
|
-
force: bool,
|
|
702
|
-
) -> None:
|
|
697
|
+
async def pull(ctx: Context, folder: str, auto: bool, match: Optional[str], force: bool, fmt: bool) -> None:
|
|
703
698
|
"""Retrieve latest versions for project files from Tinybird."""
|
|
704
699
|
|
|
705
700
|
client = ctx.ensure_object(dict)["client"]
|
|
706
701
|
folder = folder if folder else getcwd()
|
|
707
702
|
|
|
708
|
-
return await folder_pull(client, folder, auto, match, force)
|
|
703
|
+
return await folder_pull(client, folder, auto, match, force, fmt=fmt)
|
|
709
704
|
|
|
710
705
|
|
|
711
706
|
@cli.command()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.8.2.
|
|
3
|
+
Version: 5.8.2.dev2
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.8.2.dev2
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Changed` `tb pull` now applies the same formatting as `tb fmt` when pulling a Data Source file
|
|
25
|
+
|
|
26
|
+
5.8.2.dev1
|
|
27
|
+
***********
|
|
28
|
+
|
|
29
|
+
- `Removed` misleading output message when `tb auth --token` with TB_TOKEN env var also defined
|
|
30
|
+
|
|
21
31
|
5.8.1
|
|
22
32
|
***********
|
|
23
33
|
|
|
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-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.8.2.dev0 → tinybird-cli-5.8.2.dev2}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|