-
Notifications
You must be signed in to change notification settings - Fork 19
/
pyproject.toml
247 lines (225 loc) · 5.6 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
[build-system]
requires = [
"setuptools >= 61.0.0",
"wheel",
"setuptools_scm[toml] >= 6.2"
]
build-backend = "setuptools.build_meta"
[project]
name = "julearn"
description = "Juelich Machine Learning Library"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "AGPL-3.0-only"}
authors = [
{ name = "Fede Raimondo", email = "[email protected]" },
{ name = "Sami Hamdan", email = "[email protected]" },
]
maintainers = [
{name = "Sami Hamdan", email = "[email protected]"},
]
keywords = [
"machine-learning",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Natural Language :: English",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"numpy>=1.24,<1.27",
"pandas>=1.5.0,<2.3",
"statsmodels>=0.13,<0.15",
"scikit-learn>=1.2.0,<1.6.0",
]
dynamic = ["version"]
[project.urls]
homepage = "https://juaml.github.io/julearn"
documentation = "https://juaml.github.io/julearn"
repository = "https://github.com/juaml/julearn"
[project.optional-dependencies]
dev = ["tox", "pre-commit"]
docs = [
"seaborn>=0.12.2,<0.13",
"sphinx>=5.3.0,<7.3",
"sphinx-gallery>=0.13.0,<0.15",
"furo>=2022.9.29,<2024.0.0",
"sphinx_copybutton>=0.5.0,<0.6",
"numpydoc>=1.5.0,<1.6",
"towncrier<24",
"scikit-optimize>=0.10.0,<0.11",
"optuna>=3.6.0,<3.7",
"optuna_integration>=3.6.0,<4.1",
]
deslib = ["deslib>=0.3.5,<0.4"]
viz = [
"panel>=1.3.0",
"bokeh>=3.0.0",
"param>=2.0.0",
]
skopt = ["scikit-optimize>=0.10.0,<0.11"]
optuna = [
"optuna>=3.6.0,<3.7",
"optuna_integration>=3.6.0,<4.1",
]
# Add all optional functional dependencies (skip deslib until its fixed)
# This does not include dev/docs building dependencies
all = ["julearn[viz,skopt,optuna]"]
################
# Tool configs #
################
[tool.setuptools]
packages = ["julearn"]
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
write_to = "julearn/_version.py"
[tool.black]
line-length = 79
target-version = ["py38", "py39", "py310", "py311"]
[tool.codespell]
skip = "*/auto_examples/*,*.html,.git/,*.pyc,*/_build/*,*/api/generated/*.examples,julearn/external/*"
count = ""
quiet-level = 3
ignore-words = "ignore_words.txt"
interactive = 0
builtin = "clear,rare,informal,names,usage,code"
[tool.ruff]
line-length = 79
extend-exclude = [
"__init__.py",
"docs",
"examples",
"external",
]
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# flake8-blind-except
"BLE",
# flake8-comprehensions
"C4",
# mccabe
"C90",
# pydocstyle
"D",
# pycodestyle errors
"E",
# pyflakes
"F",
# isort
"I",
# pep8-naming
"N",
# pygrep-hooks
"PGH",
# ruff
"RUF",
# flake8-type-checking
"TCH",
# pyupgrade
"UP",
# pycodestyle warnings
"W",
# flake8-2020
"YTT",
]
extend-ignore = [
# Use of `functools.lru_cache` or `functools.cache` on methods can lead to
# memory leaks. The cache may retain instance references, preventing garbage
# collection.
"B019",
# abstract class with no abstract methods
"B024",
"D202",
# missing docstring in __init__, incompatible with numpydoc
"D107",
# use r""" if any backslashes in a docstring
"D301",
# class names should use CapWords convention
"N801",
# function name should be lowercase
"N802",
# variable in function should be lowercase
"N806",
# use specific rule codes when ignoring type issues
"PGH003",
]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["julearn"]
known-third-party =[
"numpy",
"pandas",
"sklearn",
"statsmodels",
"bokeh",
"panel",
"param",
"deslib",
"pytest",
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.towncrier]
directory = "docs/changes/newsfragments"
filename = "docs/whats_new.rst"
package = "julearn"
# to use gh_substitutions
issue_format = ":gh:`{issue}`"
# modify to have proper toctree
underlines = "-^~"
# set line length to 79
wrap = true
# Need to put default explicitly as custom is not combined with default
[tool.towncrier.fragment.bugfix]
name = "Bugfixes"
showcontent = true
[tool.towncrier.fragment.doc]
name = "Improved Documentation"
showcontent = true
[tool.towncrier.fragment.feature]
name = "Features"
showcontent = true
[tool.towncrier.fragment.misc]
name = "Misc"
showcontent = true
[tool.towncrier.fragment.removal]
name = "Deprecations and Removals"
showcontent = true
# Add custom towncrier fragment for enhancements
[tool.towncrier.fragment.enh]
name = "Enhancements"
showcontent = true
# Add custom towncrier fragment for API changes
[tool.towncrier.fragment.change]
name = "API Changes"
showcontent = true
## Configure pyright to ignore assignment types until scikit-learn stubs are updated
[tool.pyright]
reportAssignmentType = "none"
exclude = [
"docs/auto_examples/",
"*.html",
".git/",
"*.pyc,",
"*/_build/*",
"*/api/generated/*.examples",
"build/",
"examples/XX_disabled/",
".tox",
".eggs",
"examples/", # Lots of problems due to bad stubs, avoid filling the example with # type:ignore
"julearn/external", # External code, not to be checked
"scratch/", # place to prototype, not to be checked
]