-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
220 lines (196 loc) · 6.04 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "empulse"
dynamic = ["version"]
description = "Value-driven and cost-sensitive tools for scikit-learn"
readme = "README.md"
authors = [
]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">= 3.10"
dependencies = [
"numpy>=1.24.4; python_version < '3.13'",
"numpy>=2.0.0; python_version >= '3.13'",
"scikit-learn>=1.5.2",
"imbalanced-learn>=0.13.0",
"scipy>=1.10.1",
"joblib>=1.3.2",
"pandas>=2.2.0",
"sympy>=1.12.1",
"typing-extensions>=4.0.0",
]
[project.urls]
documentation = "https://empulse.readthedocs.io/en/stable/"
repository = "https://github.com/ShimantoRahman/empulse"
issue-tracker = "https://github.com/ShimantoRahman/empulse/issues"
changelog = "https://empulse.readthedocs.io/en/stable/project/changelog.html"
[project.optional-dependencies]
optional = [
"empulse",
"xgboost>=1.7.4",
"lightgbm>=4.5.0",
"catboost>=1.2.7; python_version < '3.13'",
]
[dependency-groups]
test = [
"empulse[optional]",
"scikit-learn>=1.6.1",
"pytest>=7.4.4",
"pytest-cov>=4.1.0",
"tox>=4.13.0",
]
docs = [
"empulse[optional]",
"sphinx>=7.2.6",
"pydata-sphinx-theme>=0.16.1",
"sphinx-copybutton>=0.5.2",
"sphinxcontrib-sass>=0.3.4",
"myst-parser>=4.0.0",
"numpydoc>=1.6.0",
]
lint = [
"ruff>=0.9.4",
"pre-commit>=4.0.1",
"mypy>=1.15.0",
]
dev = [
{ include-group = "test" },
{ include-group = "docs" },
{ include-group = "lint" },
"twine>=4.0.2",
"jupyter>=1.1.1",
]
[tool.uv]
default-groups = ["dev"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
empulse = ["datasets/data/*.csv.gz", "datasets/descriptions/*.rst", "py.typed"]
[tool.setuptools.dynamic]
version = { attr = "empulse.__version__" }
[tool.setuptools.packages.find]
include = ["empulse*"]
exclude = [
"docs*",
"tests*",
"notebooks*",
]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.coverage.run]
omit = ["empulse/utils/_sklearn_compat.py"]
[tool.ruff]
line-length = 120
exclude = ["docs", "notebooks"]
[tool.ruff.format]
quote-style = "single"
docstring-code-format = true
docstring-code-line-length = 90
preview = true
[tool.ruff.lint]
extend-select = [# find all rules at https://docs.astral.sh/ruff/rules
"A", # flake8-builtins
"ANN", # flake8-annotations
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"N", # pep8-naming
"NPY", # numpy-specific rules
"PD", # pandas-vet
"PGH004", # blanket-noqa
"PIE", # flake8-pie
"PLC", # pylint conventions
"PLE", # pylint errors
# pylint refactor
"PLR1714",
"PLR1716",
"PLR1730",
"PLR1733",
"PLR1736",
"PLR2044",
"PLR5501",
"PLR6201",
"PLW", # pylint warnings
"RSE", # flake8-raise
"RUF", # ruff-specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"T20", # flake8-print
"TC", # flake8-type-checking
]
ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
"E731", # do not assign a `lambda` expression, use a `def`
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D301", # Use r""" if any backslashes in a docstring
"PLW2901", # `for` loop variable overwritten by assignment target
"PLC2701", # Private name import {name} from external module {module}
"PLC0415", # `import` should be at the top-level of a file
]
allowed-confusables = ["–"] # allow en-dash in docstrings (used in APA citation)
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
"E731", # do not assign a `lambda` expression, use a `def`
"D", # pydocstyle
"NPY002", # Replace legacy `np.random.random` call with `np.random.Generator`
"PLW2901", # `for` loop variable overwritten by assignment target
"PLC2701", # Private name import {name} from external module {module}
"PLC0415", # `import` should be at the top-level of a file
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true # gradually type-check the codebase
mypy-init-return = true
[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["X", "X*_*", "*_X*", "C", "assertAlmostEqualMetric", "return_X_y_costs"]
[tool.ruff.lint.pylint]
allow-dunder-method-names = ["__sklearn_tags__", "_repr_latex_"]
[tool.mypy]
ignore_missing_imports = true
allow_redefinition = true # sometimes mypy cannot infer the type correctly, especially when using np.typing.ArrayLike
warn_unused_configs = true
warn_redundant_casts = true
warn_return_any = true
strict_equality = true
extra_checks = true
no_implicit_reexport = true
no_implicit_optional = true
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
disallow_untyped_calls = true