-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
252 lines (232 loc) · 6.44 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
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [https://neo4j.com]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[project]
name = "neo4j-rust-ext"
description = "Rust Extensions for a Faster Neo4j Bolt Driver for Python"
license = {text = "Apache License, Version 2.0"}
readme = "README.md"
authors = [
{name = "Neo4j, Inc.", email = "drivers@neo4j.com"},
]
dependencies = [
"neo4j == 5.27.0"
]
requires-python = ">=3.7"
keywords = ["neo4j", "graph", "database"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"Topic :: Database",
"Topic :: Software Development",
]
version = "5.27.0.0"
[project.urls]
Homepage = "https://neo4j.com/"
Repository = "https://github.com/neo4j/neo4j-python-driver-rust-ext"
"Issue Tracker" = "https://github.com/neo4j/neo4j-python-driver-rust-ext/issues"
Changelog = "https://github.com/neo4j/neo4j-python-driver-rust-ext/blob/HEAD/CHANGELOG.md"
Forum = "https://community.neo4j.com/c/drivers-stacks/python/"
Discord = "https://discord.com/invite/neo4j"
[project.optional-dependencies]
numpy = ["neo4j[numpy]"]
pandas = ["neo4j[pandas]"]
pyarrow = ["neo4j[pyarrow]"]
[build-system]
requires = ["maturin ~= 1.6.0"]
build-backend = "maturin"
[tool.maturin]
features = ["pyo3/extension-module", "pyo3/generate-import-lib"]
module-name = "neo4j._codec.packstream._rust"
exclude = [
"/.editorconfig",
".gitignore",
".gitmodules",
".pre-commit-config.yaml",
"bin/**/*",
"driver/**/*",
"test*/**/*",
"CONTRIBUTING.md",
"requirements*.txt",
"tox.ini",
{ path = "neo4j/**/.keep", format = "wheel" }
]
[tool.isort]
combine_as_imports = true
ensure_newline_before_comments = true
force_grid_wrap = 2
# breaks order of relative imports
# https://github.com/PyCQA/isort/issues/1944
#force_sort_within_sections = true
include_trailing_comma = true
# currently broken
# https://github.com/PyCQA/isort/issues/1855
#lines_before_imports = 2
lines_after_imports = 2
lines_between_sections = 1
multi_line_output = 3
order_by_type = false
remove_redundant_aliases = true
use_parentheses = true
known_first_party = ["neo4j"]
[tool.ruff]
line-length = 79
extend-exclude = [
"driver",
]
[tool.ruff.lint]
preview = true # to get CPY lints
extend-ignore = [
"RUF002", # allow ’ (RIGHT SINGLE QUOTATION MARK) to be used as an apostrophe (e.g. "it’s")
"SIM117", # TODO: when Python 3.10+ is the minimum,
# we can start to use multi-item `with` statements
# pydocstyle
"D1", # disable check for undocumented items (way too noisy)
"D203", # `one-blank-line-before-class`
"D212", # `multi-line-summary-first-line`
# comprehensions
"C417", # map is ok, no need to rewrite to list comprehension
# too noisy and opinionated pytest lints
"PT007",
"PT011",
"PT012",
"PT018",
# too noisy and opinionated pylint lints
"PLC0415",
"PLC1901",
"PLC2401",
"PLC2701",
"PLR09",
"PLR1702",
"PLR1704",
"PLR2004",
"PLR6301",
"PLW2901",
"PLW1641",
# too noisy and opinionated tryceratops lints
"TRY003",
"TRY300",
"TRY301",
"TRY400",
# too noisy and opinionated return statement lints
"RET505",
"RET506",
"RET507",
"RET508",
"PERF203", # try-except within loop is fine. Especially in a retry scenario
# too noisy and opinionated FURB lints
"FURB113",
"FURB118",
"FURB140",
"FURB154",
# needs fixing in ruff to work with typing.Protocol
# https://github.com/astral-sh/ruff/issues/13307
"FURB180",
]
select = [
# ruff
"RUF",
# pycodestyle
"E",
"W",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# pep8-naming
"N",
# pydocstyle
"D",
# pydocstyle: explicit rules not selected by the chosen convention
"D404",
# Does not yet fully support sphinx style docstrings
# https://github.com/astral-sh/ruff/pull/13286
# # pydoclint
# "DOC",
# pylint
"PL",
# tryceratops
"TRY",
# flynt
"FLY",
# Perflint
"PERF",
# refurb
"FURB",
# async checks
"ASYNC",
# check comprehensions
"C4",
# check for left-over debugger calls
"T100",
# check for left-over print calls
"T20",
# qoute styles
"Q",
# check for unnecessary parantheses in raise statements
"RSE",
# check return statements
"RET",
# TODO: 6.0 - enable and add __slots__ to applicable classes
# # check __slots__ usage
# "SLOT",
# check type-checking usage
"TCH",
# copyright notice
"CPY",
# check shebangs
"EXE",
# logging calls + formats
"LOG",
"G",
# flake8-pie
"PIE",
# pytest lints
"PT",
]
[tool.ruff.lint.per-file-ignores]
"{testkit,tests}/**" = [
"T20", # print statements are ok in the testing infrastructure
]
"tests/**" = [
"PLW1641", # no need for production grade test code
"FURB152", # don't tell us to use math.pi, when all we need is just some random float
# allow async functions without await to enable type checking, pretending to be async, matching type signatures
"RUF029",
]
"bin/**" = [
"T20", # print statements are ok in our helper scripts
]
[tool.ruff.lint.pycodestyle]
max-doc-length = 83 # 79 (max line length) + 4 indentation of code blocks
[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["mcs"]
[tool.ruff.lint.flake8-copyright]
notice-rgx = "# Copyright \\(c\\) \"Neo4j\""
[tool.ruff.lint.pydocstyle]
convention = "pep257"