-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (160 loc) · 4.55 KB
/
pyproject.toml
File metadata and controls
184 lines (160 loc) · 4.55 KB
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "xbooster/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["xbooster"]
exclude = [
"*.egg-info",
"__pycache__",
"*.pyc",
]
[tool.hatch.build.targets.sdist]
include = [
"/xbooster",
"/tests",
"/examples",
"/README.md",
"/LICENSE.md",
]
exclude = [
"*.egg-info",
"__pycache__",
"*.pyc",
"/dist",
"/build",
]
[project]
name = "xbooster"
dynamic = ["version"]
description = "Explainable Boosted Scoring"
authors = [
{name = "xRiskLab", email = "contact@xrisklab.ai"}
]
readme = "README.md"
keywords = ["machine learning", "credit scoring", "xgboost", "catboost", "explainability"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]
requires-python = ">=3.10,<3.11"
dependencies = [
"matplotlib>=3.8.0,<4.0.0",
"numpy>=1.19.5,<2.0.0",
"pandas>=2.2.2,<3.0.0",
"scipy>=1.11.4,<2.0.0",
"scikit-learn>=1.3.0,<2.0.0",
"shap>=0.44.0,<1.0.0",
"catboost>=1.2.7,<2.0.0",
"xgboost>=2.0.0,<4.0.0",
"lightgbm>=4.0.0,<5.0.0",
"pyarrow>=19.0.1,<20.0.0",
]
[project.urls]
Repository = "https://github.com/xRiskLab/xBooster"
Homepage = "https://github.com/xRiskLab/xBooster"
[dependency-groups]
dev = [
"ipykernel>=6.29.5",
"pylint>=3.2.6,<4.0.0",
"pytest>=8.3.2,<9.0.0",
"pre-commit>=4.0.1,<5.0.0",
"faker>=37.0.2",
"ruff>=0.11.2",
"nbconvert>=7.16.6",
"pandas-stubs>=2.2.3",
"prek>=0.2.0",
"ty>=0.0.1a21",
]
[tool.uv]
default-groups = ["dev"]
[tool.black]
line-length = 60
[tool.ruff]
fix = true
indent-width = 4
line-length = 100
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D100", "D103"]
[tool.pytest.ini_options]
pythonpath = ["xbooster"]
[tool.pylint.'MESSAGES CONTROL']
disable = ["C0413", "C0103", "E0213"]
[tool.pylint.basic]
# Allow single letter variable names (common in ML: X, y)
good-names = ["i", "j", "k", "ex", "Run", "_", "X", "y"]
# Add the virtual environment to Python path
init-hook = "import sys, os; sys.path.insert(0, os.path.join(os.getcwd(), '.venv', 'lib', 'python3.10', 'site-packages'))"
[tool.pylint.format]
max-line-length = 88
# prek - Python Requirements Checker
[tool.prek]
# Check that imports match dependencies in pyproject.toml
check-imports = true
# Exclude test and example files from strict import checking
exclude = [
"tests/**",
"examples/**",
]
[tool.ty.rules]
# Common ML libraries have incomplete type stubs
unresolved-import = "ignore"
unresolved-reference = "ignore"
# Include type stubs directory if created in the future
[tool.ty.src]
include = ["xbooster", "typings"]
# Override rules for examples - more lenient
[[tool.ty.overrides]]
include = ["examples/**"]
[tool.ty.overrides.rules]
unresolved-import = "ignore"
unsupported-operator = "ignore"
unresolved-attribute = "ignore"
no-matching-overload = "ignore"
# Override rules for tests - allow test patterns
[[tool.ty.overrides]]
include = ["tests/**"]
[tool.ty.overrides.rules]
unresolved-import = "ignore"
no-matching-overload = "ignore"
# Specific overrides for xbooster modules with XGBoost/CatBoost/LightGBM
[[tool.ty.overrides]]
include = ["xbooster/xgb_constructor.py", "xbooster/cb_constructor.py", "xbooster/catboost_*.py", "xbooster/lgb_constructor.py"]
[tool.ty.overrides.rules]
unresolved-attribute = "ignore"
possibly-missing-attribute = "ignore"
possibly-missing-import = "ignore"
invalid-return-type = "ignore"
invalid-assignment = "ignore"
no-matching-overload = "ignore"
invalid-argument-type = "ignore"
# Override for parser and explainer - dynamic ML library attributes
[[tool.ty.overrides]]
include = ["xbooster/_parser.py", "xbooster/explainer.py"]
[tool.ty.overrides.rules]
possibly-missing-attribute = "ignore"
invalid-argument-type = "ignore"
# Override for utils - pandas/matplotlib type complexity
[[tool.ty.overrides]]
include = ["xbooster/_utils.py"]
[tool.ty.overrides.rules]
unsupported-operator = "ignore"
invalid-argument-type = "ignore"
not-iterable = "ignore"
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true