-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (133 loc) · 4.48 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (133 loc) · 4.48 KB
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
[build-system]
requires = ["hatchling>=1.18", "hatch-vcs>=0.4"]
build-backend = "hatchling.build"
[project]
name = "snowflake-sql-api"
dynamic = ["version"]
description = "Lightweight, pure-Python client for Snowflake's SQL API v2"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [{ name = "hampsterx" }]
keywords = ["snowflake", "sql", "rest", "api", "httpx", "serverless", "lambda"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Database",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.24",
"PyJWT>=2.4",
"cryptography>=3.4",
]
[project.optional-dependencies]
pandas = ["pandas>=1.3"]
pydantic = ["pydantic>=2.0"]
dev = [
"pytest>=7.0",
"coverage[toml]>=7.0",
"pytest-asyncio>=0.21",
"respx>=0.20",
"ruff>=0.4",
# Capped below 25.10: 25.12.0+ drop Python 3.9, which the package still
# supports. Keeps CI and the pinned pre-commit hook on the same black.
"black>=24.0,<26.6",
"mypy>=1.8",
"build>=1.0",
"pre-commit>=3.5",
]
[project.urls]
Homepage = "https://github.com/hampsterx/snowflake-sql-api"
Repository = "https://github.com/hampsterx/snowflake-sql-api"
Issues = "https://github.com/hampsterx/snowflake-sql-api/issues"
[project.scripts]
snowflake-sql-api = "snowflake_sql_api.cli:main"
# Auto-registers the snowflake_sql_api.testing pytest fixtures (fake_snowflake,
# snowflake_client, async_snowflake_client) for any project with the package
# installed. The fixtures are no-ops if pytest is absent.
[project.entry-points.pytest11]
snowflake_sql_api = "snowflake_sql_api.testing"
# Version is derived from the git tag (hatch-vcs); never hand-edit it. The build
# writes the resolved version into snowflake_sql_api/_version.py (gitignored).
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "snowflake_sql_api/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["snowflake_sql_api"]
[tool.hatch.build.targets.sdist]
include = [
"/snowflake_sql_api",
"/tests",
"/README.md",
"/LICENSE",
"/CONTRIBUTING.md",
"/pyproject.toml",
]
[tool.ruff]
line-length = 88
target-version = "py39"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "C4", "SIM"]
# E501 (line length) is owned by black. `UP` (pyupgrade) is omitted: it would
# rewrite runtime type aliases like `Optional[Sequence[Any]]` to `X | None`,
# which raises at import time on Python 3.9 (PEP 604 on typing generics is 3.10+).
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.black]
line-length = 88
# Pin to py39 grammar: our code uses no newer syntax, and a single floor target
# keeps black's AST safety check parseable by the interpreter running CI.
target-version = ["py39"]
[tool.mypy]
# Lowest target this mypy accepts; true 3.9 runtime compat is gated by the
# pytest matrix (3.9-3.13), which imports every module under each interpreter.
python_version = "3.10"
files = ["snowflake_sql_api"]
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_equality = true
[[tool.mypy.overrides]]
module = ["pandas", "pandas.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers"
asyncio_mode = "auto"
markers = [
"regression: regression test for a specific fixed bug",
"smoke: live test against a real Snowflake account (opt-in, dev-only)",
]
[tool.coverage.run]
source = ["snowflake_sql_api"]
branch = true
# row_mapping.py is a Phase 8 stub, out of the Phase 2 core-coverage scope.
# cli.py is covered by tests/test_cli.py.
omit = ["snowflake_sql_api/row_mapping.py"]
[tool.coverage.report]
show_missing = true
# Enforced locally too, not just in CI: `coverage report` exits non-zero below
# this. (Run coverage via `coverage run -m pytest`, not `pytest --cov`; see AGENTS.md.)
fail_under = 89
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"\\.\\.\\.",
]