-
Notifications
You must be signed in to change notification settings - Fork 599
/
pyproject.toml
575 lines (560 loc) · 17.3 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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
[project]
name = "ibis-framework"
version = "9.5.0"
requires-python = ">=3.10"
description = "The portable Python dataframe library"
readme = "README.md"
license = "Apache-2.0"
authors = [
{ name = "Ibis Maintainers", email = "[email protected]" },
]
maintainers = [
{ name = "Ibis Maintainers", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Programming Language :: SQL",
"Topic :: Database :: Front-Ends",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: User Interfaces",
]
dependencies = [
"atpublic>=2.3,<6",
"parsy>=2,<3",
"python-dateutil>=2.8.2,<3",
"pytz>=2022.7",
"sqlglot>=23.4,<25.32",
"toolz>=0.11,<2",
"typing-extensions>=4.3.0,<5",
]
[project.urls]
Homepage = "https://ibis-project.org"
Repository = "https://github.com/ibis-project/ibis"
Documentation = "https://ibis-project.org"
Issues = "https://github.com/ibis-project/ibis/issues"
Chat = "https://ibis-project.zulipchat.com"
[project.optional-dependencies]
bigquery = [
"db-dtypes>=0.3,<2",
"google-cloud-bigquery>=3,<4",
"google-cloud-bigquery-storage>=2,<3",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"pydata-google-auth>=1.4.0,<2",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
clickhouse = [
"clickhouse-connect[arrow,pandas,numpy]>=0.5.23,<1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
databricks = [
"databricks-sql-connector-core>=4,<5",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
datafusion = [
"datafusion>=0.6,<43",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
druid = [
"pydruid>=0.6.7,<1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
duckdb = [
"duckdb>=0.10,<1.2",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
"packaging>=21.3,<25",
]
exasol = [
"pyexasol>=0.25.2,<1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
flink = [
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
impala = [
"impyla>=0.17,<1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
mssql = [
"pyodbc>=4.0.39,<6",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
mysql = [
"mysqlclient>=2.2.4,<3",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
oracle = [
"oracledb>=1.3.1,<3",
"packaging>=21.3,<25",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
polars = [
"polars>=1,<2",
"packaging>=21.3,<25",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
postgres = [
"psycopg2>=2.8.4,<3",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
pyspark = [
"pyspark>=3.3.3,<4",
"packaging>=21.3,<25",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
snowflake = [
"snowflake-connector-python>=3.0.2,<4,!=3.3.0b1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
sqlite = [
"regex>=2021.7.6",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
risingwave = [
"psycopg2>=2.8.4,<3",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
trino = [
"trino>=0.321,<1",
"pyarrow>=10.0.1,<19",
"pyarrow-hotfix>=0.4,<1",
"numpy>=1.23.2,<3",
"pandas>=1.5.3,<3",
"rich>=12.4.4,<14",
]
# non-backend extras
visualization = ["graphviz>=0.16,<1"]
decompiler = ["black>=22.1.0,<25"]
deltalake = ["deltalake>=0.9.0,<1"]
examples = ["pins[gcs]>=0.8.3,<1"]
geospatial = [
"geoarrow-types>=0.2,<1",
"geopandas>=0.6,<2",
"pyproj>=3.3.0,<4",
"shapely>=2,<3",
]
[dependency-groups]
dev = [
"ruff>=0.7.1",
"codespell[hard-encoding-detection,toml]>=2.2.6,<3",
"google-cloud-storage>=2.7.0,<3",
"ipython>=8.7.0,<9",
"pre-commit>=4,<5",
"pyinstrument>=4.5.1,<6",
"ruff>=0.1.8",
"tqdm>=4.66.1,<5",
"dunamai>=1.22.0",
]
tests = [
"cloudpickle",
"filelock>=3.7.0,<4",
"fsspec<2024.10.1",
"hypothesis>=6.58.0,<7",
"packaging>=21.3,<25",
"pytest>=8.2.0,<9",
"pytest-benchmark>=3.4.1,<6",
"pytest-deadfixtures>=2.2.1,<3",
"pytest-clarity>=1.0.1,<2",
"pytest-cov>=5,<7",
"pytest-httpserver>=1.0.5,<2",
"pytest-mock>=3.6.1,<4",
"pytest-randomly>=3.10.1,<4",
"pytest-repeat>=0.9.1,<0.10",
"pytest-snapshot>=0.9.0,<1",
"pytest-timeout>=2.3.1,<3",
"pytest-xdist>=2.3.0,<4",
"requests>=2,<3",
"tomli>=2.0.1,<3",
]
docs = [
"altair>=5.0.1,<6",
# pin griffe until https://github.com/ibis-project/ibis/pull/9865 is
# addressed
"griffe<1",
"ipykernel>=6.25.1,<7",
"itables>=1.6.3,<2.3",
"nbclient>=0.8.0,<1",
"plotly>=5.16.1,<6",
"plotnine>=0.12.2,<1",
"py-cpuinfo>=9,<10",
"quartodoc>=0.6.1,<1",
"requests>=2,<3",
"rich>13.8.0,<14",
"scikit-learn>=1.3,<2",
"seaborn>=0.12.2,<1",
"lonboard==0.10.3",
"jupyter-cache>=1.0.0,<2",
"jupyterlab>=4.2.5,<5",
"jupyterlab-night>=0.4.6,<1",
"jupyterlite-core>=0.3,<0.4",
"jupyterlite-pyodide-kernel>=0.3,<0.4",
]
[project.entry-points."ibis.backends"]
bigquery = "ibis.backends.bigquery"
clickhouse = "ibis.backends.clickhouse"
databricks = "ibis.backends.databricks"
datafusion = "ibis.backends.datafusion"
druid = "ibis.backends.druid"
duckdb = "ibis.backends.duckdb"
exasol = "ibis.backends.exasol"
flink = "ibis.backends.flink"
impala = "ibis.backends.impala"
mysql = "ibis.backends.mysql"
mssql = "ibis.backends.mssql"
oracle = "ibis.backends.oracle"
polars = "ibis.backends.polars"
postgres = "ibis.backends.postgres"
risingwave = "ibis.backends.risingwave"
pyspark = "ibis.backends.pyspark"
snowflake = "ibis.backends.snowflake"
sqlite = "ibis.backends.sqlite"
trino = "ibis.backends.trino"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["ibis"]
[tool.hatch.build.targets.sdist]
packages = ["ibis"]
include = ["ibis/examples/metadata.json", "ibis/examples/CITATIONS.md"]
exclude = [
"ibis/examples/gen_examples.R",
"ibis/examples/gen_registry.py",
"ibis/examples/data",
"ibis/examples/descriptions",
]
[tool.pytest.ini_options]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
xfail_strict = true
addopts = [
"--strict-markers",
"--strict-config",
"--benchmark-disable",
"--benchmark-group-by=name",
"--benchmark-sort=name",
]
norecursedirs = [
"**/snapshots",
".benchmarks",
".direnv",
".git",
".github",
".hypothesis",
".pytest_cache",
".streamlit",
"LICENSES",
"ci",
"conda-lock",
"dev",
"docker",
"docs",
"nix",
"result*",
]
filterwarnings = [
# fail on any warnings that are not explicitly matched below
"error",
# pyspark uses a deprecated pandas API
"ignore:is_datetime64tz_dtype is deprecated and will be removed in a future version:DeprecationWarning",
"ignore:is_categorical_dtype is deprecated .+:DeprecationWarning",
# pyspark and impala leave sockets open
"ignore:Exception ignored in:",
# 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',
# 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',
# pandas by way of polars when comparing arrays
'ignore:The truth value of an empty array is ambiguous\.:DeprecationWarning',
# ibis
'ignore:`StructValue\.destructure` is deprecated as of v10\.0; use lift or unpack instead:FutureWarning',
# 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",
# google
"ignore:Deprecated call to `pkg_resources\\.declare_namespace\\('.*'\\):DeprecationWarning",
# pyspark on python 3.11
"ignore:typing\\.io is deprecated:DeprecationWarning",
# warnings from google's use of the cgi module
"ignore:'cgi' is deprecated and slated for removal in Python 3\\.13:DeprecationWarning",
# warnings from google's use of pkg_resources
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
# snowflake vendors an older version requests
"ignore:'urllib3\\.contrib\\.pyopenssl' module is deprecated and will be removed in a future release of urllib3:DeprecationWarning",
# apache-beam
"ignore:the imp module is deprecated in favour of importlib:DeprecationWarning",
# pytest raises a syntax error when encountering this from *any* module, including third party modules
"ignore:invalid escape sequence:DeprecationWarning",
# geopandas raises user warning on geometry column
"ignore:Geometry is in a geographic CRS",
# `is_sparse` deprecation was addressed in pyarrow 13.0.0 (see https://github.com/apache/arrow/pull/35366),
# but flink requires apache-beam<2.49, which caps its pyarrow dependency (see https://github.com/apache/beam/blob/v2.48.0/sdks/python/setup.py#L144)
"ignore:is_sparse is deprecated and will be removed in a future version:FutureWarning",
"ignore:is_sparse is deprecated and will be removed in a future version:DeprecationWarning",
# google-api-core
"ignore:Please install grpcio-status to obtain helpful grpc error messages.",
# dateutil tz
'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated and scheduled for removal:DeprecationWarning',
# types using custom tp_new are deprecated in python 3.12
"ignore:Type .+ uses PyType_Spec with a metaclass that has custom tp_new:DeprecationWarning",
# pandas 2.2 warnings
'ignore:DataFrameGroupBy\.apply operated on the grouping columns\. This behavior is deprecated:DeprecationWarning',
'ignore:Downcasting object dtype arrays on \.fillna, \.ffill, \.bfill is deprecated:FutureWarning',
# pandas 2.2 warnings coming directly from the way flink uses pandas
"ignore:Passing a BlockManager to DataFrame is deprecated:DeprecationWarning",
# snowpark logging warnings
"ignore:The 'warn' method is deprecated, use 'warning' instead:DeprecationWarning",
]
empty_parameter_set_mark = "fail_at_collect"
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",
"xfail_version: backend tests that for a specific version of a dependency",
"notimpl: We could implement/fix this in ibis, but haven't yet",
"notyet: This requires upstream to implement/fix something. We can't/won't workaround on the ibis side",
"never: The backend will never support this / pass this test. Don't bother trying to fix it",
"bigquery: BigQuery tests",
"clickhouse: ClickHouse tests",
"databricks: Databricks SQL tests",
"datafusion: Apache Datafusion tests",
"druid: Apache Druid tests",
"duckdb: DuckDB tests",
"exasol: ExasolDB tests",
"flink: Flink tests",
"impala: Apache Impala tests",
"mysql: MySQL tests",
"mssql: MS SQL Server tests",
"oracle: Oracle tests",
"polars: Polars tests",
"postgres: PostgreSQL tests",
"risingwave: RisingWave tests",
"pyspark: PySpark tests",
"snowflake: Snowflake tests",
"sqlite: SQLite tests",
"trino: Trino tests",
"tpch: TPC-H tests",
"tpcds: TPC-DS tests",
]
[tool.ruff]
line-length = 88
respect-gitignore = true
exclude = [".direnv", "result-*", "*_py310.py", "decompiled.py", "out_tpch.py"]
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # comprehensions
"D", # pydocstyle
"E", # pycodestyle
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"G", # flake8-logging-format
"FLY", # flynt (format string conversion)
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420 (implicit namespace packages)
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"RET", # flake8-return
"RUF", # ruff-specific rules
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
"S", # flake8-bandit
]
ignore = [
"B028", # required stacklevel argument to warn
"B904", # raise from e or raise from None in exception handlers
"B905", # zip-without-explicit-strict
"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
"D413", # Blank line required after last section
"E501", # line-too-long, this is automatically enforced by ruff format
"E731", # lambda-assignment
"ISC001", # single line implicit string concat, handled by ruff format
"PGH003", # blanket-type-ignore
"PLC0105", # covariant type parameters should have a _co suffix
"PLR0124", # name compared with self, e.g., a == a
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
"PLR2004", # forces everything to be a constant
"PLW2901", # overwriting loop variable
"RET504", # unnecessary-assign, these are useful for debugging
"RET505", # superfluous-else-return, stylistic choice
"RET506", # superfluous-else-raise, stylistic choice
"RET507", # superfluous-else-continue, stylistic choice
"RET508", # superfluous-else-break, stylistic choice
"RUF005", # splat instead of concat
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # nested ifs
"SIM108", # convert everything to ternary operator
"SIM114", # combine `if` branches using logical `or` operator
"SIM116", # dictionary instead of `if` statements
"SIM117", # nested with statements
"SIM118", # remove .keys() calls from dictionaries
"SIM300", # yoda conditions
"UP007", # Optional[str] -> str | None
"UP038", # non-pep604-isinstance, results in slower code
"S101", # ignore "Use of `assert` detected"
]
# 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.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"*test*.py" = [
"D", # ignore all docstring lints in tests
"S301", # pickle is allowed in tests
"S603", # ignore subprocess untrusted input warnings in test files, input is under control of ibis
"S607", # ignore subprocess untrusted exe path warnings in test files, input is under control of ibis
"S608", # ignore sql injection warnings in test files, input is under control of ibis
"S108", # /tmp usage refers to hdfs path
]
"{docs,ci}/**/*.py" = ["INP001"]
"{ci/release/verify_release,docs/**/*_impl}.py" = [
"T201",
] # prints output using `print`
"docs/**/{datafusion,polars}_*.py" = ["T201"] # prints output using `print`
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 88
[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",
]