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
snowflake/cli/__about__.py
CHANGED
|
@@ -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
|
-
VERSION = "2.
|
|
17
|
+
VERSION = "2.5.0rc1"
|
snowflake/cli/__init__.py
CHANGED
|
@@ -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.
|
snowflake/cli/api/__init__.py
CHANGED
|
@@ -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
|
|
@@ -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
|
|
@@ -212,6 +226,7 @@ class _CliGlobalContextManager:
|
|
|
212
226
|
self._experimental = False
|
|
213
227
|
self._project_definition = None
|
|
214
228
|
self._project_root = None
|
|
229
|
+
self._template_context = None
|
|
215
230
|
self._silent: bool = False
|
|
216
231
|
|
|
217
232
|
def reset(self):
|
|
@@ -259,6 +274,13 @@ class _CliGlobalContextManager:
|
|
|
259
274
|
def set_project_root(self, project_root: Path):
|
|
260
275
|
self._project_root = project_root
|
|
261
276
|
|
|
277
|
+
@property
|
|
278
|
+
def template_context(self) -> dict:
|
|
279
|
+
return self._template_context
|
|
280
|
+
|
|
281
|
+
def set_template_context(self, template_context: dict):
|
|
282
|
+
self._template_context = template_context
|
|
283
|
+
|
|
262
284
|
@property
|
|
263
285
|
def connection_context(self) -> _ConnectionContext:
|
|
264
286
|
return self._connection_context
|
|
@@ -311,6 +333,10 @@ class _CliGlobalContextAccess:
|
|
|
311
333
|
def project_root(self):
|
|
312
334
|
return self._manager.project_root
|
|
313
335
|
|
|
336
|
+
@property
|
|
337
|
+
def template_context(self) -> dict:
|
|
338
|
+
return self._manager.template_context
|
|
339
|
+
|
|
314
340
|
@property
|
|
315
341
|
def silent(self) -> bool:
|
|
316
342
|
if self._should_force_mute_intermediate_output:
|
|
@@ -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 copy import deepcopy
|
|
2
16
|
|
|
3
17
|
|
|
@@ -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 inspect
|
|
@@ -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 snowflake.cli.api.cli_global_context import cli_context
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,5 +1,20 @@
|
|
|
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
|
|
|
17
|
+
import os
|
|
3
18
|
import tempfile
|
|
4
19
|
from dataclasses import dataclass
|
|
5
20
|
from enum import Enum
|
|
@@ -14,6 +29,7 @@ from snowflake.cli.api.cli_global_context import cli_context_manager
|
|
|
14
29
|
from snowflake.cli.api.console import cli_console
|
|
15
30
|
from snowflake.cli.api.exceptions import MissingConfiguration
|
|
16
31
|
from snowflake.cli.api.output.formats import OutputFormat
|
|
32
|
+
from snowflake.cli.api.utils.rendering import CONTEXT_KEY
|
|
17
33
|
|
|
18
34
|
DEFAULT_CONTEXT_SETTINGS = {"help_option_names": ["--help", "-h"]}
|
|
19
35
|
|
|
@@ -441,7 +457,7 @@ PatternOption = typer.Option(
|
|
|
441
457
|
"--pattern",
|
|
442
458
|
help=(
|
|
443
459
|
"Regex pattern for filtering files by name."
|
|
444
|
-
' For example --pattern ".*\.txt" will filter only files with .txt extension.'
|
|
460
|
+
r' For example --pattern ".*\.txt" will filter only files with .txt extension.'
|
|
445
461
|
),
|
|
446
462
|
show_default=False,
|
|
447
463
|
callback=_pattern_option_callback,
|
|
@@ -499,6 +515,7 @@ def project_type_option(project_name: str):
|
|
|
499
515
|
|
|
500
516
|
cli_context_manager.set_project_definition(project_definition)
|
|
501
517
|
cli_context_manager.set_project_root(project_root)
|
|
518
|
+
cli_context_manager.set_template_context(dm.template_context)
|
|
502
519
|
return project_definition
|
|
503
520
|
|
|
504
521
|
if project_name == "native_app":
|
|
@@ -527,14 +544,17 @@ def project_definition_option(optional: bool = False):
|
|
|
527
544
|
dm = DefinitionManager(project_path)
|
|
528
545
|
project_definition = dm.project_definition
|
|
529
546
|
project_root = dm.project_root
|
|
547
|
+
template_context = dm.template_context
|
|
530
548
|
except MissingConfiguration:
|
|
531
549
|
if optional:
|
|
532
550
|
project_definition = None
|
|
533
551
|
project_root = None
|
|
552
|
+
template_context = {CONTEXT_KEY: {"env": os.environ}}
|
|
534
553
|
else:
|
|
535
554
|
raise
|
|
536
555
|
cli_context_manager.set_project_definition(project_definition)
|
|
537
556
|
cli_context_manager.set_project_root(project_root)
|
|
557
|
+
cli_context_manager.set_template_context(template_context)
|
|
538
558
|
return project_definition
|
|
539
559
|
|
|
540
560
|
return typer.Option(
|
|
@@ -1,8 +1,22 @@
|
|
|
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
|
|
4
18
|
|
|
5
|
-
from snowflake.cli.api.commands.snow_typer import
|
|
19
|
+
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
6
20
|
from snowflake.cli.api.constants import TEMPLATES_PATH
|
|
7
21
|
from snowflake.cli.api.output.types import CommandResult, MessageResult
|
|
8
22
|
from snowflake.cli.api.secure_path import SecurePath
|
|
@@ -16,7 +30,10 @@ def _create_project_template(template_name: str, project_directory: str):
|
|
|
16
30
|
|
|
17
31
|
|
|
18
32
|
def add_init_command(
|
|
19
|
-
app:
|
|
33
|
+
app: SnowTyperFactory,
|
|
34
|
+
project_type: str,
|
|
35
|
+
template: str,
|
|
36
|
+
help_message: Optional[str] = None,
|
|
20
37
|
):
|
|
21
38
|
@app.command()
|
|
22
39
|
def init(
|
|
@@ -1,8 +1,23 @@
|
|
|
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
|
|
|
17
|
+
import dataclasses
|
|
3
18
|
import logging
|
|
4
19
|
from functools import wraps
|
|
5
|
-
from typing import Callable, Optional
|
|
20
|
+
from typing import Any, Callable, Dict, List, Optional, Tuple
|
|
6
21
|
|
|
7
22
|
import typer
|
|
8
23
|
from snowflake.cli.api.commands.decorators import (
|
|
@@ -111,3 +126,77 @@ class SnowTyper(typer.Typer):
|
|
|
111
126
|
|
|
112
127
|
log.debug("Executing command post execution callback")
|
|
113
128
|
flush_telemetry()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@dataclasses.dataclass
|
|
132
|
+
class SnowTyperCommandData:
|
|
133
|
+
"""
|
|
134
|
+
Class for storing data of commands to be registered in SnowTyper instances created by SnowTyperFactory.
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
func: Callable
|
|
138
|
+
args: Tuple[Any, ...]
|
|
139
|
+
kwargs: Dict[str, Any]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class SnowTyperFactory:
|
|
143
|
+
"""
|
|
144
|
+
SnowTyper factory. Usage is similar to SnowTyper, except that create_instance()
|
|
145
|
+
creates actual SnowTyper instance.
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
def __init__(
|
|
149
|
+
self,
|
|
150
|
+
/,
|
|
151
|
+
name: Optional[str] = None,
|
|
152
|
+
help: Optional[str] = None, # noqa: A002
|
|
153
|
+
short_help: Optional[str] = None,
|
|
154
|
+
is_hidden: Optional[Callable[[], bool]] = None,
|
|
155
|
+
deprecated: bool = False,
|
|
156
|
+
):
|
|
157
|
+
self.name = name
|
|
158
|
+
self.help = help
|
|
159
|
+
self.short_help = short_help
|
|
160
|
+
self.is_hidden = is_hidden
|
|
161
|
+
self.deprecated = deprecated
|
|
162
|
+
self.commands_to_register: List[SnowTyperCommandData] = []
|
|
163
|
+
self.subapps_to_register: List[SnowTyperFactory] = []
|
|
164
|
+
self.callbacks_to_register: List[Callable] = []
|
|
165
|
+
|
|
166
|
+
def create_instance(self) -> SnowTyper:
|
|
167
|
+
app = SnowTyper(
|
|
168
|
+
name=self.name,
|
|
169
|
+
help=self.help,
|
|
170
|
+
short_help=self.short_help,
|
|
171
|
+
hidden=self.is_hidden() if self.is_hidden else False,
|
|
172
|
+
deprecated=self.deprecated,
|
|
173
|
+
)
|
|
174
|
+
# register commands
|
|
175
|
+
for command in self.commands_to_register:
|
|
176
|
+
app.command(*command.args, **command.kwargs)(command.func)
|
|
177
|
+
# register callbacks
|
|
178
|
+
for callback in self.callbacks_to_register:
|
|
179
|
+
app.callback()(callback)
|
|
180
|
+
# add subgroups
|
|
181
|
+
for subapp in self.subapps_to_register:
|
|
182
|
+
app.add_typer(subapp.create_instance())
|
|
183
|
+
return app
|
|
184
|
+
|
|
185
|
+
def command(self, *args, **kwargs):
|
|
186
|
+
def decorator(command):
|
|
187
|
+
self.commands_to_register.append(
|
|
188
|
+
SnowTyperCommandData(command, args=args, kwargs=kwargs)
|
|
189
|
+
)
|
|
190
|
+
return command
|
|
191
|
+
|
|
192
|
+
return decorator
|
|
193
|
+
|
|
194
|
+
def add_typer(self, snow_typer: SnowTyperFactory) -> None:
|
|
195
|
+
self.subapps_to_register.append(snow_typer)
|
|
196
|
+
|
|
197
|
+
def callback(self):
|
|
198
|
+
def decorator(callback):
|
|
199
|
+
self.callbacks_to_register.append(callback)
|
|
200
|
+
return callback
|
|
201
|
+
|
|
202
|
+
return decorator
|
snowflake/cli/api/config.py
CHANGED
|
@@ -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 snowflake.cli.api.console.console import cli_console
|
|
2
16
|
|
|
3
17
|
__all__ = ("cli_console",)
|
snowflake/cli/api/console/abc.py
CHANGED
|
@@ -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 abc import ABC, abstractmethod
|
|
@@ -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 contextlib import contextmanager
|
|
@@ -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 enum import Enum
|
|
2
16
|
|
|
3
17
|
Output = Enum("Output", ("PHASE", "STEP", "INFO", "IMPORTANT"))
|
snowflake/cli/api/constants.py
CHANGED
|
@@ -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
|
snowflake/cli/api/exceptions.py
CHANGED
|
@@ -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 pathlib import Path
|
|
@@ -16,6 +30,14 @@ class MissingConfiguration(ClickException):
|
|
|
16
30
|
pass
|
|
17
31
|
|
|
18
32
|
|
|
33
|
+
class CycleDetectedError(ClickException):
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class InvalidTemplate(ClickException):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
19
41
|
class InvalidConnectionConfiguration(ClickException):
|
|
20
42
|
def format_message(self):
|
|
21
43
|
return f"Invalid connection configuration. {self.message}"
|
|
@@ -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 enum import Enum, unique
|
|
2
16
|
from typing import NamedTuple
|
|
3
17
|
|
|
@@ -34,4 +48,3 @@ class FeatureFlag(FeatureFlagMixin):
|
|
|
34
48
|
ENABLE_STREAMLIT_EMBEDDED_STAGE = BooleanFlag(
|
|
35
49
|
"ENABLE_STREAMLIT_EMBEDDED_STAGE", False
|
|
36
50
|
)
|
|
37
|
-
ENABLE_NOTEBOOKS = BooleanFlag("ENABLE_NOTEBOOKS", False)
|
snowflake/cli/api/identifiers.py
CHANGED
|
@@ -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
|
|
@@ -6,7 +20,7 @@ from click import ClickException
|
|
|
6
20
|
from snowflake.cli.api.cli_global_context import cli_context
|
|
7
21
|
from snowflake.cli.api.exceptions import FQNInconsistencyError, FQNNameError
|
|
8
22
|
from snowflake.cli.api.project.schemas.identifier_model import ObjectIdentifierBaseModel
|
|
9
|
-
from snowflake.cli.api.project.util import VALID_IDENTIFIER_REGEX,
|
|
23
|
+
from snowflake.cli.api.project.util import VALID_IDENTIFIER_REGEX, identifier_for_url
|
|
10
24
|
|
|
11
25
|
|
|
12
26
|
class FQN:
|
|
@@ -48,7 +62,7 @@ class FQN:
|
|
|
48
62
|
|
|
49
63
|
@property
|
|
50
64
|
def url_identifier(self) -> str:
|
|
51
|
-
return ".".join(
|
|
65
|
+
return ".".join(identifier_for_url(part) for part in self.identifier.split("."))
|
|
52
66
|
|
|
53
67
|
def __str__(self):
|
|
54
68
|
return self.identifier
|
|
@@ -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 enum import Enum
|
|
2
16
|
|
|
3
17
|
|
|
@@ -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 json
|
|
@@ -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
|
from dataclasses import dataclass
|