tinybird 0.0.1.dev125__tar.gz → 0.0.1.dev127__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.

Files changed (109) hide show
  1. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/PKG-INFO +1 -1
  2. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/__cli__.py +2 -2
  3. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/cli.py +0 -1
  4. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/secret.py +5 -2
  5. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/telemetry.py +14 -1
  6. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/PKG-INFO +1 -1
  7. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/SOURCES.txt +0 -1
  8. tinybird-0.0.1.dev125/tinybird/tb/modules/fmt.py +0 -94
  9. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/setup.cfg +0 -0
  10. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/__cli__.py +0 -0
  11. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/ch_utils/constants.py +0 -0
  12. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/ch_utils/engine.py +0 -0
  13. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/check_pypi.py +0 -0
  14. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/client.py +0 -0
  15. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/config.py +0 -0
  16. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/connectors.py +0 -0
  17. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/context.py +0 -0
  18. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/datafile.py +0 -0
  19. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/datatypes.py +0 -0
  20. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/feedback_manager.py +0 -0
  21. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/git_settings.py +0 -0
  22. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/prompts.py +0 -0
  23. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/sql.py +0 -0
  24. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/sql_template.py +0 -0
  25. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/sql_template_fmt.py +0 -0
  26. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/sql_toolset.py +0 -0
  27. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/syncasync.py +0 -0
  28. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/client.py +0 -0
  29. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/config.py +0 -0
  30. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/auth.py +0 -0
  31. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/build.py +0 -0
  32. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/cicd.py +0 -0
  33. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/cli.py +0 -0
  34. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/common.py +0 -0
  35. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/config.py +0 -0
  36. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/connection.py +0 -0
  37. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/copy.py +0 -0
  38. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/create.py +0 -0
  39. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/build.py +0 -0
  40. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/build_common.py +0 -0
  41. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
  42. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  43. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/common.py +0 -0
  44. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/diff.py +0 -0
  45. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/exceptions.py +0 -0
  46. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/fixture.py +0 -0
  47. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/format_common.py +0 -0
  48. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  49. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  50. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
  51. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
  52. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  53. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/playground.py +0 -0
  54. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datafile/pull.py +0 -0
  55. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/datasource.py +0 -0
  56. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/deployment.py +0 -0
  57. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/endpoint.py +0 -0
  58. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/exceptions.py +0 -0
  59. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/feedback_manager.py +0 -0
  60. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/infra.py +0 -0
  61. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/job.py +0 -0
  62. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/llm.py +0 -0
  63. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/llm_utils.py +0 -0
  64. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/local.py +0 -0
  65. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/local_common.py +0 -0
  66. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/login.py +0 -0
  67. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/logout.py +0 -0
  68. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/materialization.py +0 -0
  69. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/mock.py +0 -0
  70. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/open.py +0 -0
  71. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/pipe.py +0 -0
  72. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/project.py +0 -0
  73. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/regions.py +0 -0
  74. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/shell.py +0 -0
  75. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/table.py +0 -0
  76. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/tag.py +0 -0
  77. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/test.py +0 -0
  78. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  79. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  80. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/token.py +0 -0
  81. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/watch.py +0 -0
  82. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/workspace.py +0 -0
  83. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb/modules/workspace_members.py +0 -0
  84. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli.py +0 -0
  85. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/auth.py +0 -0
  86. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/branch.py +0 -0
  87. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/cicd.py +0 -0
  88. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/cli.py +0 -0
  89. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/common.py +0 -0
  90. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/config.py +0 -0
  91. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/connection.py +0 -0
  92. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/datasource.py +0 -0
  93. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/exceptions.py +0 -0
  94. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/fmt.py +0 -0
  95. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/job.py +0 -0
  96. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/pipe.py +0 -0
  97. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/regions.py +0 -0
  98. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/tag.py +0 -0
  99. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/telemetry.py +0 -0
  100. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/test.py +0 -0
  101. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  102. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  103. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/workspace.py +0 -0
  104. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  105. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird/tornado_template.py +0 -0
  106. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/dependency_links.txt +0 -0
  107. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/entry_points.txt +0 -0
  108. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/requires.txt +0 -0
  109. {tinybird-0.0.1.dev125 → tinybird-0.0.1.dev127}/tinybird.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev125
3
+ Version: 0.0.1.dev127
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -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__ = '0.0.1.dev125'
8
- __revision__ = '57c6bd7'
7
+ __version__ = '0.0.1.dev127'
8
+ __revision__ = '7cdc84d'
@@ -14,7 +14,6 @@ import tinybird.tb.modules.create
14
14
  import tinybird.tb.modules.datasource
15
15
  import tinybird.tb.modules.deployment
16
16
  import tinybird.tb.modules.endpoint
17
- import tinybird.tb.modules.fmt
18
17
  import tinybird.tb.modules.infra
19
18
  import tinybird.tb.modules.job
20
19
  import tinybird.tb.modules.local
@@ -48,19 +48,22 @@ async def secret_ls(ctx: click.Context, match: Optional[str]):
48
48
 
49
49
  @secret.command(name="set")
50
50
  @click.argument("name")
51
- @click.argument("value")
51
+ @click.argument("value", required=False)
52
52
  @click.pass_context
53
53
  @coro
54
- async def secret_set(ctx: click.Context, name: str, value: str):
54
+ async def secret_set(ctx: click.Context, name: str, value: Optional[str]):
55
55
  """Create or update secrets"""
56
56
  try:
57
+ value = value or click.prompt("Enter value", hide_input=True)
57
58
  click.echo(FeedbackManager.highlight(message=f"\n» Setting secret '{name}'..."))
59
+
58
60
  client: TinyB = ctx.ensure_object(dict)["client"]
59
61
  existing_secret = None
60
62
  try:
61
63
  existing_secret = await client.get_secret(name)
62
64
  except Exception:
63
65
  pass
66
+
64
67
  if existing_secret:
65
68
  await client.update_secret(name, value)
66
69
  else:
@@ -281,6 +281,19 @@ def add_telemetry_sysinfo_event() -> None:
281
281
 
282
282
  ci_product: Optional[str] = get_ci_product_name()
283
283
 
284
+ cli_args = sys.argv[1:] if len(sys.argv) > 1 else []
285
+
286
+ is_secret_command = "secret" in cli_args
287
+ if is_secret_command:
288
+ need_to_obfuscate = "set" in cli_args
289
+
290
+ if need_to_obfuscate:
291
+ set_index = cli_args.index("set")
292
+ value_index = set_index + 2
293
+ is_index_valid = value_index < len(cli_args)
294
+ if is_index_valid:
295
+ cli_args[value_index] = "*****"
296
+
284
297
  add_telemetry_event(
285
298
  "system_info",
286
299
  platform=platform.platform(),
@@ -292,7 +305,7 @@ def add_telemetry_sysinfo_event() -> None:
292
305
  is_ci=ci_product is not None,
293
306
  ci_product=ci_product,
294
307
  cli_version=CURRENT_VERSION,
295
- cli_args=sys.argv[1:] if len(sys.argv) > 1 else [],
308
+ cli_args=cli_args,
296
309
  )
297
310
 
298
311
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev125
3
+ Version: 0.0.1.dev127
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -42,7 +42,6 @@ tinybird/tb/modules/deployment.py
42
42
  tinybird/tb/modules/endpoint.py
43
43
  tinybird/tb/modules/exceptions.py
44
44
  tinybird/tb/modules/feedback_manager.py
45
- tinybird/tb/modules/fmt.py
46
45
  tinybird/tb/modules/infra.py
47
46
  tinybird/tb/modules/job.py
48
47
  tinybird/tb/modules/llm.py
@@ -1,94 +0,0 @@
1
- import difflib
2
- import sys
3
- from pathlib import Path
4
- from typing import List, Optional
5
-
6
- import aiofiles
7
- import click
8
- from click import Context
9
-
10
- from tinybird.tb.modules.cli import cli
11
- from tinybird.tb.modules.common import coro
12
- from tinybird.tb.modules.datafile.common import is_file_a_datasource
13
- from tinybird.tb.modules.datafile.diff import color_diff, peek
14
- from tinybird.tb.modules.datafile.format_datasource import format_datasource
15
- from tinybird.tb.modules.datafile.format_pipe import format_pipe
16
- from tinybird.tb.modules.feedback_manager import FeedbackManager
17
-
18
-
19
- @cli.command()
20
- @click.argument("filenames", type=click.Path(exists=True), nargs=-1, required=True)
21
- @click.option(
22
- "--line-length",
23
- is_flag=False,
24
- default=100,
25
- help="A number indicating the maximum characters per line in the node SQL, lines will be splitted based on the SQL syntax and the number of characters passed as a parameter",
26
- )
27
- @click.option("--dry-run", is_flag=True, default=False, help="Don't ask to override the local file")
28
- @click.option("--yes", is_flag=True, default=False, help="Do not ask for confirmation to overwrite the local file")
29
- @click.option(
30
- "--diff",
31
- is_flag=True,
32
- default=False,
33
- help="Formats local file, prints the diff and exits 1 if different, 0 if equal",
34
- )
35
- @click.pass_context
36
- @coro
37
- async def fmt(
38
- ctx: Context, filenames: List[str], line_length: int, dry_run: bool, yes: bool, diff: bool
39
- ) -> Optional[str]:
40
- """
41
- Formats a .datasource, .pipe or .incl file.
42
-
43
- This command removes comments starting with # from the file, use DESCRIPTION instead.
44
-
45
- The format command tries to parse the datafile so syntax errors might rise.
46
-
47
- .incl files must contain a NODE definition.
48
- """
49
-
50
- result = ""
51
- failed = []
52
- for filename in filenames:
53
- if not diff:
54
- click.echo(filename)
55
- extensions = Path(filename).suffixes
56
- if is_file_a_datasource(filename):
57
- result = await format_datasource(filename, skip_eval=True)
58
- elif (".pipe" in extensions) or (".incl" in extensions):
59
- result = await format_pipe(filename, line_length, skip_eval=True)
60
- else:
61
- click.echo("Unsupported file type. Supported files types are: .pipe and .datasource")
62
- return None
63
-
64
- if diff:
65
- result = result.rstrip("\n")
66
- lines_fmt = [f"{line}\n" for line in result.split("\n")]
67
- async with aiofiles.open(filename, "r") as file:
68
- lines_file = await file.readlines()
69
- diff_result = difflib.unified_diff(
70
- lines_file, lines_fmt, fromfile=f"{Path(filename).name} local", tofile="fmt datafile"
71
- )
72
- diff_result = color_diff(diff_result)
73
- not_empty, diff_lines = peek(diff_result)
74
- if not_empty:
75
- sys.stdout.writelines(diff_lines)
76
- failed.append(filename)
77
- click.echo("")
78
- else:
79
- click.echo(result)
80
- if dry_run:
81
- return None
82
-
83
- if yes or click.confirm(FeedbackManager.prompt_override_local_file(name=filename)):
84
- async with aiofiles.open(f"{filename}", "w") as file:
85
- await file.write(result)
86
-
87
- click.echo(FeedbackManager.success_generated_local_file(file=filename))
88
-
89
- if len(failed):
90
- click.echo(FeedbackManager.error_failed_to_format_files(number=len(failed)))
91
- for f in failed:
92
- click.echo(f"tb fmt {f} --yes")
93
- sys.exit(1)
94
- return result