-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
217 lines (203 loc) · 5.8 KB
/
pyproject.toml
File metadata and controls
217 lines (203 loc) · 5.8 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
surfaces = ["py.typed"]
[project]
name = "surfaces"
version = "0.9.0"
description = "A collection and visualization of black-box objective functions"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = ["test-functions", "optimization", "gradient-free-optimization", "visualization", "data-science", "cec", "bbob", "machine-learning", "surrogate-models"]
authors = [
]
maintainers = [
]
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
]
dependencies = [
"numpy>=1.18.1",
]
[project.optional-dependencies]
# Visualization (matplotlib + plotly)
viz = [
"matplotlib",
"plotly",
]
# Machine learning test functions
ml = [
"scikit-learn",
"catboost>=1.2.0",
"xgboost>=1.7.0",
"lightgbm>=4.0.0",
]
# CEC benchmark data files
cec = [
"surfaces-cec-data==0.0.1",
]
# Time-series functions with sktime
timeseries = [
"surfaces[ml]",
"sktime>=0.24.0",
]
# Image classification with CNNs (requires tensorflow)
images = [
"surfaces[ml]",
"tensorflow>=2.10.0",
]
# XGBoost-based functions
xgboost = [
"surfaces[ml]",
"xgboost>=1.7.0",
]
# Pre-trained ONNX surrogate models
surrogates = [
"surfaces-onnx-files==0.0.1",
"onnxruntime>=1.16.0",
]
# All optional features
full = [
"surfaces[viz,ml,cec,timeseries,images,xgboost,surrogates]",
]
# Development
dev = [
"surfaces[full]",
"ruff",
"pre-commit",
"check-manifest",
]
# Testing (with all optional deps)
test = [
"surfaces[full]",
"pytest>=7.0.0",
"pytest-cov",
"ruff",
"gradient-free-optimizers",
]
# Testing (minimal, no optional deps)
test-minimal = [
"pytest>=7.0.0",
"pytest-cov",
]
# Build
build = [
"build",
]
surrogate-train = [
"onnxruntime>=1.16.0",
"skl2onnx>=1.16.0",
"rich>=13.0.0",
]
# Surrogate dashboard (developer tool)
dashboard = [
"surfaces[ml,surrogate-train]",
"streamlit>=1.28.0",
"plotly>=5.0.0",
"pandas>=1.3.0",
]
[project.scripts]
surfaces-dashboard = "surfaces._surrogates._dashboard:run_dashboard"
[project.urls]
"Homepage" = "https://github.com/SimonBlanke/Surfaces"
"Bug Reports" = "https://github.com/SimonBlanke/Surfaces/issues"
"Source" = "https://github.com/SimonBlanke/Surfaces/"
# =============================================================================
# Coverage Configuration
# =============================================================================
[tool.coverage.run]
source = ["surfaces"]
relative_files = true
omit = [
"src/surfaces/_surrogates/_dashboard/*",
"src/surfaces/_surrogates/_surrogate_trainer.py",
"src/surfaces/_surrogates/_ml_surrogate_trainer.py",
"src/surfaces/_surrogates/_surrogate_validator.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ ==",
]
# =============================================================================
# Ruff Configuration
# =============================================================================
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"*.egg-info",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
ignore = [
"E501", # line too long (handled by formatter)
"E731", # lambda assignment
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S311", "S603", "S607", "F841"]
"examples/*" = ["S101", "F841"]
"docs/*" = ["S101", "S603", "S607", "F841", "S110"]
"scripts/*" = ["F403", "F405", "E402", "S603"]
"*/__init__.py" = ["F401", "F403", "F405", "E402"]
"collect_*.py" = ["S603", "S607"]
# CEC benchmark implementations follow mathematical conventions
"src/surfaces/test_functions/cec/*" = ["F841", "E741"]
# Engineering functions use standard notation (l for length)
"src/surfaces/test_functions/engineering/*" = ["E741", "F841"]
# Dashboard uses Streamlit patterns
"src/surfaces/_surrogates/_dashboard/*" = ["F841"]
[tool.ruff.lint.isort]
known-first-party = ["surfaces"]
# =============================================================================
# Pytest Configuration
# =============================================================================
[tool.pytest.ini_options]
testpaths = ["tests", "docs", "examples"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-p no:warnings"
markers = [
"smoke: Quick sanity checks (<1s each)",
"slow: Tests that take >5s",
"ml: Machine learning functions (require sklearn)",
"cec: CEC competition functions (all years)",
"cec2013: CEC 2013 benchmark functions",
"cec2014: CEC 2014 benchmark functions",
"cec2017: CEC 2017 benchmark functions",
"bbob: BBOB benchmark functions",
"algebraic: Algebraic/mathematical functions",
"engineering: Engineering design functions",
"requires_data: Requires external data files",
"viz: Visualization tests (require plotly/matplotlib)",
"dashboard: Streamlit dashboard tests",
]