-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
pyproject.toml
153 lines (128 loc) · 4.32 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
[tool.poetry]
name = "harlequin"
version = "1.25.2"
description = "The SQL IDE for Your Terminal."
authors = ["Ted Conbeer <tconbeer@users.noreply.github.com>"]
license = "MIT"
homepage = "https://harlequin.sh"
repository = "https://github.com/tconbeer/harlequin"
readme = "README.md"
packages = [
{ include = "harlequin", from = "src" },
{ include = "harlequin_duckdb", from = "src" },
{ include = "harlequin_sqlite", from = "src" },
{ include = "harlequin_vscode", from = "src" },
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0.0"
# textual and component libraries
textual = "==0.85.1"
textual-fastdatatable = "==0.10.0"
textual-textarea = "==0.14.4"
# click
click = "^8.1.3"
rich-click = "^1.7.1"
# other deps
duckdb = ">=0.8.0"
shandy-sqlfmt = ">=0.19.0"
platformdirs = ">=3.10,<5.0"
importlib_metadata = { version = ">=8.0", python = "<3.10.0" }
tomlkit = ">=0.12.5,<0.14.0"
questionary = "^2.0.1"
# optional deps
boto3 = { version = "^1.34.22", optional = true }
# temporary pins
# pin numpy to fix PEP-517 build-backend compatibility issues stemming
# from the removal of distutils in python 3.12+
# https://stackoverflow.com/questions/77582651/why-doesnt-numpy-support-pep517-builds
numpy = [
{ version = "<1.25.0,>=1.21.0", python = ">=3.8.0,<3.9.0"},
{ version = "<2.0.0,>=1.21.0", python = ">=3.9.0,<3.12.0"},
{ version = "<2.0.0,>=1.26.0", python = ">=3.12.0,<3.13.0"},
]
# database adapters (optional installs for extras)
harlequin-postgres = { version = ">=0.3", optional = true }
harlequin-mysql = { version = ">=0.1", optional = true }
harlequin-odbc = { version = ">=0.1", optional = true }
harlequin-bigquery = { version = "^1.0", optional = true }
harlequin-trino = { version = ">=0.1", optional = true }
harlequin-databricks = { version = ">=0.3", python = ">=3.9.0", optional = true }
harlequin-adbc = { version = ">=0.1", python = ">=3.9.0", optional = true }
harlequin-cassandra = { version = ">=0.1", python = ">=3.9.0", optional = true }
harlequin-nebulagraph = { version = ">=0.1", python = ">=3.9.0", optional = true }
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.3.1"
textual-dev = "^1.0.1"
harlequin-postgres = ">=0.3,<0.5"
harlequin-mysql = ">=0.2,<0.4"
pyinstrument = "^4.6.2"
[tool.poetry.group.static.dependencies]
ruff = "^0.6"
mypy = "^1.11.0"
types-pygments = "^2.16.0.0"
pandas-stubs = "^2"
boto3-stubs = "^1.34.23"
[tool.poetry.group.test.dependencies]
pytest = ">=7.3.1,<9.0.0"
pytest-asyncio = "^0.21.0"
pytest-textual-snapshot = { git = "https://github.com/tconbeer/pytest-textual-snapshot.git", branch = "main" }
# extension tests require consistent version of duckdb.
duckdb = "1.0.0"
[tool.poetry.scripts]
harlequin = "harlequin.cli:harlequin"
[tool.poetry.extras]
s3 = ["boto3"]
postgres = ["harlequin-postgres"]
mysql = ["harlequin-mysql"]
odbc = ["harlequin-odbc"]
bigquery = ["harlequin-bigquery"]
trino = ["harlequin-trino"]
databricks = ["harlequin-databricks"]
adbc = ["harlequin-adbc"]
cassandra = ["harlequin-cassandra"]
nebulagraph = ["harlequin-nebulagraph"]
[tool.poetry.plugins."harlequin.adapter"]
duckdb = "harlequin_duckdb:DuckDbAdapter"
sqlite = "harlequin_sqlite:HarlequinSqliteAdapter"
[tool.poetry.plugins."harlequin.keymap"]
vscode = "harlequin_vscode:VSCODE"
[tool.poetry.plugins."pygments.styles"]
harlequin = "harlequin.colors:HarlequinPygmentsStyle"
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = ["A", "B", "E", "F", "I"]
[tool.mypy]
python_version = "3.8"
files = [
"src/**/*.py",
"tests/**/*.py",
]
mypy_path = "stubs,src"
show_column_numbers = true
# show error messages from unrelated files
follow_imports = "normal"
# be strict
disallow_untyped_calls = true
disallow_untyped_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
strict_optional = true
warn_return_any = true
warn_no_return = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
no_implicit_reexport = true
strict_equality = true
[tool.pytest.ini_options]
markers = [
"online: requeries internet connection (deselect with '-m \"not online\"')",
"use_cache: override the autouse fixture the disables the buffer cache",
"flaky_windows: likely to fail for no reason on windows."
]