snowflake-cli-labs 2.4.1__py3-none-any.whl → 2.5.0rc1__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.
- snowflake/cli/__about__.py +15 -1
- snowflake/cli/__init__.py +13 -0
- snowflake/cli/api/__init__.py +14 -0
- snowflake/cli/api/cli_global_context.py +26 -0
- snowflake/cli/api/commands/__init__.py +13 -0
- snowflake/cli/api/commands/alias.py +14 -0
- snowflake/cli/api/commands/decorators.py +14 -0
- snowflake/cli/api/commands/experimental_behaviour.py +14 -0
- snowflake/cli/api/commands/flags.py +21 -1
- snowflake/cli/api/commands/project_initialisation.py +19 -2
- snowflake/cli/api/commands/snow_typer.py +90 -1
- snowflake/cli/api/config.py +14 -0
- snowflake/cli/api/console/__init__.py +14 -0
- snowflake/cli/api/console/abc.py +14 -0
- snowflake/cli/api/console/console.py +14 -0
- snowflake/cli/api/console/enum.py +14 -0
- snowflake/cli/api/constants.py +14 -0
- snowflake/cli/api/exceptions.py +22 -0
- snowflake/cli/api/feature_flags.py +14 -1
- snowflake/cli/api/identifiers.py +16 -2
- snowflake/cli/api/output/__init__.py +13 -0
- snowflake/cli/api/output/formats.py +14 -0
- snowflake/cli/api/output/types.py +14 -0
- snowflake/cli/api/plugins/__init__.py +13 -0
- snowflake/cli/api/plugins/command/__init__.py +14 -0
- snowflake/cli/api/plugins/command/plugin_hook_specs.py +14 -0
- snowflake/cli/api/plugins/plugin_config.py +14 -0
- snowflake/cli/api/project/__init__.py +13 -0
- snowflake/cli/api/project/definition.py +54 -8
- snowflake/cli/api/project/definition_manager.py +28 -2
- snowflake/cli/api/project/errors.py +14 -0
- snowflake/cli/api/project/schemas/__init__.py +13 -0
- snowflake/cli/api/project/schemas/identifier_model.py +14 -0
- snowflake/cli/api/project/schemas/native_app/__init__.py +13 -0
- snowflake/cli/api/project/schemas/native_app/application.py +14 -0
- snowflake/cli/api/project/schemas/native_app/native_app.py +35 -0
- snowflake/cli/api/project/schemas/native_app/package.py +14 -0
- snowflake/cli/api/project/schemas/native_app/path_mapping.py +15 -1
- snowflake/cli/api/project/schemas/project_definition.py +14 -0
- snowflake/cli/api/project/schemas/snowpark/__init__.py +13 -0
- snowflake/cli/api/project/schemas/snowpark/argument.py +14 -0
- snowflake/cli/api/project/schemas/snowpark/callable.py +14 -0
- snowflake/cli/api/project/schemas/snowpark/snowpark.py +14 -0
- snowflake/cli/api/project/schemas/streamlit/__init__.py +13 -0
- snowflake/cli/api/project/schemas/streamlit/streamlit.py +14 -0
- snowflake/cli/api/project/schemas/updatable_model.py +14 -0
- snowflake/cli/api/project/util.py +32 -3
- snowflake/cli/api/secure_path.py +59 -7
- snowflake/cli/api/secure_utils.py +14 -0
- snowflake/cli/api/sql_execution.py +14 -0
- snowflake/cli/api/utils/__init__.py +13 -0
- snowflake/cli/api/utils/cursor.py +14 -0
- snowflake/cli/api/utils/definition_rendering.py +268 -0
- snowflake/cli/api/utils/dict_utils.py +73 -0
- snowflake/cli/api/utils/error_handling.py +14 -0
- snowflake/cli/api/utils/graph.py +97 -0
- snowflake/cli/api/utils/models.py +14 -0
- snowflake/cli/api/utils/naming_utils.py +13 -0
- snowflake/cli/api/utils/path_utils.py +14 -0
- snowflake/cli/api/utils/rendering.py +21 -152
- snowflake/cli/api/utils/types.py +18 -1
- snowflake/cli/app/__init__.py +14 -0
- snowflake/cli/app/__main__.py +14 -0
- snowflake/cli/app/api_impl/__init__.py +13 -0
- snowflake/cli/app/api_impl/plugin/__init__.py +13 -0
- snowflake/cli/app/api_impl/plugin/plugin_config_provider_impl.py +14 -0
- snowflake/cli/app/cli_app.py +14 -0
- snowflake/cli/app/commands_registration/__init__.py +14 -0
- snowflake/cli/app/commands_registration/builtin_plugins.py +14 -0
- snowflake/cli/app/commands_registration/command_plugins_loader.py +14 -0
- snowflake/cli/app/commands_registration/commands_registration_with_callbacks.py +14 -0
- snowflake/cli/app/commands_registration/exception_logging.py +14 -0
- snowflake/cli/app/commands_registration/threadsafe.py +14 -0
- snowflake/cli/app/commands_registration/typer_registration.py +14 -0
- snowflake/cli/app/constants.py +14 -0
- snowflake/cli/app/dev/__init__.py +13 -0
- snowflake/cli/app/dev/commands_structure.py +14 -0
- snowflake/cli/app/dev/docs/__init__.py +13 -0
- snowflake/cli/app/dev/docs/generator.py +14 -0
- snowflake/cli/app/dev/pycharm_remote_debug.py +14 -0
- snowflake/cli/app/loggers.py +14 -0
- snowflake/cli/app/main_typer.py +14 -0
- snowflake/cli/app/printing.py +14 -0
- snowflake/cli/app/snow_connector.py +14 -0
- snowflake/cli/app/telemetry.py +14 -0
- snowflake/cli/plugins/__init__.py +13 -0
- snowflake/cli/plugins/connection/__init__.py +13 -0
- snowflake/cli/plugins/connection/commands.py +27 -2
- snowflake/cli/plugins/connection/plugin_spec.py +15 -1
- snowflake/cli/plugins/connection/util.py +21 -1
- snowflake/cli/plugins/cortex/__init__.py +13 -0
- snowflake/cli/plugins/cortex/commands.py +16 -2
- snowflake/cli/plugins/cortex/constants.py +14 -0
- snowflake/cli/plugins/cortex/manager.py +14 -0
- snowflake/cli/plugins/cortex/plugin_spec.py +15 -1
- snowflake/cli/plugins/cortex/types.py +14 -0
- snowflake/cli/plugins/git/__init__.py +13 -0
- snowflake/cli/plugins/git/commands.py +16 -2
- snowflake/cli/plugins/git/manager.py +14 -0
- snowflake/cli/plugins/git/plugin_spec.py +15 -1
- snowflake/cli/plugins/nativeapp/__init__.py +13 -0
- snowflake/cli/plugins/nativeapp/artifacts.py +202 -98
- snowflake/cli/plugins/nativeapp/codegen/__init__.py +13 -0
- snowflake/cli/plugins/nativeapp/codegen/artifact_processor.py +14 -0
- snowflake/cli/plugins/nativeapp/codegen/compiler.py +14 -0
- snowflake/cli/plugins/nativeapp/codegen/sandbox.py +14 -0
- snowflake/cli/plugins/nativeapp/codegen/snowpark/callback_source.py.jinja +5 -5
- snowflake/cli/plugins/nativeapp/codegen/snowpark/extension_function_utils.py +34 -13
- snowflake/cli/plugins/nativeapp/codegen/snowpark/models.py +14 -0
- snowflake/cli/plugins/nativeapp/codegen/snowpark/python_processor.py +52 -13
- snowflake/cli/plugins/nativeapp/commands.py +63 -10
- snowflake/cli/plugins/nativeapp/common_flags.py +20 -0
- snowflake/cli/plugins/nativeapp/constants.py +15 -0
- snowflake/cli/plugins/nativeapp/exceptions.py +23 -2
- snowflake/cli/plugins/nativeapp/init.py +14 -0
- snowflake/cli/plugins/nativeapp/manager.py +118 -25
- snowflake/cli/plugins/nativeapp/plugin_spec.py +15 -1
- snowflake/cli/plugins/nativeapp/policy.py +14 -0
- snowflake/cli/plugins/nativeapp/run_processor.py +22 -3
- snowflake/cli/plugins/nativeapp/teardown_processor.py +14 -0
- snowflake/cli/plugins/nativeapp/utils.py +14 -0
- snowflake/cli/plugins/nativeapp/version/__init__.py +13 -0
- snowflake/cli/plugins/nativeapp/version/commands.py +19 -4
- snowflake/cli/plugins/nativeapp/version/version_processor.py +26 -4
- snowflake/cli/plugins/notebook/__init__.py +13 -0
- snowflake/cli/plugins/notebook/commands.py +16 -4
- snowflake/cli/plugins/notebook/exceptions.py +14 -0
- snowflake/cli/plugins/notebook/manager.py +14 -0
- snowflake/cli/plugins/notebook/plugin_spec.py +15 -1
- snowflake/cli/plugins/notebook/types.py +14 -0
- snowflake/cli/plugins/object/__init__.py +13 -11
- snowflake/cli/plugins/object/command_aliases.py +20 -6
- snowflake/cli/plugins/object/commands.py +16 -2
- snowflake/cli/plugins/object/common.py +14 -0
- snowflake/cli/plugins/object/manager.py +14 -0
- snowflake/cli/plugins/object/plugin_spec.py +16 -2
- snowflake/cli/plugins/object_stage_deprecated/__init__.py +14 -0
- snowflake/cli/plugins/object_stage_deprecated/commands.py +16 -2
- snowflake/cli/plugins/object_stage_deprecated/plugin_spec.py +16 -4
- snowflake/cli/plugins/snowpark/__init__.py +13 -4
- snowflake/cli/plugins/snowpark/commands.py +18 -2
- snowflake/cli/plugins/snowpark/common.py +15 -0
- snowflake/cli/plugins/snowpark/manager.py +14 -0
- snowflake/cli/plugins/snowpark/models.py +15 -1
- snowflake/cli/plugins/snowpark/package/__init__.py +13 -0
- snowflake/cli/plugins/snowpark/package/anaconda_packages.py +14 -0
- snowflake/cli/plugins/snowpark/package/commands.py +16 -2
- snowflake/cli/plugins/snowpark/package/manager.py +14 -0
- snowflake/cli/plugins/snowpark/package/utils.py +14 -0
- snowflake/cli/plugins/snowpark/package_utils.py +15 -1
- snowflake/cli/plugins/snowpark/plugin_spec.py +16 -2
- snowflake/cli/plugins/snowpark/snowpark_package_paths.py +14 -0
- snowflake/cli/plugins/snowpark/snowpark_shared.py +14 -0
- snowflake/cli/plugins/snowpark/zipper.py +20 -3
- snowflake/cli/plugins/spcs/__init__.py +16 -2
- snowflake/cli/plugins/spcs/common.py +14 -0
- snowflake/cli/plugins/spcs/compute_pool/__init__.py +13 -0
- snowflake/cli/plugins/spcs/compute_pool/commands.py +16 -2
- snowflake/cli/plugins/spcs/compute_pool/manager.py +14 -0
- snowflake/cli/plugins/spcs/image_registry/__init__.py +13 -0
- snowflake/cli/plugins/spcs/image_registry/commands.py +16 -2
- snowflake/cli/plugins/spcs/image_registry/manager.py +16 -0
- snowflake/cli/plugins/spcs/image_repository/__init__.py +13 -0
- snowflake/cli/plugins/spcs/image_repository/commands.py +16 -2
- snowflake/cli/plugins/spcs/image_repository/manager.py +14 -0
- snowflake/cli/plugins/spcs/jobs/__init__.py +13 -0
- snowflake/cli/plugins/spcs/jobs/commands.py +17 -3
- snowflake/cli/plugins/spcs/jobs/manager.py +14 -0
- snowflake/cli/plugins/spcs/plugin_spec.py +15 -1
- snowflake/cli/plugins/spcs/services/__init__.py +13 -0
- snowflake/cli/plugins/spcs/services/commands.py +16 -2
- snowflake/cli/plugins/spcs/services/manager.py +14 -0
- snowflake/cli/plugins/sql/__init__.py +13 -0
- snowflake/cli/plugins/sql/commands.py +16 -2
- snowflake/cli/plugins/sql/manager.py +14 -0
- snowflake/cli/plugins/sql/plugin_spec.py +15 -1
- snowflake/cli/plugins/sql/snowsql_templating.py +14 -0
- snowflake/cli/plugins/stage/__init__.py +13 -0
- snowflake/cli/plugins/stage/commands.py +17 -3
- snowflake/cli/plugins/stage/diff.py +14 -0
- snowflake/cli/plugins/stage/manager.py +16 -5
- snowflake/cli/plugins/stage/plugin_spec.py +16 -2
- snowflake/cli/plugins/streamlit/__init__.py +13 -0
- snowflake/cli/plugins/streamlit/commands.py +16 -2
- snowflake/cli/plugins/streamlit/manager.py +14 -0
- snowflake/cli/plugins/streamlit/plugin_spec.py +15 -1
- snowflake/cli/templates/default_snowpark/app/__init__.py +13 -0
- snowflake/cli/templates/default_snowpark/app/common.py +15 -0
- snowflake/cli/templates/default_snowpark/app/functions.py +14 -0
- snowflake/cli/templates/default_snowpark/app/procedures.py +14 -0
- snowflake/cli/templates/default_snowpark/snowflake.yml +1 -1
- snowflake/cli/templates/default_streamlit/common/hello.py +15 -0
- snowflake/cli/templates/default_streamlit/pages/my_page.py +14 -0
- snowflake/cli/templates/default_streamlit/snowflake.yml +1 -1
- snowflake/cli/templates/default_streamlit/streamlit_app.py +14 -0
- {snowflake_cli_labs-2.4.1.dist-info → snowflake_cli_labs-2.5.0rc1.dist-info}/METADATA +23 -7
- snowflake_cli_labs-2.5.0rc1.dist-info/RECORD +206 -0
- snowflake/cli/plugins/nativeapp/feature_flags.py +0 -10
- snowflake/cli/templates/environment.yml.jinja +0 -5
- snowflake/cli/templates/streamlit_app_launcher.py.jinja +0 -19
- snowflake_cli_labs-2.4.1.dist-info/RECORD +0 -206
- {snowflake_cli_labs-2.4.1.dist-info → snowflake_cli_labs-2.5.0rc1.dist-info}/WHEEL +0 -0
- {snowflake_cli_labs-2.4.1.dist-info → snowflake_cli_labs-2.5.0rc1.dist-info}/entry_points.txt +0 -0
- {snowflake_cli_labs-2.4.1.dist-info → snowflake_cli_labs-2.5.0rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
NotebookName = str
|
|
2
16
|
NotebookStagePath = str
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
from typing import List, Optional, Tuple
|
|
4
18
|
|
|
5
19
|
import typer
|
|
6
20
|
from click import ClickException
|
|
7
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
21
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
8
22
|
from snowflake.cli.api.constants import ObjectType
|
|
9
23
|
from snowflake.cli.plugins.object.commands import (
|
|
10
24
|
ScopeOption,
|
|
@@ -16,7 +30,7 @@ from snowflake.cli.plugins.object.commands import (
|
|
|
16
30
|
|
|
17
31
|
|
|
18
32
|
def add_object_command_aliases(
|
|
19
|
-
app:
|
|
33
|
+
app: SnowTyperFactory,
|
|
20
34
|
object_type: ObjectType,
|
|
21
35
|
name_argument: typer.Argument,
|
|
22
36
|
like_option: Optional[typer.Option],
|
|
@@ -31,7 +45,7 @@ def add_object_command_aliases(
|
|
|
31
45
|
|
|
32
46
|
@app.command("list", requires_connection=True)
|
|
33
47
|
def list_cmd(like: str = like_option, **options): # type: ignore
|
|
34
|
-
list_(
|
|
48
|
+
return list_(
|
|
35
49
|
object_type=object_type.value.cli_name,
|
|
36
50
|
like=like,
|
|
37
51
|
scope=ScopeOption.default,
|
|
@@ -46,7 +60,7 @@ def add_object_command_aliases(
|
|
|
46
60
|
scope: Tuple[str, str] = scope_option, # type: ignore
|
|
47
61
|
**options,
|
|
48
62
|
):
|
|
49
|
-
list_(
|
|
63
|
+
return list_(
|
|
50
64
|
object_type=object_type.value.cli_name,
|
|
51
65
|
like=like,
|
|
52
66
|
scope=scope,
|
|
@@ -59,7 +73,7 @@ def add_object_command_aliases(
|
|
|
59
73
|
|
|
60
74
|
@app.command("drop", requires_connection=True)
|
|
61
75
|
def drop_cmd(name: str = name_argument, **options):
|
|
62
|
-
drop(
|
|
76
|
+
return drop(
|
|
63
77
|
object_type=object_type.value.cli_name,
|
|
64
78
|
object_name=name,
|
|
65
79
|
**options,
|
|
@@ -71,7 +85,7 @@ def add_object_command_aliases(
|
|
|
71
85
|
|
|
72
86
|
@app.command("describe", requires_connection=True)
|
|
73
87
|
def describe_cmd(name: str = name_argument, **options):
|
|
74
|
-
describe(
|
|
88
|
+
return describe(
|
|
75
89
|
object_type=object_type.value.cli_name,
|
|
76
90
|
object_name=name,
|
|
77
91
|
**options,
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
from typing import Tuple
|
|
@@ -5,13 +19,13 @@ from typing import Tuple
|
|
|
5
19
|
import typer
|
|
6
20
|
from click import ClickException
|
|
7
21
|
from snowflake.cli.api.commands.flags import like_option
|
|
8
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
22
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
9
23
|
from snowflake.cli.api.constants import SUPPORTED_OBJECTS, VALID_SCOPES
|
|
10
24
|
from snowflake.cli.api.output.types import QueryResult
|
|
11
25
|
from snowflake.cli.api.project.util import is_valid_identifier
|
|
12
26
|
from snowflake.cli.plugins.object.manager import ObjectManager
|
|
13
27
|
|
|
14
|
-
app =
|
|
28
|
+
app = SnowTyperFactory(
|
|
15
29
|
name="object",
|
|
16
30
|
help="Manages Snowflake objects like warehouses and stages",
|
|
17
31
|
)
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
from dataclasses import dataclass
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
from typing import Optional, Tuple, Union
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from snowflake.cli.api.plugins.command import (
|
|
2
16
|
SNOWCLI_ROOT_COMMAND_PATH,
|
|
3
17
|
CommandSpec,
|
|
4
18
|
CommandType,
|
|
5
19
|
plugin_hook_impl,
|
|
6
20
|
)
|
|
7
|
-
from snowflake.cli.plugins.object
|
|
21
|
+
from snowflake.cli.plugins.object import commands
|
|
8
22
|
|
|
9
23
|
|
|
10
24
|
@plugin_hook_impl
|
|
@@ -12,5 +26,5 @@ def command_spec():
|
|
|
12
26
|
return CommandSpec(
|
|
13
27
|
parent_command_path=SNOWCLI_ROOT_COMMAND_PATH,
|
|
14
28
|
command_type=CommandType.COMMAND_GROUP,
|
|
15
|
-
typer_instance=
|
|
29
|
+
typer_instance=commands.app.create_instance(),
|
|
16
30
|
)
|
|
@@ -1 +1,15 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
# TODO 3.0: remove this file
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
# TODO 3.0: remove these commands
|
|
2
16
|
|
|
3
17
|
from __future__ import annotations
|
|
@@ -6,7 +20,7 @@ import typer
|
|
|
6
20
|
from snowflake.cli.api.commands.flags import (
|
|
7
21
|
PatternOption,
|
|
8
22
|
)
|
|
9
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
23
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
10
24
|
from snowflake.cli.api.console import cli_console
|
|
11
25
|
from snowflake.cli.api.plugins.command import CommandPath
|
|
12
26
|
from snowflake.cli.plugins.stage.commands import (
|
|
@@ -23,7 +37,7 @@ _deprecated_command_msg = (
|
|
|
23
37
|
f" Please use `{CommandPath(['stage'])}` instead."
|
|
24
38
|
)
|
|
25
39
|
|
|
26
|
-
app =
|
|
40
|
+
app = SnowTyperFactory(name="stage", help="Manages stages.", deprecated=True)
|
|
27
41
|
|
|
28
42
|
|
|
29
43
|
@app.callback()
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
# TODO 3.0: remove this file
|
|
2
16
|
|
|
3
17
|
from snowflake.cli.api.plugins.command import (
|
|
@@ -6,9 +20,7 @@ from snowflake.cli.api.plugins.command import (
|
|
|
6
20
|
CommandType,
|
|
7
21
|
plugin_hook_impl,
|
|
8
22
|
)
|
|
9
|
-
from snowflake.cli.plugins.object_stage_deprecated
|
|
10
|
-
app as stage_deprecated_app,
|
|
11
|
-
)
|
|
23
|
+
from snowflake.cli.plugins.object_stage_deprecated import commands
|
|
12
24
|
|
|
13
25
|
|
|
14
26
|
@plugin_hook_impl
|
|
@@ -16,5 +28,5 @@ def command_spec():
|
|
|
16
28
|
return CommandSpec(
|
|
17
29
|
parent_command_path=CommandPath(["object"]),
|
|
18
30
|
command_type=CommandType.COMMAND_GROUP,
|
|
19
|
-
typer_instance=
|
|
31
|
+
typer_instance=commands.app.create_instance(),
|
|
20
32
|
)
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import logging
|
|
@@ -18,7 +32,7 @@ from snowflake.cli.api.commands.flags import (
|
|
|
18
32
|
like_option,
|
|
19
33
|
)
|
|
20
34
|
from snowflake.cli.api.commands.project_initialisation import add_init_command
|
|
21
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
35
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
22
36
|
from snowflake.cli.api.constants import (
|
|
23
37
|
DEFAULT_SIZE_LIMIT_MB,
|
|
24
38
|
DEPLOYMENT_STAGE,
|
|
@@ -63,6 +77,7 @@ from snowflake.cli.plugins.snowpark.package.anaconda_packages import (
|
|
|
63
77
|
AnacondaPackages,
|
|
64
78
|
AnacondaPackagesManager,
|
|
65
79
|
)
|
|
80
|
+
from snowflake.cli.plugins.snowpark.package.commands import app as package_app
|
|
66
81
|
from snowflake.cli.plugins.snowpark.snowpark_package_paths import SnowparkPackagePaths
|
|
67
82
|
from snowflake.cli.plugins.snowpark.snowpark_shared import (
|
|
68
83
|
AllowSharedLibrariesOption,
|
|
@@ -79,10 +94,11 @@ from snowflake.connector import DictCursor, ProgrammingError
|
|
|
79
94
|
|
|
80
95
|
log = logging.getLogger(__name__)
|
|
81
96
|
|
|
82
|
-
app =
|
|
97
|
+
app = SnowTyperFactory(
|
|
83
98
|
name="snowpark",
|
|
84
99
|
help="Manages procedures and functions.",
|
|
85
100
|
)
|
|
101
|
+
app.add_typer(package_app)
|
|
86
102
|
|
|
87
103
|
ObjectTypeArgument = typer.Argument(
|
|
88
104
|
help="Type of Snowpark object",
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import re
|
|
@@ -153,6 +167,7 @@ class SnowparkObjectManager(SqlExecutionMixin):
|
|
|
153
167
|
|
|
154
168
|
query = [
|
|
155
169
|
f"create or replace {self._object_type.value.sf_name} {identifier}",
|
|
170
|
+
f"copy grants",
|
|
156
171
|
f"returns {return_type}",
|
|
157
172
|
"language python",
|
|
158
173
|
f"runtime_version={runtime or DEFAULT_RUNTIME}",
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import logging
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import re
|
|
@@ -119,7 +133,7 @@ class WheelMetadata:
|
|
|
119
133
|
@staticmethod
|
|
120
134
|
def to_wheel_name_format(package_name: str) -> str:
|
|
121
135
|
# https://peps.python.org/pep-0491/#escaping-and-unicode
|
|
122
|
-
return re.sub("[^\w\d.]+", "_", package_name, re.UNICODE)
|
|
136
|
+
return re.sub(r"[^\w\d.]+", "_", package_name, re.UNICODE)
|
|
123
137
|
|
|
124
138
|
|
|
125
139
|
def get_package_name(name: str) -> str:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import logging
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import logging
|
|
@@ -10,7 +24,7 @@ from click import ClickException
|
|
|
10
24
|
from snowflake.cli.api.commands.flags import (
|
|
11
25
|
deprecated_flag_callback,
|
|
12
26
|
)
|
|
13
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
27
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
14
28
|
from snowflake.cli.api.output.types import CommandResult, MessageResult
|
|
15
29
|
from snowflake.cli.api.secure_path import SecurePath
|
|
16
30
|
from snowflake.cli.plugins.snowpark.models import (
|
|
@@ -37,7 +51,7 @@ from snowflake.cli.plugins.snowpark.snowpark_shared import (
|
|
|
37
51
|
)
|
|
38
52
|
from snowflake.cli.plugins.snowpark.zipper import zip_dir
|
|
39
53
|
|
|
40
|
-
app =
|
|
54
|
+
app = SnowTyperFactory(
|
|
41
55
|
name="package",
|
|
42
56
|
help="Manages custom Python packages for Snowpark",
|
|
43
57
|
)
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import logging
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
from snowflake.cli.api.secure_path import SecurePath
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import dataclasses
|
|
@@ -45,7 +59,7 @@ def parse_requirements(
|
|
|
45
59
|
for line in requirements_file.read_text(
|
|
46
60
|
file_size_limit_mb=DEFAULT_SIZE_LIMIT_MB
|
|
47
61
|
).splitlines():
|
|
48
|
-
line = re.sub("\s*#.*", "", line).strip()
|
|
62
|
+
line = re.sub(r"\s*#.*", "", line).strip()
|
|
49
63
|
if line:
|
|
50
64
|
reqs.append(Requirement.parse(line))
|
|
51
65
|
return reqs
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from snowflake.cli.api.plugins.command import (
|
|
2
16
|
SNOWCLI_ROOT_COMMAND_PATH,
|
|
3
17
|
CommandSpec,
|
|
4
18
|
CommandType,
|
|
5
19
|
plugin_hook_impl,
|
|
6
20
|
)
|
|
7
|
-
from snowflake.cli.plugins.snowpark import
|
|
21
|
+
from snowflake.cli.plugins.snowpark import commands
|
|
8
22
|
|
|
9
23
|
|
|
10
24
|
@plugin_hook_impl
|
|
@@ -12,5 +26,5 @@ def command_spec():
|
|
|
12
26
|
return CommandSpec(
|
|
13
27
|
parent_command_path=SNOWCLI_ROOT_COMMAND_PATH,
|
|
14
28
|
command_type=CommandType.COMMAND_GROUP,
|
|
15
|
-
typer_instance=
|
|
29
|
+
typer_instance=commands.app.create_instance(),
|
|
16
30
|
)
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from dataclasses import dataclass
|
|
2
16
|
|
|
3
17
|
from snowflake.cli.api.project.schemas.snowpark.snowpark import Snowpark
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright (c) 2024 Snowflake Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from __future__ import annotations
|
|
2
16
|
|
|
3
17
|
import click
|