tinybird 0.0.1.dev40__tar.gz → 0.0.1.dev41__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/prompts.py +22 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/create.py +16 -1
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/setup.cfg +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/auth.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/build_client.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/fmt.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/tag.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/update.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -646,6 +646,7 @@ datasource_instructions = """
|
|
|
646
646
|
- No indentation is allowed for property names: DESCRIPTION, SCHEMA, ENGINE, ENGINE_PARTITION_KEY, ENGINE_SORTING_KEY, etc.
|
|
647
647
|
- Use MergeTree engine by default.
|
|
648
648
|
- Use AggregatingMergeTree engine when the datasource is the target of a materialized pipe.
|
|
649
|
+
- Use always json paths to define the schema. Example: `user_id` String `json:$.user_id`,
|
|
649
650
|
</datasource_file_instructions>
|
|
650
651
|
"""
|
|
651
652
|
|
|
@@ -779,3 +780,24 @@ Use the following format to generate the response and do not wrap it in any othe
|
|
|
779
780
|
copy_pipe_instructions=copy_pipe_instructions,
|
|
780
781
|
materialized_pipe_instructions=materialized_pipe_instructions,
|
|
781
782
|
)
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
cursorrules_prompt = """
|
|
786
|
+
You are an expert in SQL and Tinybird. Follow these instructions when working with .datasource and .pipe files:
|
|
787
|
+
|
|
788
|
+
{datasource_instructions}
|
|
789
|
+
{pipe_instructions}
|
|
790
|
+
{sql_instructions}
|
|
791
|
+
{datasource_example}
|
|
792
|
+
{pipe_example}
|
|
793
|
+
{copy_pipe_instructions}
|
|
794
|
+
{materialized_pipe_instructions}
|
|
795
|
+
""".format(
|
|
796
|
+
datasource_instructions=datasource_instructions,
|
|
797
|
+
pipe_instructions=pipe_instructions,
|
|
798
|
+
sql_instructions=sql_instructions,
|
|
799
|
+
datasource_example=datasource_example,
|
|
800
|
+
pipe_example=pipe_example,
|
|
801
|
+
copy_pipe_instructions=copy_pipe_instructions,
|
|
802
|
+
materialized_pipe_instructions=materialized_pipe_instructions,
|
|
803
|
+
)
|
|
@@ -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.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev41'
|
|
8
|
+
__revision__ = '86b5c65'
|
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import click
|
|
8
8
|
|
|
9
9
|
from tinybird.client import TinyB
|
|
10
|
-
from tinybird.prompts import create_prompt, mock_prompt
|
|
10
|
+
from tinybird.prompts import create_prompt, cursorrules_prompt, mock_prompt
|
|
11
11
|
from tinybird.tb.modules.cicd import init_cicd
|
|
12
12
|
from tinybird.tb.modules.cli import cli
|
|
13
13
|
from tinybird.tb.modules.common import _generate_datafile, check_user_token_with_client, coro, generate_datafile
|
|
@@ -40,12 +40,14 @@ from tinybird.tb.modules.local_common import get_tinybird_local_client
|
|
|
40
40
|
help="Folder where datafiles will be placed",
|
|
41
41
|
)
|
|
42
42
|
@click.option("--rows", type=int, default=10, help="Number of events to send")
|
|
43
|
+
@click.option("--cursor", default=False, is_flag=True, help="Create .cursorrules file with Tinybird rules")
|
|
43
44
|
@coro
|
|
44
45
|
async def create(
|
|
45
46
|
data: Optional[str],
|
|
46
47
|
prompt: Optional[str],
|
|
47
48
|
folder: Optional[str],
|
|
48
49
|
rows: int,
|
|
50
|
+
cursor: bool,
|
|
49
51
|
) -> None:
|
|
50
52
|
"""Initialize a new project."""
|
|
51
53
|
folder = folder or getcwd()
|
|
@@ -121,7 +123,11 @@ async def create(
|
|
|
121
123
|
persist_fixture(fixture_name, data, folder)
|
|
122
124
|
click.echo(FeedbackManager.info(message=f"✓ /fixtures/{datasource_name}"))
|
|
123
125
|
|
|
126
|
+
if cursor and not already_has_cursorrules(folder):
|
|
127
|
+
click.echo(FeedbackManager.highlight(message="\n» Creating .cursorrules..."))
|
|
128
|
+
create_cursorrules(folder)
|
|
124
129
|
click.echo(FeedbackManager.success(message="✓ Done!\n"))
|
|
130
|
+
|
|
125
131
|
except Exception as e:
|
|
126
132
|
click.echo(FeedbackManager.error(message=f"Error: {str(e)}"))
|
|
127
133
|
|
|
@@ -286,3 +292,12 @@ def generate_pipe_file(name: str, content: str, folder: str):
|
|
|
286
292
|
with open(f"{f}", "w") as file:
|
|
287
293
|
file.write(content)
|
|
288
294
|
click.echo(FeedbackManager.info_file_created(file=f.relative_to(folder)))
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def already_has_cursorrules(folder: str) -> bool:
|
|
298
|
+
return (Path(folder) / ".cursorrules").exists()
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def create_cursorrules(folder: str):
|
|
302
|
+
cursorrules_file = Path(folder) / ".cursorrules"
|
|
303
|
+
cursorrules_file.write_text(cursorrules_prompt)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev40 → tinybird-0.0.1.dev41}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|