-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (124 loc) · 3.88 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (124 loc) · 3.88 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
[build-system]
requires = ["setuptools>=82.0.1", "wheel>=0.47.0"]
build-backend = "setuptools.build_meta"
[project]
name = "pickomino-env"
version = "1.4.1"
description = "Pickomino (Heckmeck) Gymnasium environment"
readme = "README.md"
requires-python = ">=3.10,<3.15" # Update ".python-version" when supporting a new version.
authors = [{ name = "Jarl and Robin" }]
dependencies = [
"gymnasium>=1.1.1,<2.0.0",
"numpy>=1.26.0,<3.0.0",
"pygame-ce>=2.5.2,<3.0.0",
]
[project.scripts]
pickomino-play = "pickomino_env.modules.play:main"
[project.optional-dependencies]
test = [
"pytest>=8.3.5,<9.0.0",
"pytest-cov>=7.0,<8.0",
"pytest-timeout>=2.0,<3.0",
"matplotlib>=3.10.9,<4.0",
"stable-baselines3>=2.8.0, <3.0",
]
dev = ["loguru>=0.7.3,<1.0.0"]
[tool.setuptools.packages.find]
where = ["."]
include = ["pickomino*"]
[tool.pydocstyle]
convention = "google"
match = '(?!test_).*\.py'
[tool.black]
line-length = 120
[tool.pytest.ini_options]
pythonpath = ["."]
markers = [
"slow: marks tests as slow (skipped in pre-commit, run in CI",
"timeout: timeout decorator for tests",
]
[tool.coverage.report]
fail_under = 95
[tool.coverage.run]
omit = ["config*.py"]
[tool.setuptools.package-data]
"pickomino_env" = ["py.typed", "sprites/*.png"]
[tool.ruff]
line-length = 120
target-version = "py310"
exclude = [
"tests/",
"local/"
]
[tool.pylint.format]
max-line-length = 120
[tool.pylint."messages control"]
enable = [
"bad-inline-option",
"deprecated-pragma",
"file-ignored",
"use-symbolic-message-instead",
"useless-suppression",
]
disable = ["consider-using-assignment-expr"] # Assignments in a boolean expression is a bad idea
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"EM101", # Gymnasium uses descriptive f-strings directly in exeptions. (raise ValueError(f"<message>"))
"EM102", # EM101. EM102, TRY003 conflict with this standard.
"TRY003",
"D203", # Conflicts with D211 (no blank line before class wins)
"D213", # Conflicts with D212 (first line summary wins)
"D413", # No blank line after docstring allowed (Google style).
"COM812", # A trailing comma missing, black wins
]
[tool.pylint.master]
fail-on = ["I"]
load-plugins = [
"pylint.extensions.bad_builtin",
"pylint.extensions.broad_try_clause",
"pylint.extensions.check_elif",
"pylint.extensions.code_style",
"pylint.extensions.comparison_placement",
"pylint.extensions.confusing_elif",
"pylint.extensions.consider_refactoring_into_while_condition",
"pylint.extensions.consider_ternary_expression",
"pylint.extensions.dict_init_mutate",
"pylint.extensions.docparams",
"pylint.extensions.docstyle",
"pylint.extensions.dunder",
"pylint.extensions.eq_without_hash",
"pylint.extensions.empty_comment",
"pylint.extensions.for_any_all",
"pylint.extensions.magic_value",
"pylint.extensions.mccabe",
"pylint.extensions.no_self_use",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.private_import",
"pylint.extensions.redefined_loop_name",
"pylint.extensions.redefined_variable_type",
"pylint.extensions.set_membership",
"pylint.extensions.typing",
"pylint.extensions.while_used"
]
[tool.pylint.variables]
generated-members = ["pygame"]
allow-global-unused-variables = false
[tool.pylint.string]
check-quote-consistency = true
[tool.pyright]
include = ["pickomino_env/**"]
exclude = ["tests/**", "**/__pycache__"]
strict = []
typeCheckingMode = "strict"
pythonVersion = "3.10"
pythonPlatform = "All"
# This is required as the CI pre-commit does not download the module (numpy, pygame, and more).
# Therefore, we have to ignore missing imports.
reportMissingImports = "none"
# Cannot infer types from unresolved imports in pre-commit environment
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnnecessaryIsInstance = "none"
reportUnknownArgumentType = "none"