tinybird 0.0.1.dev10__py3-none-any.whl → 0.0.1.dev11__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.

@@ -81,11 +81,12 @@ class FileChangeHandler(FileSystemEventHandler):
81
81
  click.echo(FeedbackManager.error_exception(error=e))
82
82
 
83
83
  def on_created(self, event: Any) -> None:
84
- click.echo(FeedbackManager.highlight(message=f"\n\n⟲ Changes detected in {event.src_path}\n"))
85
- try:
86
- self.process([event.src_path])
87
- except Exception as e:
88
- click.echo(FeedbackManager.error_exception(error=e))
84
+ if not event.is_directory and any(event.src_path.endswith(ext) for ext in [".datasource", ".pipe", ".ndjson"]):
85
+ click.echo(FeedbackManager.highlight(message=f"\n\n⟲ Changes detected in {event.src_path}\n"))
86
+ try:
87
+ self.process([event.src_path])
88
+ except Exception as e:
89
+ click.echo(FeedbackManager.error_exception(error=e))
89
90
 
90
91
 
91
92
  def watch_files(
@@ -147,6 +147,14 @@ async def get_tinybird_local_client(path: Optional[str] = None):
147
147
  return config.get_client(host=TB_LOCAL_HOST, token=token)
148
148
 
149
149
 
150
+ @cli.command()
151
+ def upgrade():
152
+ """Upgrade Tinybird CLI to the latest version"""
153
+ click.echo(FeedbackManager.info(message="Upgrading Tinybird CLI..."))
154
+ os.system(f"{os.getenv('HOME')}/.local/bin/uv tool upgrade tinybird")
155
+ click.echo(FeedbackManager.success(message="Tinybird CLI upgraded"))
156
+
157
+
150
158
  @cli.group()
151
159
  @click.pass_context
152
160
  def local(ctx):
@@ -33,9 +33,19 @@ async def mock(datasource: str, rows: int, context: str, folder: str) -> None:
33
33
  datasource_name = datasource_path.stem
34
34
  else:
35
35
  datasource_path = Path("datasources", f"{datasource}.datasource")
36
-
37
36
  datasource_path = Path(folder) / datasource_path
38
37
 
38
+ context_path = Path(folder) / "fixtures" / f"{datasource_name}.prompt"
39
+ if not context:
40
+ # load the context from the fixture.prompt file if it exists
41
+ if context_path.exists():
42
+ click.echo(FeedbackManager.gray(message=f"Using context for {context_path}..."))
43
+ context = context_path.read_text()
44
+ else:
45
+ click.echo(FeedbackManager.gray(message=f"Overriding context for {datasource_name}..."))
46
+ context_path.write_text(context)
47
+
48
+
39
49
  click.echo(FeedbackManager.gray(message=f"Creating fixture for {datasource_name}..."))
40
50
  datasource_content = datasource_path.read_text()
41
51
  llm_config = CLIConfig.get_llm_config()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird
3
- Version: 0.0.1.dev10
3
+ Version: 0.0.1.dev11
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -18,7 +18,7 @@ tinybird/ch_utils/engine.py,sha256=OXkBhlzGjZotjD0vaT-rFIbSGV4tpiHxE8qO_ip0SyQ,4
18
18
  tinybird/tb/cli.py,sha256=6Lu3wsCNepAxjJCWy4c6RhVPArBtm8TlUcSxX--TsBo,783
19
19
  tinybird/tb/modules/auth.py,sha256=hynZ-Temot8YBsySUWKSFzZlYadtFPxG3o6lCSu1n6E,9018
20
20
  tinybird/tb/modules/branch.py,sha256=R1tTUBGyI0p_dt2IAWbuyNOvemhjCIPwYxEmOxL3zOg,38468
21
- tinybird/tb/modules/build.py,sha256=qjK2hmQ4es1Et4mbG9ijr_ziAjxWex0G_U0pYqH-hd8,11606
21
+ tinybird/tb/modules/build.py,sha256=aqVmey7jkb-ZDRaxl5h66u3g9bmI46_j-u3hXEPPVho,11746
22
22
  tinybird/tb/modules/cicd.py,sha256=KCFfywFfvGRh24GZwqrhICiTK_arHelPs_X4EB-pXIw,7331
23
23
  tinybird/tb/modules/cli.py,sha256=c-XNRu-idb2Hz43IT9ejd-QjsZy-xPQ3rnrdVIz0wxM,56568
24
24
  tinybird/tb/modules/common.py,sha256=Vubc2AIR8BfEupnT5e1Y8OYGEyvNoIcjo8th-SaUflw,80111
@@ -30,8 +30,8 @@ tinybird/tb/modules/exceptions.py,sha256=4A2sSjCEqKUMqpP3WI00zouCWW4uLaghXXLZBSw
30
30
  tinybird/tb/modules/fmt.py,sha256=UszEQO15fdzQ49QEj7Unhu68IKwSuKPsOrKhk2p2TAg,3547
31
31
  tinybird/tb/modules/job.py,sha256=eoBVyA24lYIPonU88Jn7FF9hBKz1kScy9_w_oWreuc4,2952
32
32
  tinybird/tb/modules/llm.py,sha256=TvJJ9BlKISAb1SVI-pnHp_PcHcxGfTyjxOE_qAz90Ck,2441
33
- tinybird/tb/modules/local.py,sha256=9YBFLSVmn8AYoYeXoLwWrvEF1e6vQ7_ZJhZ35cGeeWY,6637
34
- tinybird/tb/modules/mock.py,sha256=kpKN0J6jZSmQ4F_PYY93IuO1qfwhRIxCNlP6XnLyiDg,2224
33
+ tinybird/tb/modules/local.py,sha256=sImiZwUMsvJRGBVZovOGBqxXo0SBWYwpZ7b8zVG_QNc,6943
34
+ tinybird/tb/modules/mock.py,sha256=RohmEhNfudVryn2pJrI4fASE74inovNxzN0ew85Y830,2747
35
35
  tinybird/tb/modules/pipe.py,sha256=9wnfKbp2FkmLiJgVk3qbra76ktwsUTXghu6j9cCEahQ,31058
36
36
  tinybird/tb/modules/prompts.py,sha256=g0cBW2ePzuftib02wV82VIcAZd59buAAusnirAbzqVE,8662
37
37
  tinybird/tb/modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
@@ -65,8 +65,8 @@ tinybird/tb_cli_modules/config.py,sha256=6NTgIdwf0X132A1j6G_YrdPep87ymZ9b5pABabK
65
65
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
66
66
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
67
67
  tinybird/tb_cli_modules/telemetry.py,sha256=iEGnMuCuNhvF6ln__j6X9MSTwL_0Hm-GgFHHHvhfknk,10466
68
- tinybird-0.0.1.dev10.dist-info/METADATA,sha256=HP7ty3Kt_uj6hpn_ooK40yAnUMOq3OvKXzhiPHNMGnI,2405
69
- tinybird-0.0.1.dev10.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
70
- tinybird-0.0.1.dev10.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
71
- tinybird-0.0.1.dev10.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
72
- tinybird-0.0.1.dev10.dist-info/RECORD,,
68
+ tinybird-0.0.1.dev11.dist-info/METADATA,sha256=F7NlFSAcq7ZbchPPjfnBdz5R-QohYQSy_MwXY3YWroI,2405
69
+ tinybird-0.0.1.dev11.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
70
+ tinybird-0.0.1.dev11.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
71
+ tinybird-0.0.1.dev11.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
72
+ tinybird-0.0.1.dev11.dist-info/RECORD,,