tinybird 0.0.1.dev186__py3-none-any.whl → 0.0.1.dev188__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.dev186'
8
- __revision__ = '57239e4'
7
+ __version__ = '0.0.1.dev188'
8
+ __revision__ = 'f13c1f2'
@@ -177,7 +177,7 @@ class CICDGeneratorBase:
177
177
  continue
178
178
  with open(f"{path}/{cicd_file.full_path}", "wb") as f:
179
179
  f.write(content)
180
- click.echo(FeedbackManager.info_cicd_file_generated(file_path=cicd_file.full_path))
180
+ click.echo(FeedbackManager.info(message=cicd_file.full_path.replace("./.", ".")))
181
181
  if cicd_file.warning_message is not None:
182
182
  return FeedbackManager.warning_for_cicd_file(
183
183
  file_name=cicd_file.file_name, warning_message=cicd_file.warning_message.format(**params)
@@ -77,6 +77,11 @@ async def create(
77
77
 
78
78
  if not validate_project_structure(project):
79
79
  click.echo(FeedbackManager.highlight(message="\n» Creating new project structure..."))
80
+ click.echo(
81
+ FeedbackManager.info(
82
+ message="Learn more about data files https://www.tinybird.co/docs/forward/datafiles"
83
+ )
84
+ )
80
85
  create_project_structure(folder)
81
86
  click.echo(FeedbackManager.success(message="✓ Scaffolding completed!\n"))
82
87
  created_something = True
@@ -98,9 +103,9 @@ async def create(
98
103
  result.extend(prompt_result)
99
104
  readme_path = Path(root_folder) / "README.md"
100
105
  if readme_path.exists():
101
- click.echo(FeedbackManager.highlight(message="\n» Updating README.md..."))
106
+ click.echo(FeedbackManager.highlight(message="\n» Updating project description..."))
102
107
  else:
103
- click.echo(FeedbackManager.highlight(message="\n» Creating README.md..."))
108
+ click.echo(FeedbackManager.highlight(message="\n» Creating project description..."))
104
109
  readme_path.touch()
105
110
  llm = LLM(user_token=str(user_token), host=tb_client.host)
106
111
  readme_user_prompt = prompt or ""
@@ -113,10 +118,11 @@ async def create(
113
118
  )
114
119
  readme_result = extract_xml(readme_response, "readme")
115
120
  readme_path.write_text(readme_result)
121
+ click.echo(FeedbackManager.info(message="README.md"))
116
122
  created_something = True
117
123
 
118
124
  if data or prompt:
119
- click.echo(FeedbackManager.success(message="✓ Done!\n"))
125
+ click.echo(FeedbackManager.success(message="✓ Resources created!\n"))
120
126
 
121
127
  if not already_has_cicd(root_folder):
122
128
  click.echo(FeedbackManager.highlight(message="\n» Creating CI/CD files for GitHub and GitLab..."))
@@ -126,8 +132,9 @@ async def create(
126
132
  created_something = True
127
133
 
128
134
  if not already_has_cursor_rules(root_folder):
129
- click.echo(FeedbackManager.highlight(message="\n» Creating .cursorrules..."))
135
+ click.echo(FeedbackManager.highlight(message="\n» Creating rules..."))
130
136
  create_rules(root_folder, "tb", agent)
137
+ click.echo(FeedbackManager.info(message=".cursorrules"))
131
138
  click.echo(FeedbackManager.success(message="✓ Done!\n"))
132
139
  created_something = True
133
140
 
@@ -148,8 +155,9 @@ async def create(
148
155
 
149
156
  ds_name = ds_path.stem
150
157
  datasource_path = Path(folder) / "datasources" / f"{ds_name}.datasource"
151
- click.echo(FeedbackManager.info(message=f"/fixtures/{ds_name}.{data_format}"))
158
+ click.echo(FeedbackManager.info(message=f"/fixtures/{ds_name}.{data_format}"))
152
159
  persist_fixture(ds_name, data_content, folder, format=data_format)
160
+ click.echo(FeedbackManager.success(message="✓ Done!"))
153
161
  created_something = True
154
162
 
155
163
  elif prompt and prompt_result:
@@ -173,7 +181,8 @@ async def create(
173
181
  )
174
182
  if mock_data:
175
183
  persist_fixture(datasource_name, mock_data, folder, format="ndjson")
176
- click.echo(FeedbackManager.info(message=f"/fixtures/{datasource_name}"))
184
+ click.echo(FeedbackManager.info(message=f"/fixtures/{datasource_name}.ndjson"))
185
+ click.echo(FeedbackManager.success(message="✓ Done!"))
177
186
  created_something = True
178
187
 
179
188
  if not created_something and not len(result) > 0:
@@ -223,13 +232,27 @@ def already_has_cursor_rules(folder: str) -> bool:
223
232
 
224
233
  def create_project_structure(folder: str):
225
234
  folder_path = Path(folder)
226
- for x in PROJECT_PATHS:
235
+ PROJECT_PATHS_DESCRIPTIONS = {
236
+ "datasources →": "Where your data lives. Define the schema and settings for your tables.",
237
+ "endpoints →": "Expose real-time HTTP APIs of your transformed data.",
238
+ "materializations →": "Stream continuous updates of the result of a pipe into a new data source.",
239
+ "copies →": "Capture the result of a pipe at a moment in time and write it into a target data source.",
240
+ "pipes →": "Transform your data and reuse the logic in endpoints, materializations and copies.",
241
+ "fixtures →": "Files with sample data for your project.",
242
+ "tests →": "Test your pipe files with data validation tests.",
243
+ "connections →": "Connect to and ingest data from popular sources: Kafka, S3 or GCS.",
244
+ }
245
+
246
+ for x in PROJECT_PATHS_DESCRIPTIONS.keys():
227
247
  try:
228
- f = folder_path / x
248
+ path = x.split("→")[0].strip()
249
+ f = folder_path / path
229
250
  f.mkdir()
251
+ click.echo(
252
+ FeedbackManager.info(message=f"/{x} ") + FeedbackManager.gray(message=PROJECT_PATHS_DESCRIPTIONS[x])
253
+ )
230
254
  except FileExistsError:
231
255
  pass
232
- click.echo(FeedbackManager.info_path_created(path=x))
233
256
 
234
257
 
235
258
  async def create_resources_from_prompt(
@@ -326,7 +349,7 @@ def init_git(folder: str):
326
349
  else:
327
350
  gitignore_file.write_text(".tinyb\n.terraform\n")
328
351
 
329
- click.echo(FeedbackManager.info_file_created(file=".gitignore"))
352
+ click.echo(FeedbackManager.info(message=".gitignore"))
330
353
  except Exception as e:
331
354
  raise Exception(f"Error initializing Git: {e}")
332
355
 
@@ -54,7 +54,9 @@ def parse_pipe(
54
54
  if sql.strip()[0] == "%":
55
55
  # Note(eclbg): not sure what test_mode is for. I think it does something like using placeholder values
56
56
  # for the variables in the template.
57
- sql, _, variable_warnings = render_sql_template(sql[1:], test_mode=True, name=node["name"])
57
+ sql, _, variable_warnings = render_sql_template(
58
+ sql[1:], test_mode=True, name=node["name"], secrets=list(secrets.keys()) if secrets else None
59
+ )
58
60
  doc.warnings = variable_warnings
59
61
  # it'll fail with a ModuleNotFoundError when the toolset is not available but it returns the parsed doc
60
62
  from tinybird.sql_toolset import format_sql as toolset_format_sql
@@ -872,9 +872,9 @@ STEP 3: ADD KEY TO SERVICE ACCOUNT
872
872
  info_removing_pipe = info_message("** Removing pipe {pipe}")
873
873
  info_removing_pipe_not_found = info_message("** {pipe} not found")
874
874
  info_dry_removing_pipe = info_message("** [DRY RUN] Removing pipe {pipe}")
875
- info_path_created = info_message("/{path}")
876
- info_file_created = info_message("/{file}")
877
- info_path_already_exists = info_message("/{path} already exists, skipping")
875
+ info_path_created = info_message("/{path}")
876
+ info_file_created = info_message("/{file}")
877
+ info_path_already_exists = info_message("/{path} already exists, skipping")
878
878
  info_dottinyb_already_ignored = info_message("** - '.tinyb' already in .gitignore, skipping")
879
879
  info_dotdifftemp_already_ignored = info_message("** - '.diff_tmp' not found or already in .gitignore, skipping")
880
880
  info_dottinyenv_already_exists = info_message("** - '.tinyenv' already exists, skipping")
@@ -945,7 +945,7 @@ STEP 3: ADD KEY TO SERVICE ACCOUNT
945
945
  info_diff_resources_for_git_init = info_message(
946
946
  "** Checking diffs between remote Workspace and local. Hint: use 'tb diff' to check if your Data Project and Workspace synced"
947
947
  )
948
- info_cicd_file_generated = info_message("{file_path}")
948
+ info_cicd_file_generated = info_message("{file_path}")
949
949
  info_available_git_providers = info_message("** List of available providers:")
950
950
  info_git_release_init_without_diffs = info_message("** No diffs detected for '{workspace}'")
951
951
  info_deployment_detecting_changes_header = info_message("\n** Detecting changes from last commit ...")
@@ -190,11 +190,15 @@ def get_docker_client() -> DockerClient:
190
190
  raise e
191
191
  return client
192
192
  except Exception:
193
+ docker_location_message = ""
194
+ if docker_host:
195
+ docker_location_message = f"Trying to connect to Docker-compatible runtime at {docker_host}"
196
+
193
197
  raise CLILocalException(
194
198
  FeedbackManager.error(
195
199
  message=(
196
200
  f"No container runtime is running. Make sure a Docker-compatible runtime is installed and running. "
197
- f"Trying to connect to Docker-compatible runtime at {docker_host}\n\n"
201
+ f"{docker_location_message}\n\n"
198
202
  "If you're using a custom location, please provide it using the DOCKER_HOST environment variable."
199
203
  )
200
204
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev186
3
+ Version: 0.0.1.dev188
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -12,32 +12,32 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
12
12
  tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
13
13
  tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
14
14
  tinybird/ch_utils/engine.py,sha256=X4tE9OrfaUy6kO9cqVEzyI9cDcmOF3IAssRRzsTsfEQ,40781
15
- tinybird/tb/__cli__.py,sha256=fgDoHWj5-L_sJYYjP6ocah4vsol2C_odPl9VN2POpgU,247
15
+ tinybird/tb/__cli__.py,sha256=0dMMoeV7WGBd5xykwKr1XNZzsV203grOWkx1PgeDVgo,247
16
16
  tinybird/tb/check_pypi.py,sha256=rW4QmDRbtgKdUUwJCnBkVjmTjZSZGN-XgZhx7vMkC0w,1009
17
17
  tinybird/tb/cli.py,sha256=u3eGOhX0MHkuT6tiwaZ0_3twqLmqKXDAOxF7yV_Nn9Q,1075
18
18
  tinybird/tb/client.py,sha256=59GH0IoYSV_KUG0eEbDDYHSWH4OlkVnSRFXE3mYAM0s,56571
19
19
  tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
20
20
  tinybird/tb/modules/build.py,sha256=rRL5XKBdadMc9uVDEUt0GXm0h09Y6XXw199rdmRI1qo,19127
21
- tinybird/tb/modules/cicd.py,sha256=MnShTTJzKBYeajswF2jg7p7ZzupaeCgSriAN05MeEdg,7330
21
+ tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
22
22
  tinybird/tb/modules/cli.py,sha256=dXZs-MuqYPvxStVj7aLg36LwXtEB8NzTobDmHV9nzZI,15508
23
23
  tinybird/tb/modules/common.py,sha256=DYCjpj0iBaCDZ8BJ0MNG_6m6NyFMCrpQShIajHKLIfM,83373
24
24
  tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
25
25
  tinybird/tb/modules/connection.py,sha256=7oOR7x4PhBcm1ETFFCH2YJ_3oeGXjAbmx1cnZX9_L70,9014
26
26
  tinybird/tb/modules/copy.py,sha256=2Mm4FWKehOG7CoOhiF1m9UZJgJn0W1_cMolqju8ONYg,5805
27
- tinybird/tb/modules/create.py,sha256=3ccvOCcuJfhhaaoX60-6dSmnF8SfnOLTfVqLJs48jOA,18672
27
+ tinybird/tb/modules/create.py,sha256=sfIOcN3tujt7O1r9RNWqhhI-gQTDnO6zEgMwZHH2D8s,20201
28
28
  tinybird/tb/modules/datasource.py,sha256=0_6Cn07p5GoNBBGdu88pSeLvTWojln1-k23FsS8jTDs,17801
29
29
  tinybird/tb/modules/deployment.py,sha256=t6DDLJ1YdY3SJiTPbEG7CRblSLkbuqwzauQ9y65FWtY,27147
30
30
  tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
31
31
  tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
32
32
  tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
33
33
  tinybird/tb/modules/exceptions.py,sha256=5jK91w1LPmtqIUfDpHe_Op5OxGz8-p1BPgtLREMIni0,5217
34
- tinybird/tb/modules/feedback_manager.py,sha256=c0ZOpG7IHFq3doodezctX64cTcTquIOhO38w9uPuU8Q,76798
34
+ tinybird/tb/modules/feedback_manager.py,sha256=sWJYBIZDPYLFWMKPv7FoVLbQxE7xx85bn5SbK9yYXoE,76782
35
35
  tinybird/tb/modules/info.py,sha256=iKeFbFkos7vYaBU7Vr5SI-fa1x7AbuUHB748jsGsaA4,5944
36
36
  tinybird/tb/modules/infra.py,sha256=fve30Gj3mG9zbquGxS2e4ipcOYOxviWQCpNFfEzJN_Q,33195
37
37
  tinybird/tb/modules/job.py,sha256=AsUCRNzy7HG5oJ4fyk9NpIm5NtNJgBZSy8MtJdXBe5A,3167
38
38
  tinybird/tb/modules/llm.py,sha256=KfsCYmKeW1VQz0iDZhGKCRkQv_Y3kTHh6JuxvofOguE,1076
39
39
  tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
40
- tinybird/tb/modules/local.py,sha256=SUaGWH9TLDFFF9uCw4y7UW4NsKgnXG8uxTcxz1dbkCM,14230
40
+ tinybird/tb/modules/local.py,sha256=9riA3PrCTUXWeDTWMhd14M2-9pFHI6fedpjY4m_lRpU,14359
41
41
  tinybird/tb/modules/local_common.py,sha256=msAZDNPPVenNyL9Dqfb0Z5uFC_1O809xdAi7j1iKmJA,17066
42
42
  tinybird/tb/modules/login.py,sha256=7Wax0hzuUpGPOxTz7ef1w3olSy_4cRrHycKbh9hofJI,8344
43
43
  tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
@@ -68,7 +68,7 @@ tinybird/tb/modules/datafile/format_common.py,sha256=1V1ZQuphp8EH2hT-IfZQEgz_0b9
68
68
  tinybird/tb/modules/datafile/format_datasource.py,sha256=iWbeXruxC7OBmjNgurWt6ymcJlYzxfKwkGnhpcoSKEo,6190
69
69
  tinybird/tb/modules/datafile/format_pipe.py,sha256=DUGdmlzI146YDqTwW-7kSIOXocz4AH-md_LFGUm9hrc,7436
70
70
  tinybird/tb/modules/datafile/parse_datasource.py,sha256=jposrAHVebgDTzlr2rzSooj05NX7jJQc8P3xvHdUiek,1847
71
- tinybird/tb/modules/datafile/parse_pipe.py,sha256=WuQlYW51tflbcp2iFapJ7bxa9IkegD6Z20f4nXL78Xw,3529
71
+ tinybird/tb/modules/datafile/parse_pipe.py,sha256=MScEFqte8A__Uc7GAUCNddpdQ-e9cETLZGwQUhAZPxY,3618
72
72
  tinybird/tb/modules/datafile/pipe_checker.py,sha256=xv7vyjN5dPc2hcw9RnLBq2VkR4nte-8bhYDT10qceQY,24620
73
73
  tinybird/tb/modules/datafile/playground.py,sha256=94tOydeg5iQ3TQAdEWQWxLhx5Emz6xh0bEwLSao44-Y,56568
74
74
  tinybird/tb/modules/datafile/pull.py,sha256=CP6-TVZ9ErrEOAFajn9HSEdq-GgYnOPHEIUAuReQGaM,4508
@@ -80,8 +80,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
80
80
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
81
81
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
82
82
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
83
- tinybird-0.0.1.dev186.dist-info/METADATA,sha256=XBsl7gXGbcV3mEUvFluqVdyPzg8F-X-c6kXWzx1Cbr4,1608
84
- tinybird-0.0.1.dev186.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
- tinybird-0.0.1.dev186.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
- tinybird-0.0.1.dev186.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
- tinybird-0.0.1.dev186.dist-info/RECORD,,
83
+ tinybird-0.0.1.dev188.dist-info/METADATA,sha256=psVJzC4sJRKjG8Re5Jjo0GNwSrW5JdCAxGrcrzcWgoY,1608
84
+ tinybird-0.0.1.dev188.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
+ tinybird-0.0.1.dev188.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
+ tinybird-0.0.1.dev188.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
+ tinybird-0.0.1.dev188.dist-info/RECORD,,