tinybird-cli 5.2.1.dev2__py3-none-any.whl → 5.2.1.dev3__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.
tinybird/__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__ = '5.2.1.dev2'
8
- __revision__ = '68cf86c'
7
+ __version__ = '5.2.1.dev3'
8
+ __revision__ = 'ca0c2bb'
@@ -273,8 +273,9 @@ def branch() -> None:
273
273
 
274
274
 
275
275
  @branch.command(name="ls")
276
+ @click.option("--sort/--no-sort", default=False, help="Sort the table rows by name")
276
277
  @coro
277
- async def branch_ls() -> None:
278
+ async def branch_ls(sort: bool) -> None:
278
279
  """List all the branches available using the workspace token"""
279
280
 
280
281
  config = CLIConfig.get_project_config()
@@ -298,10 +299,18 @@ async def branch_ls() -> None:
298
299
  for branch in response["environments"]:
299
300
  table.append((branch["name"], branch["id"], config["id"] == branch["id"]))
300
301
 
302
+ current_branch = [row for row in table if row[2]]
303
+ other_branches = [row for row in table if not row[2]]
304
+
305
+ if sort:
306
+ other_branches.sort(key=lambda x: x[0])
307
+
308
+ sorted_table = current_branch + other_branches
309
+
301
310
  await print_current_workspace(config)
302
311
 
303
312
  click.echo(FeedbackManager.info_branches())
304
- echo_safe_humanfriendly_tables_format_smart_table(table, column_names=columns)
313
+ echo_safe_humanfriendly_tables_format_smart_table(sorted_table, column_names=columns)
305
314
 
306
315
 
307
316
  @branch.command(name="use")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 5.2.1.dev2
3
+ Version: 5.2.1.dev3
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -51,6 +51,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
51
51
  Changelog
52
52
  ----------
53
53
 
54
+ 5.2.1.dev3
55
+ ************
56
+
57
+ - `Added` `tb branch ls --sort` option to list branches sorted by branch name.
58
+
54
59
  5.2.1.dev2
55
60
  ************
56
61
 
@@ -1,4 +1,4 @@
1
- tinybird/__cli__.py,sha256=9oAXwSvJ1KlfXMDNDwoT8JRpt455RKyaZz3jwemml1M,254
1
+ tinybird/__cli__.py,sha256=8mp9xOJFhQLDABR8-aDDdzwApCNaoEo1g7K6a5s6jNc,254
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=j-2KQUlxf4gJUjTVf4o6y8-aV0OSXlBWndPEb9Ny8aA,47851
4
4
  tinybird/config.py,sha256=E0jDwbFD1zhdijNhtF8fg6mqIyKbZ8xpNPP_3n2PFpE,2003
@@ -18,7 +18,7 @@ tinybird/tornado_template.py,sha256=GKJJ_v8gOrpIHG34rbL9efBHOOrW_zk4TqTkh3YFUKA,
18
18
  tinybird/ch_utils/constants.py,sha256=EsyuAHwC5S1qiXBK3S7j-RERy1HSuQaJBiqjovtSmYw,3714
19
19
  tinybird/ch_utils/engine.py,sha256=KVxZdmNkUCYXaw74aZgpUd7n1E5AhLynsGnLx8pi7UM,39699
20
20
  tinybird/tb_cli_modules/auth.py,sha256=0CWMrOHxWQBxiyj6guUY7RBGUhSVZ2KbTKl1i9vV9xk,8601
21
- tinybird/tb_cli_modules/branch.py,sha256=x3nTWyCMgVTBD5ZayDP86jmrWvVphPmf75Pr8baU_QA,38296
21
+ tinybird/tb_cli_modules/branch.py,sha256=eDITCAep5BvzXOPlPfSDTX5jG8YrG5vS5JsbE2hWJvs,38625
22
22
  tinybird/tb_cli_modules/cicd.py,sha256=HYOINvm1eD37P-oF_BZ6v-A-KFoySRkkMjMGAuSfrqc,13910
23
23
  tinybird/tb_cli_modules/cli.py,sha256=7ce9J4VuaKiGRhFrKZB-MxwS4uVtczI4cGFSDV1hwIE,64576
24
24
  tinybird/tb_cli_modules/common.py,sha256=dfW7tQLrV0DElhYij0n4tH1qcfqQFHVvuATvKxL7h8Q,78634
@@ -36,8 +36,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=TfKqSQuIk5JhG7Za4Z6e2uTwy4NhWPXLgZN2
36
36
  tinybird/tb_cli_modules/workspace_members.py,sha256=0nkaQJJdR_6rLnTeoK0eBkiDFnm4v7Z2oFGovY-jYMY,8446
37
37
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=0dYYmZMMJVubxSPls2e_a-fqtUYvgLfu2B0xwLfkbHw,11667
38
38
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=j92za8QbXrv4eIPjKBZPn9ghR-nYQ2wZZ88MeXyMWXE,1868
39
- tinybird_cli-5.2.1.dev2.dist-info/METADATA,sha256=CXplDfH0_GZN5s2rh5b4Rd1W-30M5YEiptdKj29i8o4,73951
40
- tinybird_cli-5.2.1.dev2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
- tinybird_cli-5.2.1.dev2.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
- tinybird_cli-5.2.1.dev2.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
- tinybird_cli-5.2.1.dev2.dist-info/RECORD,,
39
+ tinybird_cli-5.2.1.dev3.dist-info/METADATA,sha256=xP-WIT_Mn9wE55pqOVqzZIHdy0d3zgPubF9P2Gv_XBI,74056
40
+ tinybird_cli-5.2.1.dev3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
+ tinybird_cli-5.2.1.dev3.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
+ tinybird_cli-5.2.1.dev3.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
+ tinybird_cli-5.2.1.dev3.dist-info/RECORD,,