-
Notifications
You must be signed in to change notification settings - Fork 55
/
pyproject.toml
190 lines (164 loc) · 5.44 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# 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.
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "snowflake-cli"
authors = [{ name = "Snowflake Inc." }]
license = { file = "LICENSE" }
dynamic = ["version"]
requires-python = ">=3.10"
description = "Snowflake CLI"
readme = "README.md"
dependencies = [
"jinja2==3.1.4",
"pluggy==1.5.0",
"PyYAML==6.0.2",
"packaging",
"rich==13.9.4",
"requests==2.32.3",
"requirements-parser==0.11.0",
"setuptools==75.2.0",
'snowflake.core==0.12.1; python_version < "3.12"',
"snowflake-connector-python[secure-local-storage]==3.12.3",
'snowflake-snowpark-python>=1.15.0;python_version < "3.12"',
"tomlkit==0.13.2",
"typer==0.12.5",
"urllib3>=1.24.3,<2.3",
"GitPython==3.1.43",
"pip",
"pydantic==2.9.2",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: SQL",
"Topic :: Database",
]
[project.optional-dependencies]
development = [
"coverage==7.6.4",
"pre-commit>=3.5.0",
"pytest==8.3.3",
"pytest-randomly==3.16.0",
"syrupy==4.7.2",
"factory-boy==3.3.1",
"Faker==30.8.2",
]
packaging = ["pyinstaller~=6.10"]
[project.urls]
"Source code" = "https://github.com/snowflakedb/snowflake-cli"
"Bug Tracker" = "https://github.com/snowflakedb/snowflake-cli/issues"
[project.scripts]
snow = "snowflake.cli._app.__main__:main"
[tool.coverage.report]
exclude_also = ["@(abc\\.)?abstractmethod", "@(abc\\.)?abstractproperty"]
[tool.hatch.version]
path = "src/snowflake/cli/__about__.py"
[tool.hatch.build.targets.sdist]
exclude = ["/.github", "/.compat"]
[tool.hatch.build.targets.wheel]
packages = ["src/snowflake"]
[tool.hatch.envs.default]
python = "3.10"
features = ["development"]
[tool.hatch.envs.default.scripts]
test = ["pytest tests/"]
test-cov = [
"coverage run --source=snowflake.cli --module pytest tests/ ",
"coverage run --source=snowflake.cli --module pytest -m loaded_modules tests/ ",
"coverage report",
]
legacy-pypi-build = [".compat/build_snowflake-cli-labs.sh"]
[tool.hatch.envs.packaging]
python = "3.11"
features = ["development", "packaging"]
[tool.hatch.envs.packaging.scripts]
build-binaries = ["./scripts/packaging/build_binaries.sh"]
build-packages = ["./scripts/packaging/build_packages.sh"]
package-darwin-binaries = ["./scripts/packaging/build_darwin_package.sh"]
build-all = [
"./scripts/packaging/build_binaries.sh",
"./scripts/packaging/build_packages.sh",
]
win-build-version = ["python ./scripts/packaging/win/build_version.py"]
[tool.hatch.envs.e2e]
template = "e2e"
features = ["development"]
[tool.hatch.envs.e2e.scripts]
test = ["pytest -m e2e --durations=0"]
cleanup = ["python scripts/cleanup.py"]
[tool.hatch.envs.performance]
template = "performance"
features = ["development"]
[tool.hatch.envs.performance.scripts]
test = ["pytest -m performance"]
[tool.hatch.envs.integration]
template = "integration"
pre-install-commands = [
# Disabled due to repo migration
# "pip install test_external_plugins/snowpark_hello_single_command",
# "pip install test_external_plugins/multilingual_hello_command_group",
"pip install pytest-xdist",
]
features = ["development"]
[tool.hatch.envs.integration.scripts]
test = [
"pytest -m integration -n6 --dist=worksteal --deflake-test-type=integration --ignore=tests_integration/spcs tests_integration/",
]
test-spcs = [
"pytest -m integration -n6 --dist=worksteal --deflake-test-type=integration tests_integration/spcs",
]
test_qa = [
"pytest -m 'integration and not no_qa' -n6 --dist=worksteal --deflake-test-type=integration tests_integration/",
]
[[tool.hatch.envs.local.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.coverage.run]
source = ["snowflake.cli"]
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = [
"N",
"I", # isort
"G", # flake8-logging-format
"N", # pep8 naming
"A", # flake 8 builtins
"TID252", # relative imports
"SLF", # Accessing private methods
"F401", # unused imports
"F403", # star imports
"FA100", # Missing from __future__ import annotations
"W605", # Invalid escape sequences
]
[tool.pytest.ini_options]
addopts = "-vv --maxfail=10 -m 'not integration and not performance and not e2e and not spcs and not loaded_modules and not integration_experimental'"
markers = [
"integration: mark test as integration test",
"performance: mark test as performance test",
"e2e: mark test to execute on Snowflake CLI installed in fresh virtual environment",
"loaded_modules: checks loaded modules",
"patch_app_version: sets app version to 0.0.0-test_patched",
"integration_experimental: experimental integration test",
"no_qa: mark test as not to be run in QA",
]
[tool.codespell]
skip = 'tests/*,snow.spec'