forked from flatland-association/flatland-rl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
146 lines (130 loc) · 3.95 KB
/
tox.ini
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
[tox]
env_list = py{3.10,3.11,3.12}-ml,py{3.10,3.11,3.12}-verify-install
[gh-actions]
python =
3.10: py3.10,py10-ml,py3.10-verify-install
3.11: py3.11,py11-ml,py3.11-verify-install
3.12: py3.12,py11-ml,py3.12-verify-install
[testenv]
set_env =
PYTHONPATH = {toxinidir}
# HTTP_PROXY and HTTPS_PROXY are required behind corporate proxies
pass_env =
DISPLAY
XAUTHORITY
HTTP_PROXY
HTTPS_PROXY
[testenv:requirements]
base_python = python3.10
skip_install = true
deps =
pip-tools
commands =
# remove requirements-*.txt as otherwise the dependencies are not properly updated
python -c 'import os; os.remove("requirements.txt") if os.path.exists("requirements.txt") else None'
python -c 'import os; os.remove("requirements-dev.txt") if os.path.exists("requirements-dev.txt") else None'
python -c 'import os; os.remove("requirements-ml.txt") if os.path.exists("requirements-ml.txt") else None'
python -m piptools compile -o requirements.txt pyproject.toml
python -m piptools compile --extra dev -o requirements-dev.txt pyproject.toml
python -m piptools compile --extra ml -o requirements-ml.txt pyproject.toml
[testenv:py{3.10,3.11,3.12}]
platform = linux|linux2|darwin
deps =
-r requirements-dev.txt
set_env =
BENCHMARK_EPISODES_FOLDER = {tox_root}/episodes
commands =
python --version
python -m pytest {posargs} --ignore=tests/ml
[testenv:py{3.10,3.11,3.12}-ml]
platform = linux|linux2|darwin
set_env =
BENCHMARK_EPISODES_FOLDER = {tox_root}/episodes
deps =
-r requirements-dev.txt
-r requirements-ml.txt
commands =
python --version
python -m pytest --retries 2 --retry-delay 5 {posargs} tests/ml
[testenv:lint]
base_python = python3.10
skip_install = true
deps =
-r requirements-dev.txt
commands =
flake8 flatland tests examples benchmarks
[flake8]
exclude = docs
max-line-length = 120
ignore = E121 E126 E123 E128 E133 E226 E241 E242 E704 W291 W293 W391 W503 W504 W505
[testenv:coverage]
base_python = python3.10
skip_install = true
deps =
-r requirements-dev.txt
commands =
python scripts/make_coverage.py
[testenv:profiling]
base_python = python3.10
deps =
-r requirements-dev.txt
set_env =
PROFILING_OUTPUT_FOLDER = {work_dir}/{env_name}/log
commands =
python benchmarks/profile_all_examples.py
[testenv:py{3.10,3.11,3.12}-examples]
platform = linux|linux2|darwin
deps =
-r requirements-dev.txt
commands =
python --version
python benchmarks/run_all_examples.py
[testenv:py{3.10,3.11,3.12}-notebooks]
platform = linux|linux2|darwin
allowlist_externals =
bash
pwd
deps =
-r requirements-dev.txt
commands =
python --version
python -m pytest -s --nbmake \
notebooks/interactiveai.ipynb \
notebooks/graph_demo.ipynb \
notebooks/simple-graph-plot-2022.ipynb \
notebooks/Agent-Close-Following.ipynb \
notebooks/simple_example_manual_control.ipynb \
notebooks/simple_rendering_demo.ipynb \
notebooks/flatland_animate.ipynb \
notebooks/render_episode.ipynb \
notebooks/scene_editor.ipynb \
notebooks/test_saved_envs.ipynb \
notebooks/test_service.ipynb
[testenv:build]
base_python = python3.10
skip_install = true
deps =
-r requirements-dev.txt
commands =
python -m build
[testenv:py{3.10,3.11,3.12}-verify-install]
# install flatland-rl without additional dependencies
skip_install = false
commands =
python --version
python -c 'from flatland.evaluators.service import FlatlandRemoteEvaluationService'
python -c 'import flatland.integrations.interactiveai.interactiveai'
evaluator --help
flatland-demo --help
flatland-evaluator --help
flatland-trajectory-evaluate --help
flatland-trajectory-generate-from-policy --help
[testenv:benchmarks]
platform = linux|linux2|darwin
deps =
-r requirements-dev.txt
set_env =
BENCHMARK_EPISODES_FOLDER = {tox_root}/episodes
commands =
python --version
pytest -s benchmarks/benchmark_episodes.py