tinybird-cli 1.1.1.dev5__tar.gz → 1.2.1.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 (45) hide show
  1. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/PKG-INFO +18 -1
  2. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/__cli__.py +2 -2
  3. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/datafile.py +10 -4
  4. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/cicd.py +30 -31
  5. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird_cli.egg-info/PKG-INFO +18 -1
  6. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/setup.cfg +0 -0
  7. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/ch_utils/constants.py +0 -0
  8. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/ch_utils/engine.py +0 -0
  9. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/check_pypi.py +0 -0
  10. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/client.py +0 -0
  11. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/config.py +0 -0
  12. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/connector_settings.py +0 -0
  13. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/connectors.py +0 -0
  14. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/context.py +0 -0
  15. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/datatypes.py +0 -0
  16. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/feedback_manager.py +0 -0
  17. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/sql.py +0 -0
  18. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/sql_template.py +0 -0
  19. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/sql_template_fmt.py +0 -0
  20. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/sql_toolset.py +0 -0
  21. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/syncasync.py +0 -0
  22. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli.py +0 -0
  23. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/auth.py +0 -0
  24. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/branch.py +0 -0
  25. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/cli.py +0 -0
  26. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/common.py +0 -0
  27. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/config.py +0 -0
  28. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/connection.py +0 -0
  29. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/datasource.py +0 -0
  30. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/exceptions.py +0 -0
  31. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/job.py +0 -0
  32. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/pipe.py +0 -0
  33. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/telemetry.py +0 -0
  34. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/test.py +0 -0
  35. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  36. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  37. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/token.py +0 -0
  38. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/workspace.py +0 -0
  39. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  40. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird/tornado_template.py +0 -0
  41. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird_cli.egg-info/SOURCES.txt +0 -0
  42. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird_cli.egg-info/dependency_links.txt +0 -0
  43. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird_cli.egg-info/entry_points.txt +0 -0
  44. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.dev0}/tinybird_cli.egg-info/requires.txt +0 -0
  45. {tinybird-cli-1.1.1.dev5 → tinybird-cli-1.2.1.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: 1.1.1.dev5
3
+ Version: 1.2.1.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://docs.tinybird.co/cli.html
6
6
  Author: Tinybird
@@ -19,6 +19,23 @@ Changelog
19
19
 
20
20
  ---------
21
21
 
22
+ 1.2.0
23
+ ************
24
+
25
+ Released new version 1.2.0 with all these changes:
26
+
27
+ - `Changed` Upgrade CICD version templates for `tb init --git`
28
+ - `Changed` Support `tb release` commands in Environments
29
+ - `Fixed` Correct paths for triggering CICD generated by `tb init --git`
30
+ - `Fixed` rolled back the version of the snowflake-connectors-python package.
31
+ - `Fixed` Do not print data branching summary in `tb env create <env_name>`
32
+
33
+
34
+ 1.1.1dev6
35
+ ************
36
+
37
+ - `Fixed` Correct paths for triggering CICD generated by `tb init --git`
38
+
22
39
  1.1.1dev5
23
40
  ************
24
41
 
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://docs.tinybird.co/cli.html'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '1.1.1.dev5'
8
- __revision__ = 'c38ee67'
7
+ __version__ = '1.2.1.dev0'
8
+ __revision__ = 'd687b0c'
@@ -1831,6 +1831,7 @@ class PipeCheckerRunner:
1831
1831
  validate_processed_bytes: bool,
1832
1832
  failfast: bool,
1833
1833
  custom_output: bool = False,
1834
+ debug: bool = False,
1834
1835
  ) -> PipeCheckerRunnerResponse:
1835
1836
  class PipeCheckerTextTestResult(unittest.TextTestResult):
1836
1837
  def __init__(self, *args: Any, **kwargs: Any) -> None:
@@ -1968,8 +1969,9 @@ class PipeCheckerRunner:
1968
1969
  ),
1969
1970
  ),
1970
1971
  }
1971
- except Exception:
1972
- pass
1972
+ except Exception as e:
1973
+ if debug:
1974
+ logging.exception(e)
1973
1975
 
1974
1976
  failures = []
1975
1977
  if not result.wasSuccessful():
@@ -1977,8 +1979,9 @@ class PipeCheckerRunner:
1977
1979
  try:
1978
1980
  i = err.index("AssertionError") + len("AssertionError :")
1979
1981
  failures.append({"name": str(_test), "error": err[i:]})
1980
- except Exception:
1981
- pass
1982
+ except Exception as e:
1983
+ if debug:
1984
+ logging.exception(e)
1982
1985
 
1983
1986
  return PipeCheckerRunnerResponse(
1984
1987
  pipe_name=checker_pipe_name,
@@ -2814,6 +2817,9 @@ async def new_ds(
2814
2817
  except Exception as e:
2815
2818
  promote_error_message = str(e)
2816
2819
 
2820
+ if alter_response and make_changes:
2821
+ # alter operation finished
2822
+ return
2817
2823
  # removed replacing by default. When a datasource is removed data is
2818
2824
  # removed and all the references needs to be updated
2819
2825
  if (
@@ -2,7 +2,7 @@ from enum import Enum
2
2
  from pathlib import Path
3
3
  from typing import Optional, Any, Dict, Union, Type, List
4
4
  from os import getcwd
5
- from string import Template
5
+ from tornado.template import Template
6
6
  from dataclasses import dataclass
7
7
 
8
8
  import click
@@ -30,21 +30,20 @@ GITHUB_CI_YML = """
30
30
  branches:
31
31
  - main
32
32
  - master
33
- types: [opened, reopened, labeled, unlabeled, synchronize, closed]
33
+ types: [opened, reopened, labeled, unlabeled, synchronize, closed]{% if data_project_dir != '.' %}
34
34
  paths:
35
- - '$data_project_dir/**/*'
36
- - '$data_project_dir/*'
35
+ - '{{ data_project_dir }}/**'{% end %}
37
36
 
38
- concurrency: ${{ github.workflow }}-${{ github.event.pull_request.number }}
37
+ concurrency: ${{! github.workflow }}-${{! github.event.pull_request.number }}
39
38
 
40
39
  jobs:
41
- ci: # ci using environments from workspace '$workspace_name'
40
+ ci: # ci using environments from workspace '{{ workspace_name }}'
42
41
  uses: tinybirdco/ci/.github/workflows/ci.yml@v2.4.0
43
42
  with:
44
- data_project_dir: $data_project_dir
43
+ data_project_dir: {{ data_project_dir }}
45
44
  secrets:
46
- tb_admin_token: ${{ secrets.TB_ADMIN_TOKEN }} # set the Workspace admin token in GitHub secrets
47
- tb_host: $tb_host
45
+ tb_admin_token: ${{! secrets.TB_ADMIN_TOKEN }} # set the Workspace admin token in GitHub secrets
46
+ tb_host: {{ tb_host }}
48
47
  """
49
48
 
50
49
  GITHUB_CD_YML = """
@@ -60,19 +59,18 @@ GITHUB_CD_YML = """
60
59
  push:
61
60
  branches:
62
61
  - main
63
- - master
62
+ - master{% if data_project_dir != '.' %}
64
63
  paths:
65
- - '$data_project_dir/**/*'
66
- - '$data_project_dir/*'
64
+ - '{{ data_project_dir }}/**'{% end %}
67
65
  jobs:
68
- cd: # deploy changes to workspace '$workspace_name'
66
+ cd: # deploy changes to workspace '{{ workspace_name }}'
69
67
  uses: tinybirdco/ci/.github/workflows/cd.yml@v2.4.0
70
68
  with:
71
69
  tb_deploy: false
72
- data_project_dir: $data_project_dir
70
+ data_project_dir: {{ data_project_dir }}
73
71
  secrets:
74
- tb_admin_token: ${{ secrets.TB_ADMIN_TOKEN }} # set the Workspace admin token in GitHub secrets
75
- tb_host: $tb_host
72
+ tb_admin_token: ${{! secrets.TB_ADMIN_TOKEN }} # set the Workspace admin token in GitHub secrets
73
+ tb_host: {{ tb_host }}
76
74
  """
77
75
 
78
76
 
@@ -86,31 +84,32 @@ GITLAB_YML = """
86
84
 
87
85
  .ci_config_rules:
88
86
  - &ci_config_rule
89
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
87
+ if: $CI_PIPELINE_SOURCE == "merge_request_event"{% if data_project_dir != '.' %}
90
88
  changes:
91
- - $data_project_dir/*
92
- - $data_project_dir/**/*
89
+ - {{ data_project_dir }}/*
90
+ - {{ data_project_dir }}/**/*{% end %}
91
+
93
92
  - &ci_cleanup_rule
94
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
93
+ if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH{% if data_project_dir != '.' %}
95
94
  changes:
96
- - $data_project_dir/*
97
- - $data_project_dir/**/*
95
+ - {{ data_project_dir }}/*
96
+ - {{ data_project_dir }}/**/*{% end %}
98
97
 
99
98
  .cd_config_rules:
100
99
  - &cd_config_rule
101
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
100
+ if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH{% if data_project_dir != '.' %}
102
101
  changes:
103
- - $data_project_dir/*
104
- - $data_project_dir/**/*
102
+ - {{ data_project_dir }}/*
103
+ - {{ data_project_dir }}/**/*{% end %}
105
104
 
106
105
  .cicd_variables:
107
106
  variables: &cicd_variables
108
- TB_HOST: "$tb_host"
107
+ TB_HOST: "{{ tb_host }}"
109
108
  TB_ADMIN_TOKEN: $TB_ADMIN_TOKEN # set the Workspace admin token in GitLab CI/CD Variables
110
- DATA_PROJECT_DIR: "$data_project_dir"
109
+ DATA_PROJECT_DIR: "{{ data_project_dir }}"
111
110
  TB_DEPLOY: "false"
112
111
 
113
- run_ci: # ci using environments from workspace '$workspace_name'
112
+ run_ci: # ci using environments from workspace '{{ workspace_name }}'
114
113
  extends: .run_ci
115
114
  rules:
116
115
  - *ci_config_rule
@@ -125,7 +124,7 @@ GITLAB_YML = """
125
124
  variables:
126
125
  <<: *cicd_variables
127
126
 
128
- run_cd: # deploy changes to workspace '$workspace_name'
127
+ run_cd: # deploy changes to workspace '{{ workspace_name }}'
129
128
  extends: .run_cd
130
129
  rules:
131
130
  - *cd_config_rule
@@ -162,8 +161,8 @@ class CICDGeneratorBase:
162
161
  for cicd_file in self.cicd_files:
163
162
  if cicd_file.dir_path:
164
163
  Path(f"{path}/{cicd_file.dir_path}").mkdir(parents=True, exist_ok=True)
165
- content = Template(cicd_file.template).safe_substitute(**params)
166
- with open(f"{path}/{cicd_file.full_path}", "w") as f:
164
+ content = Template(cicd_file.template).generate(**params)
165
+ with open(f"{path}/{cicd_file.full_path}", "wb") as f:
167
166
  f.write(content)
168
167
  click.echo(FeedbackManager.info_cicd_file_generated(file_path=cicd_file.full_path))
169
168
  if cicd_file.warning_message is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 1.1.1.dev5
3
+ Version: 1.2.1.dev0
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://docs.tinybird.co/cli.html
6
6
  Author: Tinybird
@@ -19,6 +19,23 @@ Changelog
19
19
 
20
20
  ---------
21
21
 
22
+ 1.2.0
23
+ ************
24
+
25
+ Released new version 1.2.0 with all these changes:
26
+
27
+ - `Changed` Upgrade CICD version templates for `tb init --git`
28
+ - `Changed` Support `tb release` commands in Environments
29
+ - `Fixed` Correct paths for triggering CICD generated by `tb init --git`
30
+ - `Fixed` rolled back the version of the snowflake-connectors-python package.
31
+ - `Fixed` Do not print data branching summary in `tb env create <env_name>`
32
+
33
+
34
+ 1.1.1dev6
35
+ ************
36
+
37
+ - `Fixed` Correct paths for triggering CICD generated by `tb init --git`
38
+
22
39
  1.1.1dev5
23
40
  ************
24
41