tinybird 0.0.1.dev141__py3-none-any.whl → 0.0.1.dev142__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/cli/introduction.html'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '0.0.1.dev141'
8
- __revision__ = '2f7ef0f'
7
+ __version__ = '0.0.1.dev142'
8
+ __revision__ = 'f5afbf8'
@@ -8,7 +8,7 @@ import logging
8
8
  import os
9
9
  import shutil
10
10
  import sys
11
- from os import getcwd
11
+ from os import environ, getcwd
12
12
  from pathlib import Path
13
13
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
14
14
 
@@ -31,7 +31,7 @@ from tinybird.tb.modules.common import (
31
31
  getenv_bool,
32
32
  try_update_config_with_remote,
33
33
  )
34
- from tinybird.tb.modules.config import CLIConfig
34
+ from tinybird.tb.modules.config import CURRENT_VERSION, CLIConfig
35
35
  from tinybird.tb.modules.datafile.build import build_graph
36
36
  from tinybird.tb.modules.datafile.pull import folder_pull
37
37
  from tinybird.tb.modules.feedback_manager import FeedbackManager
@@ -61,6 +61,12 @@ VERSION = f"{__cli__.__version__} (rev {__cli__.__revision__})"
61
61
  @click.option("--token", help="Use auth token, defaults to TB_TOKEN envvar, then to the .tinyb file.")
62
62
  @click.option("--user-token", help="Use user token, defaults to TB_USER_TOKEN envvar, then to the .tinyb file.")
63
63
  @click.option("--host", help="Use custom host, defaults to TB_HOST envvar, then to https://api.tinybird.co")
64
+ @click.option(
65
+ "--version-warning/--no-version-warning",
66
+ envvar="TB_VERSION_WARNING",
67
+ default=True,
68
+ help="Don't print version warning message if there's a new available version. You can use TB_VERSION_WARNING envar",
69
+ )
64
70
  @click.option("--show-tokens", is_flag=True, default=False, help="Enable the output of tokens.")
65
71
  @click.option("--cloud/--local", is_flag=True, default=False, help="Run against cloud or local.")
66
72
  @click.option("--staging", is_flag=True, default=False, help="Run against a staging deployment.")
@@ -73,6 +79,7 @@ async def cli(
73
79
  token: str,
74
80
  user_token: str,
75
81
  host: str,
82
+ version_warning: bool,
76
83
  show_tokens: bool,
77
84
  cloud: bool,
78
85
  staging: bool,
@@ -89,6 +96,23 @@ async def cli(
89
96
  if getenv_bool("TB_DISABLE_SSL_CHECKS", False):
90
97
  click.echo(FeedbackManager.warning_disabled_ssl_checks())
91
98
 
99
+ if not environ.get("PYTEST", None) and version_warning and not token:
100
+ from tinybird.check_pypi import CheckPypi
101
+
102
+ latest_version = await CheckPypi().get_latest_version()
103
+
104
+ if "x.y.z" in CURRENT_VERSION:
105
+ click.echo(FeedbackManager.warning_development_cli())
106
+
107
+ if "x.y.z" not in CURRENT_VERSION and latest_version != CURRENT_VERSION:
108
+ click.echo(
109
+ FeedbackManager.warning(message=f"** New version available. {CURRENT_VERSION} -> {latest_version}")
110
+ )
111
+ click.echo(
112
+ FeedbackManager.warning(
113
+ message="** Run `tb update` to update or `export TB_VERSION_WARNING=0` to skip the check.\n"
114
+ )
115
+ )
92
116
  if debug:
93
117
  logging.basicConfig(level=logging.DEBUG)
94
118
 
@@ -726,9 +726,9 @@ STEP 3: ADD KEY TO SERVICE ACCOUNT
726
726
  )
727
727
  warning_fixture_not_found = warning_message("** Warning: No fixture found for the datasource {datasource_name}")
728
728
  warning_update_version = warning_message(
729
- '** UPDATE AVAILABLE: please run "pip install tinybird=={latest_version}" to update or `export TB_VERSION_WARNING=0` to skip the check.'
729
+ "** VERSION {latest_version} AVAILABLE: please run `tb update` to update or `export TB_VERSION_WARNING=0` to skip the check."
730
730
  )
731
- warning_current_version = warning_message("** current: tinybird {current_version}\n")
731
+ warning_current_version = warning_message("** Current version: {current_version}\n")
732
732
  warning_confirm_truncate_datasource = prompt_message(
733
733
  "Do you want to truncate {datasource}? Once truncated, your data can't be recovered"
734
734
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev141
3
+ Version: 0.0.1.dev142
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -12,14 +12,14 @@ 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=BZuPM7MFS7vaEKK5tOMR2bwSAgJudPrJt27uVEwZmTY,40512
15
- tinybird/tb/__cli__.py,sha256=HatbYmPEFnba3j4qc8NOBm4CILHsE8TZVBx4rD__eLc,252
15
+ tinybird/tb/__cli__.py,sha256=FiDNG4mtU95TLlzBQHhR-AONnTf_kHYcJ-aOS9NiGJY,252
16
16
  tinybird/tb/cli.py,sha256=6X7pMjscB1yDsnzBaZBnF4pCBJ7tZgCC500CtPEP-qQ,1106
17
17
  tinybird/tb/client.py,sha256=aaPKq5C77e72kR7IMv9WrvnvNki8mKMOTi9EsCp0eUc,55962
18
18
  tinybird/tb/config.py,sha256=HLMHbJg6BjeGZ2KiJA-BCCVnk8w959xsSaDEEePakZg,3981
19
19
  tinybird/tb/modules/auth.py,sha256=_OeYnmTH83lnqCgQEdS6K0bx1KBUeRmZk2M7JnRmWpk,9037
20
20
  tinybird/tb/modules/build.py,sha256=5SX59ssq0KaRrgzk21KmYUnB6xOdQ_O59n7rxFBQQ1Y,17393
21
21
  tinybird/tb/modules/cicd.py,sha256=Ug7LijuHDIqKR6rm8OLZispWp75Zv6TyonAme8K9jaI,7114
22
- tinybird/tb/modules/cli.py,sha256=qz12sIfTYbFVIADJGyb1HXrHP4S7KudVSv7YKP0pPzw,13052
22
+ tinybird/tb/modules/cli.py,sha256=AHtGb8UHpuJwD8CPP9MuMvMxrV-NXOb0nP2N9EvTq7c,14081
23
23
  tinybird/tb/modules/common.py,sha256=jThkqkIJ_blXXUZ2-3HdjG1dpLKOCE_TjXA0jSesIx0,85712
24
24
  tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
25
25
  tinybird/tb/modules/connection.py,sha256=7oOR7x4PhBcm1ETFFCH2YJ_3oeGXjAbmx1cnZX9_L70,9014
@@ -30,7 +30,7 @@ tinybird/tb/modules/deployment.py,sha256=M3NPFQXIEsDh9-J-pzPLuHF9k4SIZVvgUnHp05K
30
30
  tinybird/tb/modules/deprecations.py,sha256=gBbg7cvad85u_lKDURZTZjRdFMoM0UDolJ_6zR1BXtQ,526
31
31
  tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
32
32
  tinybird/tb/modules/exceptions.py,sha256=5jK91w1LPmtqIUfDpHe_Op5OxGz8-p1BPgtLREMIni0,5217
33
- tinybird/tb/modules/feedback_manager.py,sha256=YrKz1qHLmCKYVNvW2SDobmI6ozMjf2eZL-AnFowSfm8,77664
33
+ tinybird/tb/modules/feedback_manager.py,sha256=Ncenxx48-vWJjDLPuuIPOOT_1oaAVjuMLHIfbez7v0U,77652
34
34
  tinybird/tb/modules/infra.py,sha256=fve30Gj3mG9zbquGxS2e4ipcOYOxviWQCpNFfEzJN_Q,33195
35
35
  tinybird/tb/modules/job.py,sha256=n4dSSBgnA8NqD7srGahf2xRj6wxkmX9Vl0J-QJ_a2w0,2966
36
36
  tinybird/tb/modules/llm.py,sha256=KfsCYmKeW1VQz0iDZhGKCRkQv_Y3kTHh6JuxvofOguE,1076
@@ -79,8 +79,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
79
79
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
80
80
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
81
81
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
82
- tinybird-0.0.1.dev141.dist-info/METADATA,sha256=fKlvi9USAvvAJMIZlfVRRWGxJrAXIPtR3Bv0hSWEivU,1612
83
- tinybird-0.0.1.dev141.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
84
- tinybird-0.0.1.dev141.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
85
- tinybird-0.0.1.dev141.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
86
- tinybird-0.0.1.dev141.dist-info/RECORD,,
82
+ tinybird-0.0.1.dev142.dist-info/METADATA,sha256=cLQ2idtXHX8zrnepIevHMdqAhr-OkgPdom1t_SGM050,1612
83
+ tinybird-0.0.1.dev142.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
84
+ tinybird-0.0.1.dev142.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
85
+ tinybird-0.0.1.dev142.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
86
+ tinybird-0.0.1.dev142.dist-info/RECORD,,