tinybird 0.0.1.dev214__py3-none-any.whl → 0.0.1.dev216__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/tb/__cli__.py CHANGED
@@ -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.dev214'
8
- __revision__ = '9ddb3a4'
7
+ __version__ = '0.0.1.dev216'
8
+ __revision__ = 'b1646cc'
@@ -110,7 +110,7 @@ def build_project(project: Project, tb_client: TinyB, silent: bool = False) -> O
110
110
  return False
111
111
 
112
112
  for file_path in project_files:
113
- relative_path = str(Path(file_path).relative_to(project_path))
113
+ relative_path = Path(file_path).relative_to(project_path).as_posix()
114
114
  with open(file_path, "rb") as fd:
115
115
  content_type = DATAFILE_TYPE_TO_CONTENT_TYPE.get(Path(file_path).suffix, "application/unknown")
116
116
  files.append(
@@ -318,41 +318,21 @@ line experience. To opt-out, set TB_CLI_TELEMETRY_OPTOUT to '1' or 'true'."""
318
318
 
319
319
  # Only suggest if the similarity score is high enough (adjust threshold as needed)
320
320
  if score >= 65:
321
- # Initialize lists for arguments before and after command
322
- args_before_cmd: List[str] = []
323
- args_after_cmd: List[str] = []
324
-
325
- # Reconstruct the full command with all arguments
326
- full_command = ctx.command_path # Gets the base command (e.g., 'tb')
327
-
328
- # Add any options/arguments that came before the command
329
- if ctx.args:
330
- found_cmd = False
331
- for arg in ctx.args:
332
- if arg == cmd_name:
333
- found_cmd = True
334
- elif found_cmd:
335
- args_after_cmd.append(arg)
336
- else:
337
- args_before_cmd.append(arg)
338
-
339
- if args_before_cmd:
340
- full_command += " " + " ".join(args_before_cmd)
341
-
342
- # Add any options from params
343
- if ctx.params:
344
- for param, value in ctx.params.items():
345
- if value is True:
346
- full_command += f" --{param}"
347
- elif value is not False and value is not None:
348
- full_command += f" --{param} {value}"
349
-
350
- # Add the suggested command
351
- full_command += f" {suggestion}"
352
-
353
- # Add any arguments that came after the command
354
- if args_after_cmd:
355
- full_command += " " + " ".join(args_after_cmd)
321
+ # Build the suggested command from the raw arguments,
322
+ # preserving only those explicitly passed by the user.
323
+ raw_args = sys.argv[1:]
324
+ try:
325
+ idx = raw_args.index(cmd_name)
326
+ except ValueError:
327
+ # If the mistyped command isn't found, use all as 'after'.
328
+ before = []
329
+ after = raw_args
330
+ else:
331
+ before = raw_args[:idx]
332
+ after = raw_args[idx + 1 :]
333
+
334
+ full_tokens = [ctx.command_path, *before, suggestion, *after]
335
+ full_command = " ".join(full_tokens)
356
336
 
357
337
  click.echo(f"\nWARNING: '{cmd_name}' is not a valid command. ", nl=False)
358
338
  # Ask for confirmation
@@ -541,7 +541,7 @@ def create_deployment(
541
541
  ("context://", ("cli-version", "1.0.0", "text/plain")),
542
542
  ]
543
543
  for file_path in project.get_project_files():
544
- relative_path = str(Path(file_path).relative_to(project.path))
544
+ relative_path = Path(file_path).relative_to(project.path).as_posix()
545
545
  with open(file_path, "rb") as fd:
546
546
  content_type = DATAFILE_TYPE_TO_CONTENT_TYPE.get(Path(file_path).suffix, "application/unknown")
547
547
  files.append((MULTIPART_BOUNDARY_DATA_PROJECT, (relative_path, fd.read().decode("utf-8"), content_type)))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev214
3
+ Version: 0.0.1.dev216
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -17,21 +17,21 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
17
17
  tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
18
18
  tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
19
19
  tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
20
- tinybird/tb/__cli__.py,sha256=qzrCX6ZHtTLhO2voXLhTSF5uAoQeZKVxl5fl5iOe0_U,247
20
+ tinybird/tb/__cli__.py,sha256=mA8tARgcpYXiyhPqdbnpYFDjf_bvSisl_rENpsTa58Y,247
21
21
  tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
22
22
  tinybird/tb/cli.py,sha256=0xYk2Ip4vb3nNFbxfTdG3VoIgdRvUKVbUVU_mviErPA,1107
23
23
  tinybird/tb/client.py,sha256=FKj61vY9STPW03kfVcxYuY1_csI-kP-mc1ERQfqJtg8,56505
24
24
  tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
25
- tinybird/tb/modules/build.py,sha256=KU8AzcO4jHw5hYg1zaorb3YtIpSmAbK8QZe-Wm6egtQ,20061
25
+ tinybird/tb/modules/build.py,sha256=T36msoBK5g9AZlrJnFRPvlZbrdE265LY1q3Y4YqvS3w,20067
26
26
  tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
27
27
  tinybird/tb/modules/cli.py,sha256=k6Bp-lWC-ruMMB47lxwsinLQt4qJL_n84hjyxi9JYt4,15676
28
- tinybird/tb/modules/common.py,sha256=nzAF52gkDPx1_LKg3l-j1Ko9Y1o_Wq9dYxxhu47bAeg,84221
28
+ tinybird/tb/modules/common.py,sha256=WWvbDSQmyYUy9Xyc_BqtrdRzpDdzLuE9i_pWhoA1a8k,83440
29
29
  tinybird/tb/modules/config.py,sha256=VnzYVUo4q1RBEEMMce4_OCrKp4erhgkRPHElydVlKj0,11488
30
30
  tinybird/tb/modules/connection.py,sha256=rdEsdcP-AqyHiW3KNoETGPeTjk7Wt3It6z_SnmInGcc,18648
31
31
  tinybird/tb/modules/copy.py,sha256=zHN1d5NA-MFsgbk2kKJq2P9qA8dNOnIsIa60QpVnSwc,4458
32
32
  tinybird/tb/modules/create.py,sha256=sncG6iaeS_AApY1EmmfYEdj9B6-1CPZJzvTmfJQj_Rc,22112
33
33
  tinybird/tb/modules/datasource.py,sha256=jpe5-C-rZ5Dnitwo_t84OPqS_bV44Sz1y1u85-2djnQ,39362
34
- tinybird/tb/modules/deployment.py,sha256=IgVvSRLGpvdGMbnzh_UdEonPzJ1ky9s3K3lDmZ2e0-Y,28385
34
+ tinybird/tb/modules/deployment.py,sha256=ByXIgEvwxB49pJEKKj0EJIfORWyflCYr04k8961nBkA,28391
35
35
  tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
36
36
  tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
37
37
  tinybird/tb/modules/endpoint.py,sha256=rC1CZiEZDMb5chByf4xZhv5PsfkoLeIVDScHQ-QcBsE,12072
@@ -82,8 +82,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
82
82
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
83
83
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
84
84
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
85
- tinybird-0.0.1.dev214.dist-info/METADATA,sha256=H9CqMXWA9DXr5o8ETAUuJ7Cmex1106v8dd6A_7RSHG0,1682
86
- tinybird-0.0.1.dev214.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
- tinybird-0.0.1.dev214.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
- tinybird-0.0.1.dev214.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
- tinybird-0.0.1.dev214.dist-info/RECORD,,
85
+ tinybird-0.0.1.dev216.dist-info/METADATA,sha256=OFw1ggbnDCkrP-xifq_bE75sbm4GxpPP5CEK0KjDAG0,1682
86
+ tinybird-0.0.1.dev216.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
+ tinybird-0.0.1.dev216.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
+ tinybird-0.0.1.dev216.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
+ tinybird-0.0.1.dev216.dist-info/RECORD,,