-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
235 lines (222 loc) · 5.86 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
[build-system]
requires = ["setuptools>=68", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "emm"
description = "Entity Matching Model package"
readme = "README.md"
authors = [
{name = "Max Baak", email = "[email protected]"},
{name = "Stephane Collot", email = "[email protected]"},
{name = "Apoorva Mahajan", email = "[email protected]"},
{name = "Tomasz Waleń", email = "[email protected]"},
{name = "Simon Brugman", email = "[email protected]"}
]
requires-python = ">=3.8"
dependencies = [
# Fix for error ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject.
"numpy>=1.20.1",
"scipy",
"scikit-learn>=1.0.0",
"pandas>=1.1.0,!=1.5.0",
"jinja2", # for pandas https://pandas.pydata.org/docs/getting_started/install.html#visualization
"rapidfuzz<3.0.0",
"regex",
"urllib3",
"recordlinkage",
"cleanco>=2.2",
# It is important to fix the version of xgboost for reproducible classification scores
"xgboost",
"sparse-dot-topn>=1.1.1",
"joblib",
"pyarrow>=6.0.1", # seems to work with spark 3.1.2 - 3.3.1
"requests",
"unidecode"
]
dynamic = ["version"]
[project.optional-dependencies]
spark = [
# In NumPy 1.24.0, np.bool has been removed.
# https://issues.apache.org/jira/browse/SPARK-41718
# 3.4 is needed for python 3.11
# https://github.com/apache/spark/pull/38987
"pyspark>=3.1; python_version < '3.11'",
"numpy<1.24.0",
]
dev = [
"pre-commit",
"gitpython",
"nbconvert",
"jupyter_client>=5.2.3",
"ipykernel>=5.1.3",
"matplotlib",
"pygments",
"pandoc",
"pympler"
]
test = [
"pytest",
"pytest-ordering",
"virtualenv"
]
test-cov = [
"coverage",
"pytest-cov"
]
test-bench = [
"pytest-benchmark"
]
test-notebook = [
"pytest-notebook>=0.6.1",
"ipykernel>=5.1.3",
"matplotlib",
"nbdime<4"
]
doc = [
"matplotlib",
"seaborn",
"sphinx",
"sphinx-material",
"furo",
"sphinx-copybutton",
"sphinx-autodoc-typehints",
"jupyter_contrib_nbextensions",
"nbstripout",
"nbsphinx",
"nbsphinx-link",
"ipywidgets",
"jinja2",
"jinja-cli",
"markupsafe",
"pandoc",
"jupyter_client>=5.2.3",
"myst_parser"
]
[tool.pytest.ini_options]
filterwarnings = [
# DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
# Fixed in pyspark 3.4.0
# https://issues.apache.org/jira/browse/SPARK-38660?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
"ignore:::.*pyspark.sql.pandas.utils:37",
"ignore:::.*pyspark.sql.pandas.utils:64",
# FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead.
# Fixed in pyspark 3.4.0
# https://issues.apache.org/jira/browse/SPARK-40500
"ignore:::.*pyspark.sql.pandas.conversion:474",
"ignore:::.*pyspark.sql.pandas.conversion:486",
# DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by
# itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use
# `np.bool_` here.
# Fixed in pyspark 3.3.0, 3.4.0
# https://issues.apache.org/jira/browse/SPARK-40376
"ignore:::.*pyspark.sql.pandas.conversion:298",
# DeprecationWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead
# of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns
# are non-unique, `df.isetitem(i, newvals)`
# (New behaviour should be ok)
"ignore:::.*emm.indexing.pandas_candidate_selection:162",
"ignore:::.*emm.data.negative_data_creation:156",
# Use setlocale(), getencoding() and getlocale() instead
# https://github.com/pytest-dev/pytest-nunit/issues/67
"ignore:::.*pytest_nunit.nunit:119"
]
[tool.ruff]
extend-select = [
"E", # pyflakes `E`
"W", # pyflakes `W`
"I", # isort
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"D212", # pydocstyle
"D411", # pydocstyle
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"FA", # flake8-future-annotations
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"RET", # flake8-return
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TD002", # flake8-todos
"PL", # pylint
"PERF", # perflint
"FURB", # refurb
]
target-version = "py38"
line-length = 120
select = [
# Enable Pyflakes `E`, `F` and `W` codes
"F",
# pytest
"PT",
# numpy
"NPY",
# import conventions
"ICN",
# prints
"T20",
# quotes
"Q",
# ruff-specific rules
"RUF",
# logging format
"G",
# pydocstyle
"D",
# annotation with autofix
"ANN204",
# error messages
"EM",
# raise
"RSE",
# flynt
"FLY",
"CPY001"
]
ignore = [
"E501", # line length
"PLR0913", # too many arguments
"PLR2004", # magic value
"PLR0912", # too many branches
"PLR0915", # too many statements
"PLR0911", # too many return statements
"PLR6301", # method could be function/staticmethod
# Only lint existing docstrings
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
# period not required
"D400",
"D415",
# newline not required
"D205",
# address later
"PLW2901",
"PLC1901"
]
[tool.ruff.flake8-copyright]
notice-rgx = """(?mis)Copyright \\(c\\) 2023 ING Analytics Wholesale Banking.+"""
[tool.ruff.per-file-ignores]
"tests/*" = ["S101", "PLR2004", "CPY001", "ANN001"]
"docs/sphinx/source/conf.py" = ["INP", "CPY001"]
"example.py" = ["T201", "CPY001"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.isort]
split-on-trailing-comma = false
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "emm.version.__version__"}
[tool.setuptools.package-data]
emm = ["data/*.csv.gz"]
[tool.setuptools.packages.find]
where = ["."]
include = ["emm*"]