-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (186 loc) · 6.98 KB
/
pyproject.toml
File metadata and controls
197 lines (186 loc) · 6.98 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools]
license-files = []
[project]
name = "gradient-free-optimizers"
version = "1.10.1"
description = "Lightweight optimization with local, global, population-based and sequential techniques across mixed search spaces "
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"optimization",
"hyperparameter-optimization",
"hyperparameter-tuning",
"machine-learning",
"meta-heuristic",
"bayesian-optimization",
"genetic-algorithm",
"particle-swarm",
"evolution-strategy",
"hill-climbing",
"simulated-annealing",
"gradient-free",
"black-box-optimization",
"numerical-optimization",
"automl",
"search-algorithms",
"optimization-algorithms",
"data-science",
"visualization",
]
authors = [
{name = "Simon Blanke", email = "simon.blanke@yahoo.com" }
]
maintainers = [
{name = "Simon Blanke", email = "simon.blanke@yahoo.com" }
]
classifiers=[
"Development Status :: 5 - Production/Stable",
"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",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Natural Language :: English",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
]
dependencies = [
"numpy >=1.18.1, <3.0.0",
"scipy <2.0.0",
"pandas <3.0.0",
]
[project.optional-dependencies]
progress = [
"tqdm >=4.48.0, <5.0.0",
]
sklearn = [
"scikit-learn >=0.21, !=0.23.*",
]
full = [
"scipy <2.0.0",
"scikit-learn >=0.21, !=0.23.*",
"tqdm >=4.48.0, <5.0.0",
]
build = [
"setuptools",
"build",
"wheel",
]
test = [
"pytest == 9.0.2",
"flake8",
"pytest-cov",
"surfaces",
"scikit-learn >=0.21, !=0.23.*",
]
[project.urls]
"Homepage" = "https://github.com/SimonBlanke/Gradient-Free-Optimizers"
"Bug Reports" = "https://github.com/SimonBlanke/Gradient-Free-Optimizers/issues"
"Source" = "https://github.com/SimonBlanke/Gradient-Free-Optimizers/"
[tool.ruff]
line-length = 88
exclude = [".git", "examples/*"]
target-version = "py310"
extend-include = ["*.ipynb"]
[tool.ruff.lint]
select = [
# https://pypi.org/project/pycodestyle
"D",
"E",
"W",
# https://pypi.org/project/pyflakes
"F",
# https://pypi.org/project/flake8-bandit
"S",
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
"UP",
"I002", # Missing required imports
"UP008", # Super calls with redundant arguments passed.
"G010", # Deprecated log warn.
"PLR1722", # Use sys.exit() instead of exit() and quit().
"PT014", # pytest-duplicate-parametrize-test-cases.
"PT006", # Checks for the type of parameter names passed to pytest.mark.parametrize.
"PT007", # Checks for the type of parameter values passed to pytest.mark.parametrize.
"PT018", # Checks for assertions that combine multiple independent condition
"RUF001", # Checks for non unicode string literals
"RUF002", # Checks for non unicode string literals
"RUF003", # Checks for non unicode string literals
]
extend-select = [
"I", # isort
"C4", # https://pypi.org/project/flake8-comprehensions
]
ignore=[
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"E203", # Whitespace-before-punctuation.
"E402", # Module-import-not-at-top-of-file.
"E731", # Do not assign a lambda expression, use a def.
"RET504", # Unnecessary variable assignment before `return` statement.
"S101", # Use of `assert` detected.
"RUF100", # https://docs.astral.sh/ruff/rules/unused-noqa/
"C408", # Unnecessary dict call - rewrite as a literal.
"UP031", # Use format specifier instead of %
"S102", # Use of excec
"C414", # Unnecessary `list` call within `sorted()`
"S301", # pickle and modules that wrap it can be unsafe
"C416", # Unnecessary list comprehension - rewrite as a generator
"S310", # Audit URL open for permitted schemes
"S202", # Uses of `tarfile.extractall()`
"S307", # Use of possibly insecure function
"C417", # Unnecessary `map` usage (rewrite using a generator expression)
"S605", # Starting a process with a shell, possible injection detected
"E741", # Ambiguous variable name
"S107", # Possible hardcoded password
"S105", # Possible hardcoded password
"PT018", # Checks for assertions that combine multiple independent condition
"S602", # sub process call with shell=True unsafe
"C419", # Unnecessary list comprehension, some are flagged yet are not
"C409", # Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
"S113", # Probable use of httpx call without timeout
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
# Tests: require module docstrings, but not individual test function/method docstrings
"tests/**/*.py" = ["D101", "D102", "D103", "D104", "D401", "S311", "S603", "S607", "F401"]
# Docs scripts don't need docstrings
"docs/**/*.py" = ["D100", "D103"]
# Notebooks are exploratory, more relaxed rules
"notebooks/**/*.py" = ["D100", "D103", "E501"]
# Internal packages don't need package docstrings
"src/gradient_free_optimizers/**/__init__.py" = ["D104"]
# Private modules with underscore prefix don't need module docstrings
"src/gradient_free_optimizers/_*.py" = ["D100", "D101", "D102", "D103", "D205", "D401"]
"src/gradient_free_optimizers/**/_*.py" = ["D100", "D101", "D102", "D103", "D205", "D401"]
# Array/math backends use star imports intentionally for numpy-like API
"src/gradient_free_optimizers/_array_backend/__init__.py" = ["D104", "F403", "F405"]
"src/gradient_free_optimizers/_math_backend/__init__.py" = ["D104", "F403", "F405"]
# Pure Python backends use random for optimization, not crypto
"src/gradient_free_optimizers/_array_backend/_pure.py" = ["D100", "S311"]
"src/gradient_free_optimizers/_math_backend/_pure.py" = ["D100", "S311"]
# Internal optimizer implementations - relaxed docstring rules, S311 for random
"src/gradient_free_optimizers/optimizers/**/*.py" = ["D100", "D101", "D102", "D103", "D205", "D401", "S311"]
# Legacy optimizer implementations (renamed from optimizers/) - same relaxed rules
"src/gradient_free_optimizers/optimizers_legacy/**/*.py" = ["D100", "D101", "D102", "D103", "D205", "D401", "S311"]
# Search module - relaxed docstring rules
"src/gradient_free_optimizers/search.py" = ["D100", "D101", "D102", "D103"]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with \"-m not slow\")",
]