-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
200 lines (184 loc) · 5.85 KB
/
pyproject.toml
File metadata and controls
200 lines (184 loc) · 5.85 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mlscorecheck"
version = "1.0.3"
description = "ML score check: checking the validity of machine learning and computer vision scores"
readme = "README.rst"
requires-python = ">=3.10"
license = {text = "MIT"}
authors = [
{name = "Gyorgy Kovacs", email = "gyuriofkovacs@gmail.com"},
]
maintainers = [
{name = "Gyorgy Kovacs", email = "gyuriofkovacs@gmail.com"},
]
keywords = ["machine learning", "computer vision", "score validation", "consistency checking"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
dependencies = [
"numpy",
"scipy",
"scikit-learn",
"pulp",
]
[project.optional-dependencies]
tests = ["pytest"]
docs = [
"sphinx",
"sphinx-gallery",
"sphinx_rtd_theme",
"matplotlib",
"pandas",
"pulp",
]
dev = [
"pytest",
"sphinx",
"sphinx-gallery",
"sphinx_rtd_theme",
"matplotlib",
"pandas",
"pulp",
]
[project.urls]
Homepage = "https://github.com/gykovacs/mlscorecheck"
Repository = "https://github.com/gykovacs/mlscorecheck"
Documentation = "https://mlscorecheck.readthedocs.io/"
"Bug Tracker" = "https://github.com/gykovacs/mlscorecheck/issues"
[tool.setuptools]
packages = ["mlscorecheck"]
include-package-data = true
[tool.setuptools.package-data]
mlscorecheck = [
"individual/solutions.json",
"scores/scores.json",
"experiments/machine_learning/common_datasets.json",
"experiments/machine_learning/sklearn.json",
"experiments/ehg/tpehg.json",
"experiments/retina/drive/drive_1_test_fov.json",
"experiments/retina/drive/drive_1_test_all.json",
"experiments/retina/drive/drive_1_train_fov.json",
"experiments/retina/drive/drive_1_train_all.json",
"experiments/retina/drive/drive_2_test_fov.json",
"experiments/retina/drive/drive_2_test_all.json",
"experiments/retina/drive/drive_2_train_fov.json",
"experiments/retina/drive/drive_2_train_all.json",
"experiments/retina/chase_db1/manual1.json",
"experiments/retina/chase_db1/manual2.json",
"experiments/retina/diaretdb0/diaretdb0.json",
"experiments/retina/diaretdb1/diaretdb1.json",
"experiments/retina/drishti_gs/drishti_gs_test.json",
"experiments/retina/drishti_gs/drishti_gs_train.json",
"experiments/retina/hrf/with_fov.json",
"experiments/retina/hrf/without_fov.json",
"experiments/retina/stare/ah.json",
"experiments/retina/stare/vk.json",
"experiments/skinlesion/isic2016/isic2016.json",
"experiments/skinlesion/isic2017/isic2017.json",
"experiments/skinlesion/isic2017/isic2017m.json",
"experiments/skinlesion/isic2017/isic2017sk.json",
]
# Linting and Code Quality Tools Configuration
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"SIM", # flake8-simplify
]
ignore = [
# Allow star imports for package __init__.py files
"F403", # `from .module import *` used; unable to detect undefined names
"F405", # name may be undefined, or defined from star imports
# Scientific computing conventions
"N803", # argument name should be lowercase (e.g., N, tp, tn)
"N806", # variable in function should be lowercase
# Allow complexity for scientific algorithms
"C901", # too complex
# Allow magic values in scientific contexts
"PLR2004", # Magic value used in comparison
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint.per-file-ignores]
# Allow star imports and unused imports in __init__.py files
"**/__init__.py" = ["F401", "F403", "F405"]
# Allow star imports in test files
"tests/**" = ["F401", "F403", "F405", "S101"]
# Allow long lines in mathematical formula files
"**/individual/_tptn_solutions.py" = ["E501"]
# Allow long lines in docstrings for score lists
"**/check/bundles/**/*.py" = ["E501"]
"**/check/multiclass/**/*.py" = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["mlscorecheck"]
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
warn_unused_configs = true
exclude = [
"build",
"dist",
"docs",
".eggs",
"legacy",
]
# Strategic overrides for specific error types that would require extensive refactoring
[[tool.mypy.overrides]]
module = [
"mlscorecheck.*",
]
disable_error_code = [
# "no-untyped-def", # Function definitions without type annotations
"no-untyped-call", # Calls to untyped functions
"type-arg", # Missing type parameters for generics like dict, list
]
[tool.pylint.messages_control]
disable = [
"too-many-arguments",
"too-many-locals",
"too-many-branches",
"too-many-statements",
"too-many-return-statements",
"too-few-public-methods",
"import-error",
"no-member",
"invalid-name",
"missing-docstring",
"unused-import",
"wildcard-import",
"unused-wildcard-import",
]
[tool.pylint.basic]
good-names = ["i", "j", "k", "n", "p", "tp", "tn", "fp", "fn", "N", "p4"]
[tool.pylint.similarities]
min-similarity-lines = 30
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]