-
Notifications
You must be signed in to change notification settings - Fork 105
/
pyproject.toml
171 lines (153 loc) · 4.15 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
[project]
name = "PyAthena"
description = "Python DB API 2.0 (PEP 249) client for Amazon Athena"
authors = [
{name = "laughingman7743", email = "[email protected]"},
]
dependencies = [
"boto3>=1.26.4",
"botocore>=1.29.4",
"tenacity>=4.1.0",
"fsspec",
"python-dateutil",
]
requires-python = ">=3.8.1" # https://bugs.python.org/issue38342
readme = "README.rst"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Database :: Front-Ends",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]
[project.urls]
homepage = "https://github.com/laughingman7743/PyAthena/"
repository = "https://github.com/laughingman7743/PyAthena/"
[project.entry-points."sqlalchemy.dialects"]
awsathena = "pyathena.sqlalchemy.base:AthenaDialect"
"awsathena.rest" = "pyathena.sqlalchemy.rest:AthenaRestDialect"
"awsathena.pandas" = "pyathena.sqlalchemy.pandas:AthenaPandasDialect"
"awsathena.arrow" = "pyathena.sqlalchemy.arrow:AthenaArrowDialect"
[project.optional-dependencies]
sqlalchemy = ["sqlalchemy>=1.0.0"]
pandas = ["pandas>=1.3.0"]
arrow = ["pyarrow>=7.0.0"]
fastparquet = ["fastparquet>=0.4.0"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.sdist]
ignore-vcs = true
only-include = [
"pyathena/",
"LICENSE",
"pyproject.toml",
"README.rst"
]
[tool.hatch.build.targets.wheel]
packages = ["pyathena"]
[tool.hatch.version]
path = "pyathena/__init__.py"
[tool.hatch.env]
requires = [
"hatch-pip-compile"
]
[tool.hatch.envs.default]
python = "3.11"
type = "pip-compile"
lock-filename = "requirements/requirements.txt"
pip-compile-verbose = true
pip-compile-hashes = true
pip-compile-install-args = [
"--no-deps"
]
dependencies = [
"wheel",
"twine",
"sqlalchemy>=1.0.0",
"pandas>=1.3.0",
"numpy>=1.26.0;python_version>=\"3.9\"",
"numpy>=1.24.0,<1.26.0;python_version<\"3.9\"",
"pyarrow>=7.0.0",
"fastparquet>=0.4.0",
"Jinja2>=3.1.0",
"mypy>=0.900",
"pytest>=3.5",
"pytest-cov",
"pytest-xdist",
"pytest-dependency",
"ruff>=0.1.13",
"hatch-pip-compile",
"sphinx",
"types-python-dateutil",
]
[tool.hatch.envs.default.scripts]
test = "pytest -n 8 --cov pyathena --cov-report html --cov-report term tests/pyathena/"
test-sqla = "pytest -n 8 --cov pyathena --cov-report html --cov-report term tests/sqlalchemy/"
fmt = [
"ruff check --select I --fix .",
"ruff format ."
]
chk = [
"ruff check .",
"ruff format --check .",
"mypy ."
]
[tool.hatch.envs.test]
template = "default"
lock-filename = "requirements/requirements-{env_name}.txt"
pip-compile-verbose = true
pip-compile-hashes = true
pip-compile-install-args = [
"--no-deps"
]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.pytest.ini_options]
norecursedirs = ["benchmarks", ".venv"]
[tool.sqla_testing]
requirement_cls = "pyathena.sqlalchemy.requirements:Requirements"
profile_file = "tests/sqlalchemy/profiles.txt"
[tool.ruff]
line-length = 100
exclude = [
".venv",
]
target-version = "py38"
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
# "SIM", # flake8-simplify
# "B", # flake8-bugbear
# "C4", # flake8-comprehensions
# "UP", # pyupgrade
]
[tool.mypy]
python_version = 3.8
follow_imports = "silent"
disallow_any_generics = true
strict_optional = true
check_untyped_defs = true
allow_redefinition = true
ignore_missing_imports = true
warn_redundant_casts = true
warn_no_return = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
exclude = ["benchmarks.*", "tests.*", ".tox.*", ".venv.*"]