forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
451 lines (429 loc) · 13.8 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
[tool.poetry]
name = "ibis-framework"
version = "4.1.0"
packages = [{ include = "ibis" }]
include = ["ibis/examples/descriptions.json", "ibis/examples/registry.txt"]
exclude = ["ibis/examples/gen_examples.R", "ibis/examples/gen_registry.py"]
homepage = "https://ibis-project.org"
repository = "https://github.com/ibis-project/ibis"
documentation = "https://ibis-project.org"
description = "Productivity-centric Python Big Data Framework"
authors = ["Ibis Contributors"]
maintainers = ["Ibis Contributors"]
license = "Apache-2.0"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
[tool.poetry.urls]
"Issue Tracker" = "https://github.com/ibis-project/ibis/issues"
[tool.poetry.dependencies]
python = "^3.8"
atpublic = ">=2.3,<4"
multipledispatch = ">=0.6,<1"
numpy = ">=1,<2"
pandas = ">=1.2.5,<2"
parsy = ">=2,<3"
pooch = ">=1.6.0,<2"
python-dateutil = ">=2.8.2,<3"
pytz = ">=2022.7"
rich = ">=12.4.4,<14"
sqlglot = ">=10.4.3,<12"
toolz = ">=0.11,<1"
typing-extensions = ">=4.3.0,<5"
black = { version = ">=22.1.0,<24", optional = true }
clickhouse-cityhash = { version = ">=1.0.2,<2", optional = true }
clickhouse-driver = { version = ">=0.1,<1", optional = true, extras = [
"numpy"
] }
dask = { version = ">=2022.9.1", optional = true, extras = [
"array",
"dataframe"
] }
datafusion = { version = ">=0.6,<0.8", optional = true }
db-dtypes = { version = ">=0.3,<2", optional = true }
duckdb = { version = ">=0.3.3,<1", optional = true }
duckdb-engine = { version = ">=0.1.8,<1", optional = true }
fsspec = { version = ">=2022.1.0", optional = true }
GeoAlchemy2 = { version = ">=0.6.3,<1,!=0.13.0", optional = true }
geopandas = { version = ">=0.6,<1", optional = true }
google-cloud-bigquery = { version = ">=3,<4", optional = true }
google-cloud-bigquery-storage = { version = ">=2,<3", optional = true }
graphviz = { version = ">=0.16,<1", optional = true }
impyla = { version = ">=0.17,<1", optional = true }
lz4 = { version = ">=3.1.10,<5", optional = true }
packaging = { version = ">=21.3,<24", optional = true }
polars = { version = ">=0.14.18,<1", optional = true }
psycopg2 = { version = ">=2.8.4,<3", optional = true }
pyarrow = { version = ">=2,<12", optional = true }
pymssql = { version = ">=2.2.5,<3", optional = true }
pydata-google-auth = { version = ">=1.4.0,<2", optional = true }
pymysql = { version = ">=1,<2", optional = true }
pyspark = { version = ">=3,<4", optional = true }
# used to support posix regexen in the pandas, dask and sqlite backends
regex = { version = ">=2021.7.6", optional = true }
requests = { version = ">=2,<3", optional = true }
shapely = { version = ">=1.6,<1.8|>=1.9,<3", optional = true }
# include an explicit dependency on `snowflake-connector-python` because the
# lack of lower bound on this dependency as specified in `snowflake-sqlalchemy`
# appears to cause poetry's solver to get stuck
#
# also, we don't support arbitrarily old versions of this library
snowflake-connector-python = { version = ">=2.7.10,<4", optional = true }
snowflake-sqlalchemy = { version = ">=1.4.1,<2", optional = true }
sqlalchemy = { version = ">=1.4,<3", optional = true }
sqlalchemy-views = { version = ">=0.3.1,<1", optional = true }
trino = { version = ">=0.319,<1", optional = true, extras = ["sqlalchemy"] }
[tool.poetry.group.dev.dependencies]
black = ">=22.1.0,<24"
google-cloud-storage = ">=2.7.0,<3"
ipython = ">=7.27.0,<9"
poetry-dynamic-versioning = ">=0.18.0,<1"
ruff = ">=0.0.205,<1"
[tool.poetry.group.test.dependencies]
black = ">=22.1.0,<24"
filelock = ">=3.7.0,<4"
packaging = ">=21.3,<24"
pytest = ">=7.0.0,<8"
pytest-benchmark = ">=3.4.1,<5"
pytest-clarity = ">=1.0.1,<2"
pytest-cov = ">=3.0.0,<5"
pytest-mock = ">=3.6.1,<4"
pytest-profiling = ">=1.7.0,<2"
pytest-randomly = ">=3.10.1,<4"
pytest-repeat = ">=0.9.1,<0.10"
pytest-snapshot = ">=0.9.0,<1"
pytest-xdist = ">=2.3.0,<4"
hypothesis = ">=6.58.0,<7"
sqlalchemy = ">=1.4,<3"
[tool.poetry.group.docs.dependencies]
griffe = ">=0.25.3,<1"
ipykernel = ">=6,<7"
mkdocs = ">=1.2.3,<1.4.3"
mkdocs-exclude = ">=1.0.2,<2"
mkdocs-gen-files = ">=0.3.4,<0.5.0"
mkdocs-git-revision-date-localized-plugin = ">=1.1.0,<2"
mkdocs-jupyter = ">=0.20.0,<1"
mkdocs-literate-nav = ">=0.4.1,<1"
mkdocs-macros-plugin = ">=0.6.3,<1"
mkdocs-material = ">=8.2.1,<9.0.2"
mkdocstrings = ">=0.19.1,<1"
mkdocstrings-python = ">=0.8.3,<1"
requests = ">=2,<3"
streamlit = { version = ">=1.17.0,<2", python = "!=3.9.7" }
[tool.poetry.extras]
# generate the `all` extra using nix run '.#gen-all-extras'
all = [
"black",
"clickhouse-cityhash",
"clickhouse-driver",
"dask",
"datafusion",
"db-dtypes",
"duckdb",
"duckdb-engine",
"fsspec",
"geoalchemy2",
"geopandas",
"google-cloud-bigquery",
"google-cloud-bigquery-storage",
"graphviz",
"impyla",
"lz4",
"packaging",
"polars",
"psycopg2",
"pyarrow",
"pydata-google-auth",
"pymssql",
"pymysql",
"pyspark",
"regex",
"requests",
"shapely",
"snowflake-connector-python",
"snowflake-sqlalchemy",
"sqlalchemy",
"sqlalchemy-views",
"trino"
]
bigquery = [
"db-dtypes",
"google-cloud-bigquery",
"google-cloud-bigquery-storage",
"pydata-google-auth",
]
clickhouse = ["clickhouse-driver", "clickhouse-cityhash", "lz4"]
dask = ["dask", "pyarrow", "regex"]
datafusion = ["datafusion"]
duckdb = [
"duckdb",
"duckdb-engine",
"packaging",
"pyarrow",
"sqlalchemy",
"sqlalchemy-views"
]
geospatial = ["geoalchemy2", "geopandas", "shapely"]
impala = ["fsspec", "impyla", "requests", "sqlalchemy"]
mssql = ["sqlalchemy", "pymssql"]
mysql = ["sqlalchemy", "pymysql"]
pandas = ["regex"]
polars = ["polars", "pyarrow"]
postgres = ["psycopg2", "sqlalchemy"]
pyspark = ["pyarrow", "pyspark"]
snowflake = ["snowflake-connector-python", "snowflake-sqlalchemy"]
sqlite = ["regex", "sqlalchemy"]
trino = ["trino", "sqlalchemy"]
# non-backend extras
visualization = ["graphviz"]
decompiler = ["black"]
[tool.poetry.plugins."ibis.backends"]
bigquery = "ibis.backends.bigquery"
clickhouse = "ibis.backends.clickhouse"
dask = "ibis.backends.dask"
datafusion = "ibis.backends.datafusion"
duckdb = "ibis.backends.duckdb"
impala = "ibis.backends.impala"
mysql = "ibis.backends.mysql"
mssql = "ibis.backends.mssql"
pandas = "ibis.backends.pandas"
polars = "ibis.backends.polars"
postgres = "ibis.backends.postgres"
pyspark = "ibis.backends.pyspark"
snowflake = "ibis.backends.snowflake"
spark = "ibis.backends.pyspark"
sqlite = "ibis.backends.sqlite"
trino = "ibis.backends.trino"
[tool.pytest.ini_options]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS"
]
xfail_strict = true
addopts = [
"--ignore=site-packages",
"--ignore=dist-packages",
"--strict-markers",
"--strict-config",
"--benchmark-disable",
"--benchmark-group-by=name",
"--benchmark-sort=name",
]
filterwarnings = [
# fail on any warnings that are not explicitly matched below
"error",
# pyspark and impala leave sockets open
"ignore:Exception ignored in:",
# dask
"ignore:index is deprecated and will be removed in a future release:FutureWarning",
"ignore:`meta` is not specified:UserWarning",
"ignore:Concatenating dataframes with unknown divisions:UserWarning",
"ignore:Possible nested set at position:FutureWarning",
'ignore:\s+You did not provide metadata:UserWarning',
# pandas
"ignore:Boolean Series key will be reindexed:UserWarning",
'ignore:Using \.astype to convert from timezone-(naive|aware) dtype:FutureWarning',
"ignore:The default dtype for empty Series will be 'object':FutureWarning",
# pandas 1.5.x
"ignore:iteritems is deprecated and will be removed in a future version:FutureWarning",
'ignore:Passing unit-less datetime64 dtype to \.astype is deprecated:FutureWarning',
'ignore:The default value of numeric_only in DataFrameGroupBy\.sum is deprecated:FutureWarning',
# numpy
"ignore:Creating an ndarray from ragged nested sequences:",
'ignore:`np\.bool` is a deprecated alias for the builtin `bool`:DeprecationWarning',
# numpy, coming from a pandas call
'ignore:In the future `np\.bool` will be defined as the corresponding NumPy scalar:FutureWarning',
# duckdb-engine
'ignore:Dialect .+ does \*not\* support Decimal:',
"ignore:duckdb-engine doesn't yet support reflection on indices:",
# ibis
'ignore:`(Base)?Backend.database` is deprecated:FutureWarning',
# ibis on postgres + windows
"ignore:locale specific date formats:UserWarning",
# spark
"ignore:distutils Version classes are deprecated:DeprecationWarning",
"ignore:The distutils package is deprecated and slated for removal:DeprecationWarning",
"ignore:In Python .*, it is preferred .* type hints .* UDF:UserWarning",
"ignore:`np.object` is a deprecated alias for the builtin `object`:DeprecationWarning",
# windows
"ignore:getargs.* The 'u' format is deprecated:DeprecationWarning",
# sqlalchemy
"ignore:Class ST_.+ will not make use of SQL compilation caching:",
"ignore:UserDefinedType Geometry:",
# google
"ignore:Deprecated call to `pkg_resources\\.declare_namespace\\('google.*'\\):DeprecationWarning",
]
empty_parameter_set_mark = "fail_at_collect"
norecursedirs = [
".benchmarks",
".direnv",
".git",
".github",
"LICENSES",
"ci",
"conda-lock",
"dev",
"docker",
"nix",
"result",
"result-*",
]
markers = [
"backend: tests specific to a backend",
"benchmark: benchmarks",
"core: tests that do not required a backend",
"examples: tests that exercise examples",
"geospatial: tests for geospatial functionality",
"hdfs: Hadoop file system tests",
"min_version: backend tests that require a specific version of a dependency to pass",
"min_server_version: backend tests that require a specific version of a backend's server to pass",
"xfail_version: backend tests that for a specific version of a dependency",
"notimpl: functionality that isn't implemented in ibis",
"notyet: for functionality that isn't implemented in a backend",
"never: tests for functionality that a backend is likely to never implement",
"broken: test has exposed existing broken functionality",
"sqlalchemy_only: tests for SQLAlchemy based backends",
"bigquery: BigQuery tests",
"clickhouse: ClickHouse tests",
"dask: Dask tests",
"datafusion: Apache Datafusion tests",
"duckdb: DuckDB tests",
"impala: Apache Impala tests",
"mysql: MySQL tests",
"mssql: MS SQL Server tests",
"pandas: Pandas tests",
"polars: Polars tests",
"postgres: PostgreSQL tests",
"pyspark: PySpark tests",
"snowflake: Snowflake tests",
"sqlite: SQLite tests",
"trino: Trino tests",
]
[tool.ruff]
line-length = 88
select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint import style
"PLW", # pylint
"RET", # flake8-return
"RUF", # ruff-specific rules
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
respect-gitignore = true
ignore = [
"B904", # raise from e or raise from None in exception handlers
"C408", # dict(...) as literal
"D100", # public module
"D101", # public class
"D102", # public method
"D103", # public function
"D104", # public package
"D105", # magic methods
"D106", # nested class
"D107", # init
"D202", # blank lines after function docstring
"D203", # blank line before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # Imperative mood
"D402", # First line should not be the function's signature
"E501",
"E731",
"PGH003",
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
"PLR2004", # forces everything to be a constant
"RET504",
"RET505",
"RET506",
"RET507",
"RET508",
"RUF005", # splat instead of concat
"SIM102", # nested ifs
"SIM108", # convert everything to ternary operator
"SIM114", # combine `if` branches using logical `or` operator
"SIM117", # nested withs
"SIM118", # remove .keys() calls from dictionaries
"SIM300", # yoda conditions
"UP037", # remove quotes from type annotation
]
exclude = ["*_py310.py", "ibis/tests/*/snapshots/*"]
target-version = "py38"
# none of these codes will be automatically fixed by ruff
unfixable = [
"T201", # print statements
"F401", # unused imports
"RUF100", # unused noqa comments
"F841", # unused variables
]
[tool.ruff.per-file-ignores]
"*test*.py" = [
"D", # ignore all docstring lints in tests
]
"ci/release/verify_release.py" = ["T201"] # CLI tool that prints stuff
[tool.black]
line_length = 88
skip_string_normalization = true
extend_exclude = '\.ipynb|\.direnv|result(-\d+)|_py310\.py|decompiled\.py'
[tool.conda-lock]
channels = ["conda-forge"]
[tool.conda-lock.dependencies]
# conda-lock doesn't map dependencies' extras to conda-forge packages and we
# use the array and dataframe extras from dask
dask = ">=2021.10.0"
pip = "*"
[tool.coverage.run]
branch = true
source = ["ibis"]
[tool.coverage.report]
exclude_lines = [
"if self.debug:",
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
ignore_errors = true
omit = [
"*_version.py",
"*tests*",
"ibis/interactive.py",
"ibis/examples/gen_registry.py"
]
[tool.distutils.bdist_wheel]
# universal = true is for projects that support py2 and py3, and do not have C
# extensions
universal = false
[tool.poetry-dynamic-versioning]
enable = true
dirty = true
style = "semver"
pattern = '^(?P<base>\d+(\.\d+)*)'
[build-system]
requires = ["poetry-core>=1.1.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"