tinybird-cli 4.1.2.dev0__tar.gz → 5.0.0.dev0__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.
Files changed (46) hide show
  1. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/PKG-INFO +14 -3
  2. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/__cli__.py +2 -2
  3. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/datafile.py +23 -3
  4. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/pipe.py +8 -0
  5. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/PKG-INFO +14 -3
  6. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/setup.cfg +0 -0
  7. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/ch_utils/constants.py +0 -0
  8. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/ch_utils/engine.py +0 -0
  9. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/check_pypi.py +0 -0
  10. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/client.py +0 -0
  11. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/config.py +0 -0
  12. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/connectors.py +0 -0
  13. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/context.py +0 -0
  14. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/datatypes.py +0 -0
  15. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/feedback_manager.py +0 -0
  16. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/git_settings.py +0 -0
  17. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/sql.py +0 -0
  18. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/sql_template.py +0 -0
  19. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/sql_template_fmt.py +0 -0
  20. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/sql_toolset.py +0 -0
  21. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/syncasync.py +0 -0
  22. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli.py +0 -0
  23. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/auth.py +0 -0
  24. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/branch.py +0 -0
  25. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/cicd.py +0 -0
  26. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/cli.py +0 -0
  27. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/common.py +0 -0
  28. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/config.py +0 -0
  29. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/connection.py +0 -0
  30. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/datasource.py +0 -0
  31. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/exceptions.py +0 -0
  32. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/job.py +0 -0
  33. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/regions.py +0 -0
  34. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/telemetry.py +0 -0
  35. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/test.py +0 -0
  36. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  37. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  38. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/token.py +0 -0
  39. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/workspace.py +0 -0
  40. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  41. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird/tornado_template.py +0 -0
  42. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/SOURCES.txt +0 -0
  43. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/dependency_links.txt +0 -0
  44. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/entry_points.txt +0 -0
  45. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/requires.txt +0 -0
  46. {tinybird-cli-4.1.2.dev0 → tinybird-cli-5.0.0.dev0}/tinybird_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 4.1.2.dev0
3
+ Version: 5.0.0.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -18,6 +18,17 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
18
18
  Changelog
19
19
  ----------
20
20
 
21
+ 5.0.0.dev0
22
+ ************
23
+
24
+ - `Changed` Make `insertion_date`` column explicit. This column is no longer inferred, it must be present in the Data Source file.
25
+
26
+ 4.1.2.dev0
27
+ ************
28
+
29
+ - `Added` parameter to `tb pipe regression-test` --relative-change
30
+
31
+
21
32
  4.1.1
22
33
  ************
23
34
 
@@ -27,7 +38,7 @@ Changelog
27
38
  ************
28
39
 
29
40
  - `Added` `tb token create` command to be able to create static and JWT tokens from the CLI. You can check more information at https://www.tinybird.co/blog-posts/jwt-api-endpoints-public-beta
30
- - `Fixed` `tb init --git` to pin `tinybird-cli>=4,<5` in `requirements.txt` to avoid issues with the latest version of the CLI.
41
+ - `Fixed` `tb init --git` to pin `tinybird-cli>=4,<5` in `requirements.txt` to avoid issues with the latest version of the CLI.
31
42
 
32
43
  4.0.0
33
44
  ************
@@ -85,7 +96,7 @@ This is a major release, please read the commands affected below and consider up
85
96
  ************
86
97
 
87
98
  - `Changed` fixed major version of tinybird-cli to lower than 4 when using `tb init --git`
88
- - `Changed` behavior when running `tb deploy` on a branch to push the connection settings to the backend. This change is the backend that decides what to do.
99
+ - `Changed` behavior when running `tb deploy` on a branch to push the connection settings to the backend. This change is the backend that decides what to do.
89
100
  - `Changed` `tb pipe sink` commands are now available
90
101
  - `Fixed` regression tests query when filtering by specific parameter
91
102
  - `Fixed` Avoid `tb fmt` to error if there's a `CASE` in the sql
@@ -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__ = '4.1.2.dev0'
8
- __revision__ = 'b6a6857'
7
+ __version__ = '5.0.0.dev0'
8
+ __revision__ = '2147517'
@@ -1766,6 +1766,7 @@ class PipeChecker(unittest.TestCase):
1766
1766
  only_response_times: bool,
1767
1767
  ignore_order: bool,
1768
1768
  validate_processed_bytes: bool,
1769
+ relative_change: float,
1769
1770
  *args,
1770
1771
  **kwargs,
1771
1772
  ) -> None:
@@ -1784,6 +1785,7 @@ class PipeChecker(unittest.TestCase):
1784
1785
  self.only_response_times = only_response_times
1785
1786
  self.ignore_order = ignore_order
1786
1787
  self.validate_processed_bytes = validate_processed_bytes
1788
+ self.relative_change = relative_change
1787
1789
 
1788
1790
  parsed = urlparse(self.current_pipe_url)
1789
1791
  self.checker_pipe_url = f"{parsed.scheme}://{parsed.netloc}/v0/pipes/{self.checker_pipe_name}.json"
@@ -1901,12 +1903,13 @@ class PipeChecker(unittest.TestCase):
1901
1903
  for _, (current_data_e, check_fixtures_data_e) in enumerate(zip(current_data, checker_data)):
1902
1904
  self.assertEqual(list(current_data_e.keys()), list(check_fixtures_data_e.keys()))
1903
1905
  for x in current_data_e.keys():
1904
- if isinstance(current_data_e[x], float):
1906
+ if isinstance(current_data_e[x], (float, int)):
1905
1907
  d = abs(current_data_e[x] - check_fixtures_data_e[x])
1908
+
1906
1909
  try:
1907
1910
  self.assertLessEqual(
1908
1911
  d / current_data_e[x],
1909
- 0.01,
1912
+ self.relative_change,
1910
1913
  f"key {x}. old value: {current_data_e[x]}, new value: {check_fixtures_data_e[x]}\n{self.diff(current_data_e, check_fixtures_data_e)}",
1911
1914
  )
1912
1915
  except ZeroDivisionError:
@@ -2057,6 +2060,7 @@ class PipeCheckerRunner:
2057
2060
  only_response_times: bool,
2058
2061
  ignore_order: bool,
2059
2062
  validate_processed_bytes: bool,
2063
+ relative_change: float,
2060
2064
  ) -> PipeChecker:
2061
2065
  return PipeChecker(
2062
2066
  request,
@@ -2066,6 +2070,7 @@ class PipeCheckerRunner:
2066
2070
  only_response_times,
2067
2071
  ignore_order,
2068
2072
  validate_processed_bytes,
2073
+ relative_change,
2069
2074
  )
2070
2075
 
2071
2076
  def _delta_percentage(self, checker: float, current: float) -> float:
@@ -2085,6 +2090,7 @@ class PipeCheckerRunner:
2085
2090
  only_response_times: bool,
2086
2091
  ignore_order: bool,
2087
2092
  validate_processed_bytes: bool,
2093
+ relative_change: float,
2088
2094
  failfast: bool,
2089
2095
  custom_output: bool = False,
2090
2096
  debug: bool = False,
@@ -2123,7 +2129,13 @@ class PipeCheckerRunner:
2123
2129
  for _, request in enumerate(pipe_requests_to_check):
2124
2130
  suite.addTest(
2125
2131
  self._get_checker(
2126
- request, checker_pipe_name, token, only_response_times, ignore_order, validate_processed_bytes
2132
+ request,
2133
+ checker_pipe_name,
2134
+ token,
2135
+ only_response_times,
2136
+ ignore_order,
2137
+ validate_processed_bytes,
2138
+ relative_change,
2127
2139
  )
2128
2140
  )
2129
2141
 
@@ -2264,6 +2276,7 @@ async def check_pipe(
2264
2276
  populate: bool,
2265
2277
  cl: TinyB,
2266
2278
  limit: int = 0,
2279
+ relative_change: float = 0.01,
2267
2280
  sample_by_params: int = 0,
2268
2281
  only_response_times=False,
2269
2282
  matches: Optional[List[str]] = None,
@@ -2342,6 +2355,7 @@ async def check_pipe(
2342
2355
  only_response_times,
2343
2356
  ignore_order,
2344
2357
  validate_processed_bytes,
2358
+ relative_change,
2345
2359
  failfast,
2346
2360
  )
2347
2361
 
@@ -2556,6 +2570,7 @@ async def new_pipe(
2556
2570
  run_tests: bool = False,
2557
2571
  as_standard: bool = False,
2558
2572
  tests_to_run: int = 0,
2573
+ tests_relative_change: float = 0.01,
2559
2574
  tests_to_sample_by_params: int = 0,
2560
2575
  tests_filter_by: Optional[List[str]] = None,
2561
2576
  tests_failfast: bool = False,
@@ -2600,6 +2615,7 @@ async def new_pipe(
2600
2615
  tb_client,
2601
2616
  only_response_times=only_response_times,
2602
2617
  limit=tests_to_run,
2618
+ relative_change=tests_relative_change,
2603
2619
  sample_by_params=tests_to_sample_by_params,
2604
2620
  matches=tests_filter_by,
2605
2621
  failfast=tests_failfast,
@@ -3206,6 +3222,7 @@ async def exec_file(
3206
3222
  run_tests=False,
3207
3223
  as_standard=False,
3208
3224
  tests_to_run: int = 0,
3225
+ tests_relative_change: float = 0.01,
3209
3226
  tests_to_sample_by_params: int = 0,
3210
3227
  tests_filter_by: Optional[List[str]] = None,
3211
3228
  tests_failfast: bool = False,
@@ -3235,6 +3252,7 @@ async def exec_file(
3235
3252
  run_tests=run_tests,
3236
3253
  as_standard=as_standard,
3237
3254
  tests_to_run=tests_to_run,
3255
+ tests_relative_change=tests_relative_change,
3238
3256
  tests_to_sample_by_params=tests_to_sample_by_params,
3239
3257
  tests_filter_by=tests_filter_by,
3240
3258
  tests_failfast=tests_failfast,
@@ -3805,6 +3823,7 @@ async def folder_push(
3805
3823
  raise_on_exists: bool = False,
3806
3824
  verbose: bool = True,
3807
3825
  tests_to_run: int = 0,
3826
+ tests_relative_change: float = 0.01,
3808
3827
  tests_sample_by_params: int = 0,
3809
3828
  tests_filter_by: Optional[List[str]] = None,
3810
3829
  tests_failfast: bool = False,
@@ -3991,6 +4010,7 @@ async def folder_push(
3991
4010
  run_tests,
3992
4011
  as_standard,
3993
4012
  tests_to_run,
4013
+ tests_relative_change,
3994
4014
  tests_sample_by_params,
3995
4015
  tests_filter_by,
3996
4016
  tests_failfast,
@@ -539,6 +539,12 @@ async def print_pipe(ctx: Context, pipe: str, query: str, format_: str):
539
539
  help="When set, the checker will get Main Workspace requests",
540
540
  hidden=True,
541
541
  )
542
+ @click.option(
543
+ "--relative-change",
544
+ type=float,
545
+ default=0.01,
546
+ help="When set, the checker will validate the new version has less than this distance with the current version",
547
+ )
542
548
  @click.pass_context
543
549
  @coro
544
550
  async def regression_test(
@@ -556,6 +562,7 @@ async def regression_test(
556
562
  ignore_order: bool,
557
563
  validate_processed_bytes: bool,
558
564
  check_requests_from_main: bool,
565
+ relative_change: float,
559
566
  ):
560
567
  """
561
568
  Run regression tests on Tinybird
@@ -583,6 +590,7 @@ async def regression_test(
583
590
  no_versions=no_versions,
584
591
  run_tests=True,
585
592
  tests_to_run=limit,
593
+ tests_relative_change=relative_change,
586
594
  tests_sample_by_params=sample_by_params,
587
595
  tests_filter_by=match,
588
596
  tests_failfast=failfast,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 4.1.2.dev0
3
+ Version: 5.0.0.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -18,6 +18,17 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
18
18
  Changelog
19
19
  ----------
20
20
 
21
+ 5.0.0.dev0
22
+ ************
23
+
24
+ - `Changed` Make `insertion_date`` column explicit. This column is no longer inferred, it must be present in the Data Source file.
25
+
26
+ 4.1.2.dev0
27
+ ************
28
+
29
+ - `Added` parameter to `tb pipe regression-test` --relative-change
30
+
31
+
21
32
  4.1.1
22
33
  ************
23
34
 
@@ -27,7 +38,7 @@ Changelog
27
38
  ************
28
39
 
29
40
  - `Added` `tb token create` command to be able to create static and JWT tokens from the CLI. You can check more information at https://www.tinybird.co/blog-posts/jwt-api-endpoints-public-beta
30
- - `Fixed` `tb init --git` to pin `tinybird-cli>=4,<5` in `requirements.txt` to avoid issues with the latest version of the CLI.
41
+ - `Fixed` `tb init --git` to pin `tinybird-cli>=4,<5` in `requirements.txt` to avoid issues with the latest version of the CLI.
31
42
 
32
43
  4.0.0
33
44
  ************
@@ -85,7 +96,7 @@ This is a major release, please read the commands affected below and consider up
85
96
  ************
86
97
 
87
98
  - `Changed` fixed major version of tinybird-cli to lower than 4 when using `tb init --git`
88
- - `Changed` behavior when running `tb deploy` on a branch to push the connection settings to the backend. This change is the backend that decides what to do.
99
+ - `Changed` behavior when running `tb deploy` on a branch to push the connection settings to the backend. This change is the backend that decides what to do.
89
100
  - `Changed` `tb pipe sink` commands are now available
90
101
  - `Fixed` regression tests query when filtering by specific parameter
91
102
  - `Fixed` Avoid `tb fmt` to error if there's a `CASE` in the sql