-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
109 lines (96 loc) · 2.66 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
[tox]
env_list = py{310,311,312},notebooks
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
[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{310,311,312}]
platform = linux|linux2|darwin
deps =
-r requirements-dev.txt
commands =
python -m pytest {posargs}
[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:benchmarks]
base_python = python3.10
deps =
-r requirements-dev.txt
commands =
python benchmarks/benchmark_all_examples.py
[testenv:profiling]
base_python = python3.10
deps =
-r requirements-dev.txt
commands =
python benchmarks/profile_all_examples.py
[testenv:examples]
base_python = python3.10
deps =
-r requirements-dev.txt
commands =
python benchmarks/run_all_examples.py
[testenv:notebooks]
base_python = python3.10
allowlist_externals =
bash
pwd
deps =
-r requirements-dev.txt
commands =
python -m pytest --nbmake \
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