From f1d92e0bcf775df8fe6758715c9554d9463e350c Mon Sep 17 00:00:00 2001 From: Michel El Nacouzi Date: Tue, 2 Jul 2024 14:22:54 -0400 Subject: [PATCH 1/2] Remove project section check outside with_project_definition decorator --- src/snowflake/cli/api/commands/decorators.py | 6 +-- src/snowflake/cli/api/commands/flags.py | 31 ++---------- .../cli/plugins/nativeapp/commands.py | 48 ++++++++++++++++--- .../cli/plugins/nativeapp/version/commands.py | 25 ++++++++-- .../cli/plugins/snowpark/commands.py | 17 ++++++- .../cli/plugins/streamlit/commands.py | 9 +++- 6 files changed, 94 insertions(+), 42 deletions(-) diff --git a/src/snowflake/cli/api/commands/decorators.py b/src/snowflake/cli/api/commands/decorators.py index 7ee0499810..f69ebcac00 100644 --- a/src/snowflake/cli/api/commands/decorators.py +++ b/src/snowflake/cli/api/commands/decorators.py @@ -73,9 +73,7 @@ def global_options_with_connection(func: Callable): ) -def with_project_definition( - project_name: Optional[str] = None, is_optional: bool = False -): +def with_project_definition(is_optional: bool = False): def _decorator(func: Callable): return _options_decorator_factory( @@ -85,7 +83,7 @@ def _decorator(func: Callable): "project_definition", inspect.Parameter.KEYWORD_ONLY, annotation=Optional[str], - default=project_definition_option(project_name, is_optional), + default=project_definition_option(is_optional), ), inspect.Parameter( "env_overrides", diff --git a/src/snowflake/cli/api/commands/flags.py b/src/snowflake/cli/api/commands/flags.py index ff839c22e8..12195e3c0c 100644 --- a/src/snowflake/cli/api/commands/flags.py +++ b/src/snowflake/cli/api/commands/flags.py @@ -27,7 +27,7 @@ from snowflake.cli.api.cli_global_context import cli_context_manager from snowflake.cli.api.commands.typer_pre_execute import register_pre_execute_command from snowflake.cli.api.console import cli_console -from snowflake.cli.api.exceptions import MissingConfiguration, NoProjectDefinitionError +from snowflake.cli.api.exceptions import MissingConfiguration from snowflake.cli.api.output.formats import OutputFormat from snowflake.cli.api.project.definition_manager import DefinitionManager from snowflake.cli.api.utils.rendering import CONTEXT_KEY @@ -500,7 +500,7 @@ def execution_identifier_argument(sf_object: str, example: str) -> typer.Argumen ) -def register_project_definition(project_name: Optional[str], is_optional: bool) -> None: +def register_project_definition(is_optional: bool) -> None: project_path = cli_context_manager.project_path_arg env_overrides_args = cli_context_manager.project_env_overrides_args @@ -514,42 +514,21 @@ def register_project_definition(project_name: Optional[str], is_optional: bool) "Cannot find project definition (snowflake.yml). Please provide a path to the project or run this command in a valid project directory." ) - if project_name is not None and not getattr(project_definition, project_name, None): - raise NoProjectDefinitionError( - project_type=project_name, project_file=project_path - ) - cli_context_manager.set_project_definition(project_definition) cli_context_manager.set_project_root(project_root) cli_context_manager.set_template_context(template_context) -def _get_project_long_name(project_short_name: Optional[str]) -> str: - if project_short_name is None: - return "Snowflake" - - if project_short_name == "native_app": - project_long_name = "Snowflake Native App" - elif project_short_name == "streamlit": - project_long_name = "Streamlit app" - else: - project_long_name = project_short_name.replace("_", " ").capitalize() - - return f"the {project_long_name}" - - -def project_definition_option(project_name: Optional[str], is_optional: bool): +def project_definition_option(is_optional: bool): def project_definition_callback(project_path: str) -> None: cli_context_manager.set_project_path_arg(project_path) - register_pre_execute_command( - lambda: register_project_definition(project_name, is_optional) - ) + register_pre_execute_command(lambda: register_project_definition(is_optional)) return typer.Option( None, "-p", "--project", - help=f"Path where {_get_project_long_name(project_name)} project resides. " + help=f"Path where Snowflake project resides. " f"Defaults to current working directory.", callback=_callback(lambda: project_definition_callback), show_default=False, diff --git a/src/snowflake/cli/plugins/nativeapp/commands.py b/src/snowflake/cli/plugins/nativeapp/commands.py index a5894dae15..e1354330ca 100644 --- a/src/snowflake/cli/plugins/nativeapp/commands.py +++ b/src/snowflake/cli/plugins/nativeapp/commands.py @@ -26,6 +26,7 @@ with_project_definition, ) from snowflake.cli.api.commands.snow_typer import SnowTyperFactory +from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.output.formats import OutputFormat from snowflake.cli.api.output.types import ( CollectionResult, @@ -145,13 +146,19 @@ def app_list_templates(**options) -> CommandResult: @app.command("bundle") -@with_project_definition("native_app") +@with_project_definition() def app_bundle( **options, ) -> CommandResult: """ Prepares a local folder with configured app artifacts. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, project_root=cli_context.project_root, @@ -161,7 +168,7 @@ def app_bundle( @app.command("run", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def app_run( version: Optional[str] = typer.Option( None, @@ -191,6 +198,11 @@ def app_run( then creates or upgrades an application object from the application package. """ + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + is_interactive = False if force: policy = AllowAlwaysPolicy() @@ -221,7 +233,7 @@ def app_run( @app.command("open", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def app_open( **options, ) -> CommandResult: @@ -229,6 +241,12 @@ def app_open( Opens the Snowflake Native App inside of your browser, once it has been installed in your account. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, project_root=cli_context.project_root, @@ -243,7 +261,7 @@ def app_open( @app.command("teardown", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def app_teardown( force: Optional[bool] = ForceOption, cascade: Optional[bool] = typer.Option( @@ -257,6 +275,12 @@ def app_teardown( """ Attempts to drop both the application object and application package as defined in the project definition file. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + processor = NativeAppTeardownProcessor( project_definition=cli_context.project_definition.native_app, project_root=cli_context.project_root, @@ -266,7 +290,7 @@ def app_teardown( @app.command("deploy", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def app_deploy( prune: Optional[bool] = typer.Option( default=None, @@ -296,6 +320,12 @@ def app_deploy( Creates an application package in your Snowflake account and syncs the local changes to the stage without creating or updating the application. Running this command with no arguments at all, as in `snow app deploy`, is a shorthand for `snow app deploy --prune --recursive`. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + has_paths = paths is not None and len(paths) > 0 if prune is None and recursive is None and not has_paths: prune = True @@ -329,11 +359,17 @@ def app_deploy( @app.command("validate", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def app_validate(**options): """ Validates a deployed Snowflake Native App's setup script. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, project_root=cli_context.project_root, diff --git a/src/snowflake/cli/plugins/nativeapp/version/commands.py b/src/snowflake/cli/plugins/nativeapp/version/commands.py index ec7ecba3ad..ccf78af46c 100644 --- a/src/snowflake/cli/plugins/nativeapp/version/commands.py +++ b/src/snowflake/cli/plugins/nativeapp/version/commands.py @@ -24,6 +24,7 @@ with_project_definition, ) from snowflake.cli.api.commands.snow_typer import SnowTyperFactory +from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.output.types import CommandResult, MessageResult, QueryResult from snowflake.cli.plugins.nativeapp.common_flags import ForceOption, InteractiveOption from snowflake.cli.plugins.nativeapp.policy import ( @@ -46,7 +47,7 @@ @app.command(requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def create( version: Optional[str] = typer.Argument( None, @@ -71,6 +72,12 @@ def create( """ Adds a new patch to the provided version defined in your application package. If the version does not exist, creates a version with patch 0. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + if version is None and patch is not None: raise MissingParameter("Cannot provide a patch without version!") @@ -107,13 +114,19 @@ def create( @app.command("list", requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def version_list( **options, ) -> CommandResult: """ Lists all versions defined in an application package. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + processor = NativeAppRunProcessor( project_definition=cli_context.project_definition.native_app, project_root=cli_context.project_root, @@ -123,7 +136,7 @@ def version_list( @app.command(requires_connection=True) -@with_project_definition("native_app") +@with_project_definition() def drop( version: Optional[str] = typer.Argument( None, @@ -137,6 +150,12 @@ def drop( Drops a version defined in your application package. Versions can either be passed in as an argument to the command or read from the `manifest.yml` file. Dropping patches is not allowed. """ + + if cli_context.project_definition.native_app is None: + raise NoProjectDefinitionError( + project_type="native_app", project_file=cli_context.project_root + ) + is_interactive = False if force: policy = AllowAlwaysPolicy() diff --git a/src/snowflake/cli/plugins/snowpark/commands.py b/src/snowflake/cli/plugins/snowpark/commands.py index 32b261fcb2..e75dac2e54 100644 --- a/src/snowflake/cli/plugins/snowpark/commands.py +++ b/src/snowflake/cli/plugins/snowpark/commands.py @@ -39,6 +39,7 @@ ObjectType, ) from snowflake.cli.api.exceptions import ( + NoProjectDefinitionError, SecretsWithoutExternalAccessIntegrationError, ) from snowflake.cli.api.identifiers import FQN @@ -116,7 +117,7 @@ @app.command("deploy", requires_connection=True) -@with_project_definition("snowpark") +@with_project_definition() def deploy( replace: bool = ReplaceOption( help="Replaces procedure or function, even if no detected changes to metadata" @@ -128,6 +129,12 @@ def deploy( By default, if any of the objects exist already the commands will fail unless `--replace` flag is provided. All deployed objects use the same artifact which is deployed only once. """ + + if cli_context.project_definition.snowpark is None: + raise NoProjectDefinitionError( + project_type="snowpark", project_file=cli_context.project_root + ) + snowpark = cli_context.project_definition.snowpark paths = SnowparkPackagePaths.for_snowpark_project( project_root=SecurePath(cli_context.project_root), @@ -379,7 +386,7 @@ def _read_snowflake_requrements_file(file_path: SecurePath): @app.command("build", requires_connection=True) -@with_project_definition("snowpark") +@with_project_definition() def build( ignore_anaconda: bool = IgnoreAnacondaOption, allow_shared_libraries: bool = AllowSharedLibrariesOption, @@ -396,6 +403,12 @@ def build( Builds the Snowpark project as a `.zip` archive that can be used by `deploy` command. The archive is built using only the `src` directory specified in the project file. """ + + if cli_context.project_definition.snowpark is None: + raise NoProjectDefinitionError( + project_type="snowpark", project_file=cli_context.project_root + ) + if not deprecated_check_anaconda_for_pypi_deps: ignore_anaconda = True snowpark_paths = SnowparkPackagePaths.for_snowpark_project( diff --git a/src/snowflake/cli/plugins/streamlit/commands.py b/src/snowflake/cli/plugins/streamlit/commands.py index 76059cbac7..9cd432a8bb 100644 --- a/src/snowflake/cli/plugins/streamlit/commands.py +++ b/src/snowflake/cli/plugins/streamlit/commands.py @@ -29,6 +29,7 @@ from snowflake.cli.api.commands.project_initialisation import add_init_command from snowflake.cli.api.commands.snow_typer import SnowTyperFactory from snowflake.cli.api.constants import ObjectType +from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.identifiers import FQN from snowflake.cli.api.output.types import ( CommandResult, @@ -108,7 +109,7 @@ def _check_file_exists_if_not_default(ctx: click.Context, value): @app.command("deploy", requires_connection=True) -@with_project_definition("streamlit") +@with_project_definition() @with_experimental_behaviour() def streamlit_deploy( replace: bool = ReplaceOption( @@ -122,6 +123,12 @@ def streamlit_deploy( environment.yml and any other pages or folders, if present. If you don’t specify a stage name, the `streamlit` stage is used. If the specified stage does not exist, the command creates it. """ + + if cli_context.project_definition.streamlit is None: + raise NoProjectDefinitionError( + project_type="streamlit", project_file=cli_context.project_root + ) + streamlit: Streamlit = cli_context.project_definition.streamlit if not streamlit: return MessageResult("No streamlit were specified in project definition.") From 53a9cce08f260d2bc616a7169529e76afb60a8a8 Mon Sep 17 00:00:00 2001 From: Michel El Nacouzi Date: Wed, 3 Jul 2024 12:36:53 -0400 Subject: [PATCH 2/2] Add util function for checking project type --- .../cli/api/project/project_verification.py | 23 ++++++++ .../cli/plugins/nativeapp/commands.py | 32 +++-------- .../cli/plugins/nativeapp/version/commands.py | 17 ++---- .../cli/plugins/snowpark/commands.py | 16 ++---- .../cli/plugins/streamlit/commands.py | 7 +-- tests/__snapshots__/test_help_messages.ambr | 54 +++++++++---------- 6 files changed, 66 insertions(+), 83 deletions(-) create mode 100644 src/snowflake/cli/api/project/project_verification.py diff --git a/src/snowflake/cli/api/project/project_verification.py b/src/snowflake/cli/api/project/project_verification.py new file mode 100644 index 0000000000..6aa4968204 --- /dev/null +++ b/src/snowflake/cli/api/project/project_verification.py @@ -0,0 +1,23 @@ +# Copyright (c) 2024 Snowflake Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from snowflake.cli.api.cli_global_context import cli_context +from snowflake.cli.api.exceptions import NoProjectDefinitionError + + +def assert_project_type(project_type: str): + if not getattr(cli_context.project_definition, project_type, None): + raise NoProjectDefinitionError( + project_type=project_type, project_file=cli_context.project_root + ) diff --git a/src/snowflake/cli/plugins/nativeapp/commands.py b/src/snowflake/cli/plugins/nativeapp/commands.py index e1354330ca..f0822f8d98 100644 --- a/src/snowflake/cli/plugins/nativeapp/commands.py +++ b/src/snowflake/cli/plugins/nativeapp/commands.py @@ -26,7 +26,6 @@ with_project_definition, ) from snowflake.cli.api.commands.snow_typer import SnowTyperFactory -from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.output.formats import OutputFormat from snowflake.cli.api.output.types import ( CollectionResult, @@ -34,6 +33,7 @@ MessageResult, ObjectResult, ) +from snowflake.cli.api.project.project_verification import assert_project_type from snowflake.cli.api.secure_path import SecurePath from snowflake.cli.plugins.nativeapp.common_flags import ( ForceOption, @@ -154,10 +154,7 @@ def app_bundle( Prepares a local folder with configured app artifacts. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, @@ -198,10 +195,7 @@ def app_run( then creates or upgrades an application object from the application package. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") is_interactive = False if force: @@ -242,10 +236,7 @@ def app_open( once it has been installed in your account. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, @@ -276,10 +267,7 @@ def app_teardown( Attempts to drop both the application object and application package as defined in the project definition file. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") processor = NativeAppTeardownProcessor( project_definition=cli_context.project_definition.native_app, @@ -321,10 +309,7 @@ def app_deploy( Running this command with no arguments at all, as in `snow app deploy`, is a shorthand for `snow app deploy --prune --recursive`. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") has_paths = paths is not None and len(paths) > 0 if prune is None and recursive is None and not has_paths: @@ -365,10 +350,7 @@ def app_validate(**options): Validates a deployed Snowflake Native App's setup script. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") manager = NativeAppManager( project_definition=cli_context.project_definition.native_app, diff --git a/src/snowflake/cli/plugins/nativeapp/version/commands.py b/src/snowflake/cli/plugins/nativeapp/version/commands.py index ccf78af46c..57fee71022 100644 --- a/src/snowflake/cli/plugins/nativeapp/version/commands.py +++ b/src/snowflake/cli/plugins/nativeapp/version/commands.py @@ -24,8 +24,8 @@ with_project_definition, ) from snowflake.cli.api.commands.snow_typer import SnowTyperFactory -from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.output.types import CommandResult, MessageResult, QueryResult +from snowflake.cli.api.project.project_verification import assert_project_type from snowflake.cli.plugins.nativeapp.common_flags import ForceOption, InteractiveOption from snowflake.cli.plugins.nativeapp.policy import ( AllowAlwaysPolicy, @@ -73,10 +73,7 @@ def create( Adds a new patch to the provided version defined in your application package. If the version does not exist, creates a version with patch 0. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") if version is None and patch is not None: raise MissingParameter("Cannot provide a patch without version!") @@ -122,10 +119,7 @@ def version_list( Lists all versions defined in an application package. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") processor = NativeAppRunProcessor( project_definition=cli_context.project_definition.native_app, @@ -151,10 +145,7 @@ def drop( Dropping patches is not allowed. """ - if cli_context.project_definition.native_app is None: - raise NoProjectDefinitionError( - project_type="native_app", project_file=cli_context.project_root - ) + assert_project_type("native_app") is_interactive = False if force: diff --git a/src/snowflake/cli/plugins/snowpark/commands.py b/src/snowflake/cli/plugins/snowpark/commands.py index e75dac2e54..ee2eef7097 100644 --- a/src/snowflake/cli/plugins/snowpark/commands.py +++ b/src/snowflake/cli/plugins/snowpark/commands.py @@ -38,10 +38,7 @@ DEPLOYMENT_STAGE, ObjectType, ) -from snowflake.cli.api.exceptions import ( - NoProjectDefinitionError, - SecretsWithoutExternalAccessIntegrationError, -) +from snowflake.cli.api.exceptions import SecretsWithoutExternalAccessIntegrationError from snowflake.cli.api.identifiers import FQN from snowflake.cli.api.output.types import ( CollectionResult, @@ -49,6 +46,7 @@ MessageResult, SingleQueryResult, ) +from snowflake.cli.api.project.project_verification import assert_project_type from snowflake.cli.api.project.schemas.snowpark.callable import ( FunctionSchema, ProcedureSchema, @@ -130,10 +128,7 @@ def deploy( All deployed objects use the same artifact which is deployed only once. """ - if cli_context.project_definition.snowpark is None: - raise NoProjectDefinitionError( - project_type="snowpark", project_file=cli_context.project_root - ) + assert_project_type("snowpark") snowpark = cli_context.project_definition.snowpark paths = SnowparkPackagePaths.for_snowpark_project( @@ -404,10 +399,7 @@ def build( The archive is built using only the `src` directory specified in the project file. """ - if cli_context.project_definition.snowpark is None: - raise NoProjectDefinitionError( - project_type="snowpark", project_file=cli_context.project_root - ) + assert_project_type("snowpark") if not deprecated_check_anaconda_for_pypi_deps: ignore_anaconda = True diff --git a/src/snowflake/cli/plugins/streamlit/commands.py b/src/snowflake/cli/plugins/streamlit/commands.py index 9cd432a8bb..c3b2cd96bf 100644 --- a/src/snowflake/cli/plugins/streamlit/commands.py +++ b/src/snowflake/cli/plugins/streamlit/commands.py @@ -29,13 +29,13 @@ from snowflake.cli.api.commands.project_initialisation import add_init_command from snowflake.cli.api.commands.snow_typer import SnowTyperFactory from snowflake.cli.api.constants import ObjectType -from snowflake.cli.api.exceptions import NoProjectDefinitionError from snowflake.cli.api.identifiers import FQN from snowflake.cli.api.output.types import ( CommandResult, MessageResult, SingleQueryResult, ) +from snowflake.cli.api.project.project_verification import assert_project_type from snowflake.cli.api.project.schemas.streamlit.streamlit import Streamlit from snowflake.cli.plugins.object.command_aliases import ( add_object_command_aliases, @@ -124,10 +124,7 @@ def streamlit_deploy( stage is used. If the specified stage does not exist, the command creates it. """ - if cli_context.project_definition.streamlit is None: - raise NoProjectDefinitionError( - project_type="streamlit", project_file=cli_context.project_root - ) + assert_project_type("streamlit") streamlit: Streamlit = cli_context.project_definition.streamlit if not streamlit: diff --git a/tests/__snapshots__/test_help_messages.ambr b/tests/__snapshots__/test_help_messages.ambr index 0ec9037f6c..285eabd0df 100644 --- a/tests/__snapshots__/test_help_messages.ambr +++ b/tests/__snapshots__/test_help_messages.ambr @@ -46,8 +46,8 @@ Prepares a local folder with configured app artifacts. +- Options --------------------------------------------------------------------+ - | --project -p TEXT Path where the Snowflake Native App project | - | resides. Defaults to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. | @@ -106,9 +106,9 @@ | validation of a deployed Snowflake | | Native App's setup script SQL | | [default: validate] | - | --project -p TEXT Path where the Snowflake Native App | - | project resides. Defaults to | - | current working directory. | + | --project -p TEXT Path where Snowflake project | + | resides. Defaults to current | + | working directory. | | --env TEXT String in format of key=value. | | Overrides variables from env | | section used for templating. | @@ -264,8 +264,8 @@ installed in your account. +- Options --------------------------------------------------------------------+ - | --project -p TEXT Path where the Snowflake Native App project | - | resides. Defaults to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. | @@ -408,8 +408,7 @@ | Native App's setup | | script SQL | | [default: validate] | - | --project -p TEXT Path where the | - | Snowflake Native App | + | --project -p TEXT Path where Snowflake | | project resides. | | Defaults to current | | working directory. | @@ -505,9 +504,9 @@ | to True in an interactive shell | | environment, and False | | otherwise. | - | --project -p TEXT Path where the Snowflake Native | - | App project resides. Defaults | - | to current working directory. | + | --project -p TEXT Path where Snowflake project | + | resides. Defaults to current | + | working directory. | | --env TEXT String in format of key=value. | | Overrides variables from env | | section used for templating. | @@ -576,8 +575,8 @@ Validates a deployed Snowflake Native App's setup script. +- Options --------------------------------------------------------------------+ - | --project -p TEXT Path where the Snowflake Native App project | - | resides. Defaults to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. | @@ -689,10 +688,9 @@ | want perform potentially | | destructive actions. | | Defaults to unset. | - | --project -p TEXT Path where the Snowflake | - | Native App project | - | resides. Defaults to | - | current working | + | --project -p TEXT Path where Snowflake | + | project resides. Defaults | + | to current working | | directory. | | --env TEXT String in format of | | key=value. Overrides | @@ -789,9 +787,9 @@ | want perform potentially | | destructive actions. Defaults | | to unset. | - | --project -p TEXT Path where the Snowflake Native | - | App project resides. Defaults | - | to current working directory. | + | --project -p TEXT Path where Snowflake project | + | resides. Defaults to current | + | working directory. | | --env TEXT String in format of key=value. | | Overrides variables from env | | section used for templating. | @@ -860,8 +858,8 @@ Lists all versions defined in an application package. +- Options --------------------------------------------------------------------+ - | --project -p TEXT Path where the Snowflake Native App project | - | resides. Defaults to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. | @@ -3023,7 +3021,7 @@ | --skip-version-check Skip comparing versions of | | dependencies between requirements | | and Anaconda. | - | --project -p TEXT Path where the Snowpark project | + | --project -p TEXT Path where Snowflake project | | resides. Defaults to current working | | directory. | | --env TEXT String in format of key=value. | @@ -3099,8 +3097,8 @@ +- Options --------------------------------------------------------------------+ | --replace Replaces procedure or function, even if no detected | | changes to metadata | - | --project -p TEXT Path where the Snowpark project resides. Defaults | - | to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. | @@ -7242,8 +7240,8 @@ +- Options --------------------------------------------------------------------+ | --replace Replace the Streamlit app if it already exists. | | --open Whether to open the Streamlit app in a browser. | - | --project -p TEXT Path where the Streamlit app project resides. | - | Defaults to current working directory. | + | --project -p TEXT Path where Snowflake project resides. Defaults to | + | current working directory. | | --env TEXT String in format of key=value. Overrides variables | | from env section used for templating. | | --help -h Show this message and exit. |