-
Notifications
You must be signed in to change notification settings - Fork 34
/
pyproject.toml
222 lines (199 loc) · 6.3 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
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
[virtualenvs]
create = true
in-project = true
[build-system]
requires = ["setuptools >= 61.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "sheeprl"
description = "High-quality, single file and distributed implementation of Deep Reinforcement Learning algorithms with production-friendly features"
authors = [
{ name = "Federico Belotti", email = "[email protected]" },
{ name = "Davide Angioni", email = "[email protected]" },
{ name = "Refik Can Malli", email = "[email protected]" },
{ name = "Michele Milesi", email = "[email protected]" },
]
maintainers = [
{ name = "Federico Belotti", email = "[email protected]" },
{ name = "Davide Angioni", email = "[email protected]" },
{ name = "Refik Can Malli", email = "[email protected]" },
{ name = "Michele Milesi", email = "[email protected]" },
]
keywords = ["reinforcement", "machine", "learning", "distributed", "production"]
license = { file = "LICENSE" }
readme = { file = "docs/README.md", content-type = "text/markdown" }
requires-python = ">=3.8,<3.12"
classifiers = ["Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence"]
dependencies = [
"gymnasium==0.29.*",
"pygame >=2.1.3",
"moviepy>=1.0.3",
"tensorboard>=2.10",
"python-dotenv>=1.0.0",
"lightning>=2.0",
"lightning-utilities<=0.9",
"hydra-core==1.3.0",
"torchmetrics",
"rich==13.5.*",
"opencv-python==4.8.0.*",
"torch>=2.0,!=2.2.0",
"numpy<2.0"
]
dynamic = ["version"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["sheeprl", "sheeprl.*", "hydra_plugins"]
exclude = ["tests*", "build*", "dist*", "notebooks*"]
[tool.setuptools.dynamic]
version = {attr = "sheeprl.__init__.__version__"}
readme = {file = ["docs/README.md"], content-type = "text/markdown"}
[project.scripts]
sheeprl = "sheeprl.cli:run"
sheeprl-eval = "sheeprl.cli:evaluation"
sheeprl-agents = "sheeprl.available_agents:available_agents"
sheeprl-registration = "sheeprl.cli:registration"
[project.urls]
homepage = "https://eclecticsheep.ai"
repository = "https://github.com/Eclectic-Sheep/sheeprl"
[project.optional-dependencies]
test = ["pytest==7.3.1", "pytest-timeout==2.1.0", "pytest-coverage", "importlib_resources>=6.2.0"]
dev = [
"pre-commit==3.5.0",
"mypy==1.2.0",
"black==23.12.1",
"isort==5.13.2",
"autoflake==2.2.1",
"ruff==0.1.11",
]
mujoco = ["mujoco>=2.3.3", "gymnasium[mujoco]==0.29.*"]
dmc = ["dm_control>=1.0.12"]
box2d = ["gymnasium[box2d]==0.29.*"]
atari = [
"gymnasium[atari]==0.29.*",
"gymnasium[accept-rom-license]==0.29.*",
"gymnasium[other]==0.29.*",
]
minedojo = ["minedojo==0.1", "importlib_resources==5.12.0", "gym==0.21.0"]
minerl = ["setuptools==66.0.0", "minerl==0.4.4", "gym==0.19.0"]
diambra = ["diambra==0.0.17", "diambra-arena==2.2.6"]
crafter = ["crafter==1.8.3"]
mlflow = ["mlflow==2.11.1"]
supermario = ["gym-super-mario-bros==7.4.0", "gym<0.26"]
[tool.ruff]
line-length = 120
# Enable Pyflakes `E` and `F` codes by default.
select = [
"E",
"W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
]
ignore = [
"E731", # Do not assign a lambda expression, use a def
"E402", # Module level import not at top of file
]
# Exclude a variety of commonly ignored directories.
exclude = [".git", "docs", "_notebooks", "examples"]
ignore-init-module-imports = true
# Black formatting
[tool.black]
line_length = 120
include = '\.pyi?$'
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
# iSort
[tool.isort]
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 120
multi_line_output = 3
include_trailing_comma = true
skip_gitignore = true
# Pytest
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "--strict-markers --disable-pytest-warnings"
markers = ["benchmark: mark test as a benchmark"]
# Pytest coverage
[tool.coverage.run]
omit = ["./sheeprl/envs/*", "./sheeprl/available_agents.py", "sheeprl/utils/mlflow.py"]
[tool.prettier]
tab_width = 2
[tool.interrogate]
ignore_init_method = true
ignore_init_module = false
ignore_magic = false
ignore_semiprivate = false
ignore_private = false
ignore_module = true
ignore_property_decorators = false
fail_under = 95
verbose = 2
omit_covered_files = false
quiet = false
whitelist_regex = []
color = true
exclude = ["notebooks"]
ignore_regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
[tool.mypy]
# -> Level 1# custom settings
show_error_codes = true
ignore_missing_imports = true
plugins = "numpy.typing.mypy_plugin"
# suggested settings# # https://mypy.readthedocs.io/en/stable/existing_code.html?highlight=no_implicit_optional#introduce-stricter-options
# Start off with these
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_optional = true
# this is for reusing same variable with different types
allow_redefinition = true
# -> Level 2# Getting these passing should be easy
strict_equality = true
strict_concatenate = true
# Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
# -> Level 3# These shouldn't be too much additional work, but may be tricky to get passing if you use a lot of untyped libraries
disallow_subclassing_any = false
disallow_untyped_decorators = false
disallow_any_generics = false
disallow_any_unimported = false
# These next few are various gradations of forcing use of type annotationsdisallow_untyped_calls = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
# -> Level 4# This one isn't too hard to get passing, but return on investment is lower
no_implicit_reexport = false
# This one can be tricky to get passing if you use a lot of untyped libraries
warn_return_any = false
[tool.bumpver]
current_version = "0.5.7"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "bump version {old_version} -> {new_version}"
tag_message = "v{new_version}"
tag_scope = "default"
pre_commit_hook = ""
post_commit_hook = ""
commit = true
tag = true
push = true
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
]
"sheeprl/__init__.py" = [
'^__version__ = "{version}"$',
]