-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
120 lines (106 loc) · 3.16 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools >= 61.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "stable-baselines3-extensions"
description = "Custom extensions for stable-baselines3"
readme = "README.md"
requires-python = ">= 3.10"
authors = [{ name = "Lara Bergmann", email = "[email protected]" }]
license = { text = "MIT License" }
keywords = ["Reinforcement Learning Algorithms", "Reinforcement Learning", "Gymnasium", "Gym", "AI", "Machine Learning"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
]
dependencies = [
"gymnasium>=0.29.1",
"stable-baselines3>=2.3.0",
"numpy>=1.20",
"torch>=1.13",
# For saving models
"cloudpickle",
# For reading logs
"pandas",
# Plotting learning curves
"matplotlib",
"tqdm", # stable-baselines3 progress bar callback
"rich", # stable-baselines3 progress bar callback
"tensorboard",
"protobuf==4.25.0" # tensorboard bug
]
dynamic = ["version"]
[project.optional-dependencies]
tests = [
# Run tests and coverage
"pytest",
"pytest-cov",
"pytest-env",
"pytest-xdist",
# Lint code and sort imports (flake8 and isort replacement)
"ruff>=0.3.1",
# Reformat
"black>=24.2.0,<25",
]
[tool.ruff]
# Same as Black.
line-length = 127
# Assume Python 3.8
target-version = "py38"
[tool.ruff.lint]
# See https://beta.ruff.rs/docs/rules/
select = ["E", "F", "B", "UP", "C90", "RUF"]
# B028: Ignore explicit stacklevel`
# RUF013: Too many false positives (implicit optional)
ignore = ["B028", "RUF013"]
[tool.ruff.lint.per-file-ignores]
# Default implementation in abstract methods
"./stable_baselines3_extensions/common/callbacks.py"= ["B027"]
"./stable_baselines3_extensions/common/noise.py"= ["B027"]
# ClassVar, implicit optional check not needed for tests
"./tests/*.py"= ["RUF012", "RUF013"]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 15
[tool.black]
line-length = 127
[tool.mypy]
ignore_missing_imports = true
follow_imports = "silent"
show_error_codes = true
exclude = """(?x)(
tests/test_logger.py$
| tests/test_train_eval_mode.py$
)"""
[tool.pytest.ini_options]
# Deterministic ordering for tests; useful for pytest-xdist.
env = [
"PYTHONHASHSEED=0"
]
filterwarnings = [
# Tensorboard warnings
"ignore::DeprecationWarning:tensorboard",
# Gymnasium warnings
"ignore::UserWarning:gymnasium",
]
markers = [
"expensive: marks tests as expensive (deselect with '-m \"not expensive\"')"
]
[tool.coverage.run]
disable_warnings = ["couldnt-parse"]
branch = false
omit = [
"tests/*",
"setup.py",
# Require graphical interface
"stable_baselines3_extensions/common/results_plotter.py",
# Require ffmpeg
"stable_baselines3_extensions/common/vec_env/vec_video_recorder.py",
]
[tool.coverage.report]
exclude_lines = [ "pragma: no cover", "raise NotImplementedError()", "if typing.TYPE_CHECKING:"]