forked from ibis-project/ibis-substrait
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
193 lines (179 loc) · 5.28 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
[tool.poetry]
name = "ibis-substrait"
version = "2.28.1"
build = "build.py"
packages = [{ include = "ibis_substrait" }]
homepage = "https://github.com/ibis-project/ibis-substrait"
repository = "https://github.com/ibis-project/ibis-substrait"
description = "Subtrait compiler for ibis"
authors = ["Ibis Contributors"]
maintainers = ["Ibis Contributors"]
license = "Apache-2.0"
readme = "README.md"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
[tool.poetry.dependencies]
python = ">=3.8.1,<4"
ibis-framework = ">=3"
protobuf = "3.20.1" # protobuf==3.20 C extensions aren't compatible with 3.19.4
packaging = ">=21.3"
pyyaml = ">=5"
[tool.poetry.group.dev.dependencies]
black = "^23.0.0"
duckdb = ">=0.4.0"
duckdb-engine = ">=0.5"
flake8 = "^6.0.0"
ipython = "^8.2.0"
protoletariat = "^2.0.0"
ruff = "^0.0.252"
setuptools = "^67.0.0"
[tool.poetry.group.types.dependencies]
mypy = "^1.0"
mypy-protobuf = "^3.0.0"
types-protobuf = "^3.18.1"
types-pytz = "^2022.0.0"
types-pyyaml = "^6.0.12.8"
[tool.poetry.group.test.dependencies]
pytest = "^7.0.0"
pytest-clarity = "^1.0.1"
pytest-cov = "^4.0.0"
pytest-mock = "^3.6.1"
pytest-randomly = "^3.10.1"
pytest-lazy-fixture = "^0.6.3"
pytz = "^2022.1"
sqlalchemy = ">=1.4"
pathspec = "0.11.0"
pyarrow = "^11.0.0"
pytest-snapshot = "^0.9.0"
[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
"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
"D402", # First line should not be the function's signature
"E501",
"E731",
"PGH003",
"RET504",
"RET505",
"RET506",
"RET507",
"RET508",
"SIM102", # nested ifs
"SIM108", # convert everything to ternary operator
"SIM114", # combine `if` branches
"SIM117", # nested withs
"SIM118", # remove .keys() calls from dictionaries
]
exclude = ["ibis_substrait/proto", "proto_prefix.py"]
target-version = "py38"
[tool.ruff.per-file-ignores]
"*test*.py" = ["D"] # ignore all docstring lints in tests
[tool.pytest.ini_options]
xfail_strict = true
addopts = [
"--ignore=site-packages",
"--ignore=dist-packages",
"--ignore=.direnv",
"--strict-markers",
"--doctest-modules",
]
filterwarnings = [
"error",
# older importlib metadata that there's no real point in breaking with
"ignore:SelectableGroups:DeprecationWarning",
"ignore:`parse_type` is deprecated:FutureWarning",
# ibis on postgres + windows
"ignore:locale specific date formats:UserWarning",
# ignore op deprecation warning while we still support 3.x
"ignore:`Node.op` is deprecated:FutureWarning",
# ignore sort_by deprecation while we still support 3.x
"ignore:`Table.sort_by` is deprecated:FutureWarning",
# ignore groupby deprecation while we still support 3.x
"ignore:`Table.groupby` is deprecated:FutureWarning",
# ignore sqlalchemy 2.0 warnings (they're upstream in ibis)
"ignore: Deprecated API features detected:sqlalchemy.exc.RemovedIn20Warning",
# ignore struct pairs deprecation while we still support 3.x
"ignore: `Struct.pairs` is deprecated:FutureWarning",
# ignore importlib.resources.path deprecation while 3.8 is still supported
# we'll drop 3.8 before we add support for 3.12, then we can handle this
"ignore: path is deprecated:DeprecationWarning"
]
markers = ["no_decompile"]
norecursedirs = ["site-packages", "dist-packages", ".direnv"]
[tool.black]
line_length = 88
exclude = "ibis_substrait/proto"
[tool.isort]
profile = "black"
skip_glob = ["ibis_substrait/proto/**/*.py"]
[tool.mypy]
exclude = '((tests|docs)/.+|build)\.py'
ignore_missing_imports = true
# untyped things
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
# Any handling
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = false
# None/Optional handling
no_implicit_optional = true
# show more context on failure
show_error_context = true
show_error_codes = true
[tool.pydocstyle]
inherit = false
convention = "numpy"
match_dir = "ibis_substrait"
add_ignore = ["D100", "D101", "D102", "D103", "D104", "D105"]
[build-system]
requires = ["poetry-core", "setuptools"]
build-backend = "poetry.core.masonry.api"