-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
117 lines (94 loc) · 2.14 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.hatch.envs.test]
dependencies = [
"coverage[toml]",
"cython",
"jax[cpu]",
"scipy",
"matplotlib",
"pyvirtualdisplay",
]
[tool.hatch.envs.test.env-vars]
DEBUG_CPPRB = "1"
[tool.hatch.envs.test.scripts]
install = "pip install . {args}"
run = "python -m unittest discover test"
run-cov = "coverage run -m unittest discover test"
[[tool.hatch.envs.test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
gym = ["gym", "gymnasium"]
numpy = ["numpy1", "numpy2"]
[tool.hatch.envs.test.overrides]
matrix.python.dependencies = [
{ value = "ray", if = ["3.9", "3.10", "3.11"] },
]
matrix.gym.dependencies = [
{ value = "gym", if = ["gym"] },
{ value = "gymnasium", if = ["gymnasium"] },
]
matrix.numpy.dependencies = [
{ value = "numpy<2.0.0", if = ["numpy1"] },
{ value = "numpy>=2.0.0rc2", if = ["numpy2"] },
]
[tool.hatch.envs.test-38]
template = "test"
python = "3.8"
extra-dependencies = [
"numpy<2.0.0",
"ray",
]
[[tool.hatch.envs.test-38.matrix]]
gym = ["gym", "gymnasium"]
[tool.hatch.envs.test-38.overrides]
matrix.gym.dependencies = [
{ value = "gym", if = ["gym"] },
{ value = "gymnasium", if = ["gymnasium"] },
]
[tool.hatch.envs.cov]
dependencies = [
"coverage[toml]",
"cython",
]
[tool.hatch.envs.cov.scripts]
erase = "coverage erase"
combine = "coverage combine"
report = "coverage report"
[tool.hatch.envs.docs]
dependencies = [
"sphinx",
"sphinx-automodapi",
"sphinx_rtd_theme",
]
[tool.coverage.run]
branch = true
plugins = ["Cython.Coverage"]
parallel = true
relative_files = true
omit = ["test/test_*.py"]
source = ["cpprb"]
[tool.coverage.paths]
source = [
"src/cpprb",
"*/site-packages/cpprb",
]
[tool.coverage.report]
show_missing = true
[tool.ruff]
extend-exclude = [
"sphinx",
"example",
"test/test_*.py",
]
[tool.ruff.lint]
select = ["NPY201"]
ignore = [
"PT009", # We still use standard unittest
"N999" , # This breaks API compatibility
"FBT001", # This breaks API compatibility
"FBT002", # This breaks API compatibility
"EM101",
"EM102",
"TRY003",
]