-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
363 lines (330 loc) · 10.5 KB
/
pyproject.toml
File metadata and controls
363 lines (330 loc) · 10.5 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
[project]
dynamic = ["version"]
name = "algatross"
description = "A multi-objective multi-agent reinforcement learning library."
authors = [
{ name = "Tom Gresavage", email = "thomas.gresavage.ext@afresearchlab.com" },
{ name = "Washington Garcia", email = "washington.garcia.ext@afresearchlab.com" },
{ name = "Ian Cannon", email = "cannonhammer@gmail.com" },
{ name = "Joseph Saurine", email = "joseph.saurine.ext@afresearchlab.com" },
]
maintainers = [
{ name = "Tom Gresavage", email = "thomas.gresavage.ext@afresearchlab.com" },
{ name = "Washington Garcia", email = "washington.garcia.ext@afresearchlab.com" },
]
license = { file = "LICENSE" }
readme = "README.md"
keywords = []
requires-python = ">=3.10,<3.11"
classifiers = ["Programming Language :: Python :: 3", "Operating System :: OS Independent"]
dependencies = [
"cython ~=3.0",
"numpy ~=1.25",
"dask[distributed,dataframe] >=2023.12,<2024.11.1",
"decorator ~=4.0",
"harl",
"moviepy ~=2.0",
"pettingzoo >=1.22",
"pymoo ~=0.6",
"ray[all] >2,<3",
"ribs",
"rich ~=13.0",
"safe_autonomy_sims ~=4.2",
"scikit-learn ~=1.0",
"scipy ~=1.12",
"shapely ~=2.0",
"smacv2",
"statsmodels ~=0.14.1",
"supersuit >=3.9.3,<4",
"torch >=1.12.0,!=2.0.1,<3",
"torch_geometric ~=2.3",
"torchvision<1",
"tensorflow ~=2.11",
"tensorboard ~=2.11",
"tensorflow-probability<1",
"pillow>=10.4.0",
]
[project.urls]
homepage = "https://github.com/act3-ace/Algatross.git"
repository = "https://github.com/act3-ace/Algatross.git"
documentation = 'https://stalwart.git.act3-ace.com/ascension/mo-marl/index.html'
[dependency-groups]
dev = ["pre-commit >=4,<5", "memray >=1.14.0,<2"]
lint = ["lockfile<1", "ruff ~=0.6", "anybadge>1,<2", "mypy ~=1.9", "types-PyYAML>6", "types-pytz>=v2024.2.0.20241003"]
test = [
"pytest >=7.1.2",
"pytest-cov >=4.1.0",
"pyinstrument ~=5.0",
"coverage-badge ~=1.1",
"twine ~=5.1",
"treelib ~=1.7",
"memray ~=1.14",
]
docs = [
"linkify-it-py ~=2.0",
"pydata-sphinx-theme ~=0.16.1",
"sphinx ~=8.0",
"sphinx-copybutton ~=0.5.2",
"sphinx-design~=0.6.0",
"sphinx-togglebutton ~=0.3.2",
"sphinxcontrib-applehelp ~=1.0",
"sphinxcontrib-devhelp ~=1.0",
"sphinxcontrib-htmlhelp ~=2.0",
"sphinxcontrib-jquery ~=4.1",
"sphinxcontrib-jsmath ~=1.0",
"sphinxcontrib-qthelp ~=1.0",
"sphinxcontrib-serializinghtml ~=1.1",
"sphinxemoji ~=0.2.0",
"sphinx-math-dollar ~=1.2",
"myst-parser>=4.0.0",
"sphinx-autoapi>=3.4.0",
]
pipeline = ["badges-gitlab~=1.0", "coverage-badge ~=1.1"]
[project.optional-dependencies]
gym = ["build ~=1.0", "gymnasium>=0,<2", "mo-gymnasium[box2d,mujoco] ~=1.0"]
smac = ["smacv2"]
[tool.uv]
default-groups = ["dev", "test", "lint"]
prerelease = "allow"
[tool.uv.sources]
ribs = { git = "https://github.com/icaros-usc/pyribs.git", rev = "0bc337209a7ce47e0aa898da85371ea5db663d66" } # pragma: allowlist secret
harl = { git = "https://github.com/PKU-MARL/HARL.git", rev = "7342761f0098cbb5427f60641fec816b54e27fdb" } # pragma: allowlist secret
smacv2 = { git = "https://github.com/oxwhirl/smacv2.git", rev = "577ab5a2cff2391f8df582da5731ea9cd6adf3c6" } # pragma: allowlist secret
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "VERSION"
pattern = "(?P<version>[^']+)"
########
# Ruff #
########
[tool.ruff]
exclude = [
".svn",
"CVS",
".bzr",
".hg",
".git",
"__pycache__",
".tox",
".nox",
".eggs",
"*.egg",
"test/*",
"scripts/*",
"scratches/*",
".venv",
".dagger",
"**/site-packages/**/*.pyi",
"**/.vscode/extensions/**",
]
line-length = 140
target-version = "py310"
preview = true # necessary for E266 and FURB
fix = true
[tool.ruff.format]
quote-style = "double"
docstring-code-format = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # mccabe, flake8-comprehensions
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"DOC", # pydoclint
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle - Error
"EM", # flake8-errmsg
"ERA", # eradicate
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FAST", # FastAPI
"FLY", # flynt
"FURB", # refurb
"G002", # flake8-logging-format
"G010", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # Pandas vet
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T", # flake8-debugger, flake8-print
"TC", # flake8-type-checking
"TD", # flake8-todos
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle - Warning
"YTT", # flake8-2020
]
ignore = ["ARG005", "ANN002", "ANN003", "C901", "D203", "D213", "E203", "E731", "T201", "TD002", "TD003"]
external = ["W503", "W504"]
fixable = ["ALL"]
unfixable = ["ERA"]
extend-safe-fixes = ["D200", "D400", "TC004"]
[tool.ruff.lint.per-file-ignores]
# don't complain about missing docstrings in __init__.py
"**__init__.py" = ["D104", "D400", "PLC0414"]
"**/algatross/quality_diversity/archives/dask_array_store.py" = ["PLC2701", "SLF001", "D101", "D102", "D103", "D104", "D105"]
"**/algatross/quality_diversity/emitters/random.py" = ["A005"]
"**/algatross/utils/*.py" = ["A005"]
[tool.ruff.lint.pylint]
# min-public-methods = 1 # not supported
max-args = 15
max-locals = 25
# max-attributes=15 # not supported
# max-parents=15 # not supported
max-branches = 20
# ignored PyLint codes:
# C0103: ignored by default since 'N' codes were not selected
# R0801: not supported
# R0902: not supported
# R0903: not supported
# W0511: ignored by default since 'FIX' codes were not selected
# W1202: ignored by default since 'G' codes were not selected
# W1203: ignored by default since 'G' codes were not selected
# R0401: not supported
# E0213: ignored by default since 'N' codes were not selected
# E1101: not supported
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
suppress-dummy-args = true
suppress-none-returning = true
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
matplotlib = "mpl"
pettingzoo = "pz"
"dask.array" = "da"
"dask.dataframe" = "dd"
[tool.ruff.lint.isort]
split-on-trailing-comma = false
case-sensitive = true
combine-as-imports = true
force-wrap-aliases = true
lines-between-types = 1
section-order = ["future", "standard-library", "data", "numpy", "pymoo", "ray", "torch", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.isort.sections]
"numpy" = ["numpy"]
"torch" = ["torch", "torchgeometric", "torchvision"]
"ray" = ["ray"]
"pymoo" = ["pymoo"]
"data" = ["pandas", "matplotlib", "seaborn"]
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.sync-pre-commit-lock]
# Run `pre-commit install` automatically if applicable
automatically-install-hooks = true
# Should we sync your pre-commit versions with your lockfile (when running lock, add, update, remove, etc.)?
disable-sync-from-lock = false
ignore = ["types-pyyaml", "types-pytz"]
# Packages to ignore when syncing from lock,
# Name of the pre-commit config file to sync with
pre-commit-config-file = ".pre-commit-config.yaml"
########
# MyPy #
########
# For a list of configurations go to https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
ignore_missing_imports = true
files = "algatross"
follow_imports = "silent"
# keep code clean by removing unused ignores
warn_unused_ignores = true
warn_redundant_casts = true
disable_error_code = "annotation-unchecked"
# don't typecheck None -> otherwise Optional[<type>] will cause type errors
strict_optional = false
pretty = true
exclude = ['.*/site-packages/.*\.pyi', '.*/\.vscode/extensions/.*', "scratches", "scripts", "docs", ".dagger"]
########################
# pydocstringformatter #
########################
[tool.pydocstringformatter]
write = true
exclude = ["docs/**"]
strip-whitespaces = true
max-line-length = 140
style = "numpydoc"
linewrap-full-docstring = true
#################
# numppydoclint #
#################
[tool.numpydoc_validation]
checks = ["all", "EX01", "SA01", "ES01", "GL01", "GL08", "RT05", "PR09"]
exclude = ["test_det_experiment", "test_mem_experiment", '.dagger']
override_PR01 = ["(kw)?args", '\*(\*)?\w']
override_PR04 = ["(kw)?args"]
override_PR02 = ["`.*`"]
override_SS05 = ['^\w+s{2}']
##########
# PyTest #
##########
# For a list of configurations go to https://docs.pytest.org/en/stable/customize.html
[tool.pytest.ini_options]
testpaths = ["test"]
addopts = "--strict-markers -m 'not slow' --disable-pytest-warnings --cov=algatross"
markers = [
# slow: marks tests as slow (deselect with '-m "not slow"')
"serial",
"skipif_activemq_down",
"ray_debug_mode",
"integration",
]
junit_family = "xunit1"
###########################
# pytest coverage section #
###########################
# For a list of configurations go to https://pytest-cov.readthedocs.io/en/latest/config.html
# must manually tell pytest coverage to use this file with --cov-config=setup.cfg
[tool.coverage.run]
branch = true
source = ["**/algatross/"]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]
# ############# #
# badges-gitlab #
# ############# #
[tool.badges_gitlab]
path = "public/badges"
junit_xml = "pytest-junit.xml"