forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
480 lines (414 loc) · 13.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
[project]
name = "scikit-learn"
dynamic = ["version"]
description = "A set of python modules for machine learning and data mining"
readme = "README.rst"
maintainers = [
{name = "scikit-learn developers", email="[email protected]"},
]
dependencies = [
"numpy>=1.19.5",
"scipy>=1.6.0",
"joblib>=1.2.0",
"threadpoolctl>=3.1.0",
]
requires-python = ">=3.9"
license = {file = "COPYING"}
classifiers=[
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: C",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Development Status :: 5 - Production/Stable",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
[project.urls]
homepage = "https://scikit-learn.org"
source = "https://github.com/scikit-learn/scikit-learn"
download = "https://pypi.org/project/scikit-learn/#files"
tracker = "https://github.com/scikit-learn/scikit-learn/issues"
"release notes" = "https://scikit-learn.org/stable/whats_new"
[project.optional-dependencies]
build = ["numpy>=1.19.5", "scipy>=1.6.0", "cython>=3.0.10", "meson-python>=0.16.0"]
install = ["numpy>=1.19.5", "scipy>=1.6.0", "joblib>=1.2.0", "threadpoolctl>=3.1.0"]
benchmark = ["matplotlib>=3.3.4", "pandas>=1.1.5", "memory_profiler>=0.57.0"]
docs = [
"matplotlib>=3.3.4",
"scikit-image>=0.17.2",
"pandas>=1.1.5",
"seaborn>=0.9.0",
"memory_profiler>=0.57.0",
"sphinx>=7.3.7",
"sphinx-copybutton>=0.5.2",
"sphinx-gallery>=0.17.1",
"numpydoc>=1.2.0",
"Pillow>=7.1.2",
"pooch>=1.6.0",
"sphinx-prompt>=1.4.0",
"sphinxext-opengraph>=0.9.1",
"plotly>=5.14.0",
"polars>=0.20.30",
"sphinx-design>=0.5.0",
"sphinx-design>=0.6.0",
"sphinxcontrib-sass>=0.3.4",
"pydata-sphinx-theme>=0.15.3",
"sphinx-remove-toctrees>=1.0.0.post1",
]
examples = [
"matplotlib>=3.3.4",
"scikit-image>=0.17.2",
"pandas>=1.1.5",
"seaborn>=0.9.0",
"pooch>=1.6.0",
"plotly>=5.14.0",
]
tests = [
"matplotlib>=3.3.4",
"scikit-image>=0.17.2",
"pandas>=1.1.5",
"pytest>=7.1.2",
"pytest-cov>=2.9.0",
"ruff>=0.5.1",
"black>=24.3.0",
"mypy>=1.9",
"pyamg>=4.0.0",
"polars>=0.20.30",
"pyarrow>=12.0.0",
"numpydoc>=1.2.0",
"pooch>=1.6.0",
]
maintenance = ["conda-lock==2.5.6"]
[build-system]
build-backend = "mesonpy"
# Minimum requirements for the build system to execute.
requires = [
"meson-python>=0.16.0",
"Cython>=3.0.10",
"numpy>=2",
"scipy>=1.6.0",
]
[tool.black]
line-length = 88
target-version = ['py39', 'py310', 'py311']
preview = true
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.mypy_cache
| \.vscode
| build
| dist
| doc/_build
| doc/auto_examples
| sklearn/externals
| asv_benchmarks/env
)/
'''
[tool.ruff]
# max line length for black
line-length = 88
target-version = "py38"
exclude=[
".git",
"__pycache__",
"dist",
"sklearn/externals",
"doc/_build",
"doc/auto_examples",
"build",
"asv_benchmarks/env",
"asv_benchmarks/html",
"asv_benchmarks/results",
"asv_benchmarks/benchmarks/cache",
]
[tool.ruff.lint]
# This enables us to use CPY001: copyright header check
preview = true
# This enables us to use the explicit preview rules that we want only
explicit-preview-rules = true
# all rules can be found here: https://beta.ruff.rs/docs/rules/
select = ["E", "F", "W", "I", "CPY001"]
ignore=[
# space before : (needed for how black formats slicing)
"E203",
# do not assign a lambda expression, use a def
"E731",
# do not use variables named 'l', 'O', or 'I'
"E741",
# E721 is in preview (july 2024) and gives many false positives.
# Use `is` and `is not` for type comparisons, or `isinstance()` for
# isinstance checks
"E721",
# F841 is in preview (july 2024), and we don't care much about it.
# Local variable ... is assigned to but never used
"F841",
]
[tool.ruff.lint.flake8-copyright]
notice-rgx = "\\#\\ Authors:\\ The\\ scikit\\-learn\\ developers\\\r?\\\n\\#\\ SPDX\\-License\\-Identifier:\\ BSD\\-3\\-Clause"
[tool.ruff.lint.per-file-ignores]
# It's fine not to put the import at the top of the file in the examples
# folder.
"examples/*"=["E402"]
"doc/conf.py"=["E402"]
"**/tests/*"=["CPY001"]
"asv_benchmarks/*"=["CPY001"]
"benchmarks/*"=["CPY001"]
"doc/*"=["CPY001"]
"build_tools/*"=["CPY001"]
"sklearn/_build_utils/*"=["CPY001"]
"maint_tools/*"=["CPY001"]
".spin/*"=["CPY001"]
".github/*"=["CPY001"]
# __doc__ is too long (>4096 chars) and therefore false positive on copyright check
"examples/model_selection/plot_precision_recall.py"=["CPY001"]
"examples/svm/plot_rbf_parameters.py"=["CPY001"]
# __all__ has un-imported names
"sklearn/__init__.py"=["F822"]
[tool.cython-lint]
# Ignore the same error codes as ruff
# + E501 (line too long) because keeping it < 88 in cython
# often makes code less readable.
ignore = [
# multiple spaces/tab after comma
'E24',
# space before : (needed for how black formats slicing)
'E203',
# line too long
'E501',
# do not assign a lambda expression, use a def
'E731',
# do not use variables named 'l', 'O', or 'I'
'E741',
# line break before binary operator
'W503',
# line break after binary operator
'W504',
]
# Exclude files are generated from tempita templates
exclude= '''
(
asv_benchmarks/
| sklearn/_loss/_loss.pyx
| sklearn/linear_model/_sag_fast.pyx
| sklearn/linear_model/_sgd_fast.pyx
| sklearn/utils/_seq_dataset.pyx
| sklearn/utils/_seq_dataset.pxd
| sklearn/utils/_weight_vector.pyx
| sklearn/utils/_weight_vector.pxd
| sklearn/metrics/_dist_metrics.pyx
| sklearn/metrics/_dist_metrics.pxd
| sklearn/metrics/_pairwise_distances_reduction/_argkmin.pxd
| sklearn/metrics/_pairwise_distances_reduction/_argkmin.pyx
| sklearn/metrics/_pairwise_distances_reduction/_argkmin_classmode.pyx
| sklearn/metrics/_pairwise_distances_reduction/_base.pxd
| sklearn/metrics/_pairwise_distances_reduction/_base.pyx
| sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pxd
| sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx
| sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer.pxd
| sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer.pyx
| sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pxd
| sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pyx
)
'''
[tool.check-sdist]
# These settings should match .gitattributes
sdist-only = []
git-only = [".*", "asv_benchmarks", "azure-pipelines.yml", "benchmarks", "build_tools", "maint_tools"]
default-ignore = false
[tool.spin]
package = "sklearn" # name of your package
[tool.spin.commands]
"Build" = [
"spin.cmds.pip.install",
"spin.cmds.meson.test",
".spin/cmds.py:clean",
]
"Documentation" = [
"spin.cmds.meson.docs"
]
[tool.changelog-bot]
[tool.changelog-bot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_noop_label = "No Changelog Needed"
whatsnew_pattern = 'doc/whatsnew/upcoming_changes/[^/]+/\d+\.[^.]+\.rst'
[tool.towncrier]
package = "sklearn"
filename = "doc/whats_new/notes-towncrier.rst"
directory = "doc/whats_new/upcoming_changes"
issue_format = ":pr:`{issue}`"
template = "doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2"
all_bullets = false
[[tool.towncrier.type]]
directory = "major-feature"
name = "|MajorFeature|"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "|Feature|"
showcontent = true
[[tool.towncrier.type]]
directory = "efficiency"
name = "|Efficiency|"
showcontent = true
[[tool.towncrier.type]]
directory = "enhancement"
name = "|Enhancement|"
showcontent = true
[[tool.towncrier.type]]
directory = "fix"
name = "|Fix|"
showcontent = true
[[tool.towncrier.type]]
directory = "api"
name = "|API|"
showcontent = true
[[tool.towncrier.type]]
directory = "other"
name = ""
showcontent = true
[[tool.towncrier.section]]
name = "Security"
path = "security"
[[tool.towncrier.section]]
name = "Changed models"
path = "changed-models"
[[tool.towncrier.section]]
name = "Changes impacting many modules"
path = "many-modules"
[[tool.towncrier.section]]
name = "Support for Array API"
path = "array-api"
[[tool.towncrier.section]]
name = "Metadata routing"
path = "metadata-routing"
[[tool.towncrier.section]]
name = "custom-top-level"
path = "custom-top-level"
[[tool.towncrier.section]]
name = ":mod:`sklearn.base`"
path = "sklearn.base"
[[tool.towncrier.section]]
name = ":mod:`sklearn.calibration`"
path = "sklearn.calibration"
[[tool.towncrier.section]]
name = ":mod:`sklearn.cluster`"
path = "sklearn.cluster"
[[tool.towncrier.section]]
name = ":mod:`sklearn.compose`"
path = "sklearn.compose"
[[tool.towncrier.section]]
name = ":mod:`sklearn.covariance`"
path = "sklearn.covariance"
[[tool.towncrier.section]]
name = ":mod:`sklearn.cross_decomposition`"
path = "sklearn.cross_decomposition"
[[tool.towncrier.section]]
name = ":mod:`sklearn.datasets`"
path = "sklearn.datasets"
[[tool.towncrier.section]]
name = ":mod:`sklearn.decomposition`"
path = "sklearn.decomposition"
[[tool.towncrier.section]]
name = ":mod:`sklearn.discriminant_analysis`"
path = "sklearn.discriminant_analysis"
[[tool.towncrier.section]]
name = ":mod:`sklearn.dummy`"
path = "sklearn.dummy"
[[tool.towncrier.section]]
name = ":mod:`sklearn.ensemble`"
path = "sklearn.ensemble"
[[tool.towncrier.section]]
name = ":mod:`sklearn.exceptions`"
path = "sklearn.exceptions"
[[tool.towncrier.section]]
name = ":mod:`sklearn.feature_extraction`"
path = "sklearn.feature_extraction"
[[tool.towncrier.section]]
name = ":mod:`sklearn.feature_selection`"
path = "sklearn.feature_selection"
[[tool.towncrier.section]]
name = ":mod:`sklearn.frozen`"
path = "sklearn.frozen"
[[tool.towncrier.section]]
name = ":mod:`sklearn.gaussian_process`"
path = "sklearn.gaussian_process"
[[tool.towncrier.section]]
name = ":mod:`sklearn.impute`"
path = "sklearn.impute"
[[tool.towncrier.section]]
name = ":mod:`sklearn.inspection`"
path = "sklearn.inspection"
[[tool.towncrier.section]]
name = ":mod:`sklearn.isotonic`"
path = "sklearn.isotonic"
[[tool.towncrier.section]]
name = ":mod:`sklearn.kernel_approximation`"
path = "sklearn.kernel_approximation"
[[tool.towncrier.section]]
name = ":mod:`sklearn.kernel_ridge`"
path = "sklearn.kernel_ridge"
[[tool.towncrier.section]]
name = ":mod:`sklearn.linear_model`"
path = "sklearn.linear_model"
[[tool.towncrier.section]]
name = ":mod:`sklearn.manifold`"
path = "sklearn.manifold"
[[tool.towncrier.section]]
name = ":mod:`sklearn.metrics`"
path = "sklearn.metrics"
[[tool.towncrier.section]]
name = ":mod:`sklearn.mixture`"
path = "sklearn.mixture"
[[tool.towncrier.section]]
name = ":mod:`sklearn.model_selection`"
path = "sklearn.model_selection"
[[tool.towncrier.section]]
name = ":mod:`sklearn.multiclass`"
path = "sklearn.multiclass"
[[tool.towncrier.section]]
name = ":mod:`sklearn.multioutput`"
path = "sklearn.multioutput"
[[tool.towncrier.section]]
name = ":mod:`sklearn.naive_bayes`"
path = "sklearn.naive_bayes"
[[tool.towncrier.section]]
name = ":mod:`sklearn.neighbors`"
path = "sklearn.neighbors"
[[tool.towncrier.section]]
name = ":mod:`sklearn.neural_network`"
path = "sklearn.neural_network"
[[tool.towncrier.section]]
name = ":mod:`sklearn.pipeline`"
path = "sklearn.pipeline"
[[tool.towncrier.section]]
name = ":mod:`sklearn.preprocessing`"
path = "sklearn.preprocessing"
[[tool.towncrier.section]]
name = ":mod:`sklearn.random_projection`"
path = "sklearn.random_projection"
[[tool.towncrier.section]]
name = ":mod:`sklearn.semi_supervised`"
path = "sklearn.semi_supervised"
[[tool.towncrier.section]]
name = ":mod:`sklearn.svm`"
path = "sklearn.svm"
[[tool.towncrier.section]]
name = ":mod:`sklearn.tree`"
path = "sklearn.tree"
[[tool.towncrier.section]]
name = ":mod:`sklearn.utils`"
path = "sklearn.utils"