Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (127 loc) · 6.04 KB
/
Copy pathpyproject.toml
File metadata and controls
135 lines (127 loc) · 6.04 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
[build-system]
requires = ["setuptools>=74.1.0", "setuptools_scm>=8", "cython>=3.2.9"]
build-backend = "setuptools.build_meta"
[project]
name = "flatland-rl"
description = "Multi Agent Reinforcement Learning on Trains"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
keywords = ["flatland"]
authors = [{ name = "Flatland Association", email = "contact@flatland-association.org" }]
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
]
dependencies = [
"attrs",
"boto3",
"click",
"crowdai_api",
"cython>=3.2.9", # needed at runtime too: flatland/envs/step_utils/state_machine.py uses `cython.int` locals for a hot-path optimization, whether or not the module is actually compiled.
"fastenum",
"importlib_resources",
"ipycanvas",
"ipyevents",
"ipython<9.0.0", # pin as long as we support python 3.10. ERROR: Ignored the following versions that require a different python version: 0.7 Requires-Python >=3.6, <3.7; 0.8 Requires-Python >=3.6, <3.7; 9.0.0 Requires-Python >=3.11; 9.0.0b1 Requires-Python >=3.11; 9.0.0b2 Requires-Python >=3.11; 9.0.1 Requires-Python >=3.11; 9.0.2 Requires-Python >=3.11; 9.1.0 Requires-Python >=3.11; 9.2.0 Requires-Python >=3.11
"ipywidgets",
"matplotlib<3.11", # pin as long as we support python 3.10
"msgpack_numpy",
"msgpack",
"networkx<3.5", # pin as long as we support python 3.10 as 3.5 has dropped support for 3.10 https://networkx.org/documentation/stable/release/release_3.5.html
"numpy<2",
"pandas<3", # pin for now (peristence changed in v3).
"Pillow",
"pyglet",
"pydantic",
"python-dateutil",
"PyYAML",
"redis<8", # pin to <8 - timeout errors, see https://github.com/flatland-association/flatland-baselines/pull/62
"requests",
"recordtype",
"redis",
"urllib3",
"typing_extensions",
"tqdm",
"svgutils",
"timeout_decorator",
"versions==1.6.1", # pin because of https://github.com/nekitdev/versions/issues/95
"contourpy<=1.3.2", # pin as long as we support python 3.10 as 1.3.3 has dropped support for 3.10 https://networkx.org/documentation/stable/release/release_3.5.html
"rpds-py<2026.5.1", # pin as long as we support python 3.10 as 2026.5.1 has dropped support for 3.10 (transitive via jsonschema/referencing, pulled in by both dev and ml extras)
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"coverage",
"opencv-python",
"deptry",
"folium",
"flake8",
"flake8-eradicate",
"ipyplot",
"jupyter",
"nbmake",
"pip-tools",
"pytest",
"pytest-retry",
"pytest-xdist",
"seaborn",
"snakeviz",
"testcontainers",
"tox",
# lets checks.yml's containerized jobs run `tox run -e ... --current-env` against this image's
# already-installed deps instead of hand-copying tox.ini's commands/set_env - see checks.yml for why.
"tox-current-env",
]
ml = [
"dm-tree<0.1.11,!=0.1.9", # pin dm-tree: 0.1.9 has import errors under MacOS M1 at least; <0.1.9 has no cp3.13/cp3.14 wheels, so allow up to 0.1.10 (latest) for python 3.13/3.14 support.
"pettingzoo",
"ray[default,rllib]",
"stable_baselines3",
"supersuit<3.10.0", # pin because of bug: https://github.com/Farama-Foundation/SuperSuit/pull/258
"scipy<1.16.0", # pin as 1.6.0 has dropped support for 3.10 https://pypi.org/project/scipy/1.16.0/
"torch",
"wandb",
]
[project.urls]
"Homepage" = "https://www.flatland-association.org"
"Github Repository" = "https://github.com/flatland-association/flatland-rl"
"Issue Tracker" = "https://github.com/flatland-association/flatland-rl/issues"
[project.scripts]
flatland-demo = "flatland.cli:demo"
# deprecated, use flatland- prefix for all scripts
evaluator = "flatland.cli:evaluator"
flatland-evaluator = "flatland.cli:evaluator"
flatland-trajectory-generate-from-policy = "flatland.trajectories.policy_runner:generate_trajectory_from_policy"
flatland-trajectory-generate-from-metadata = "flatland.trajectories.policy_grid_runner:generate_trajectories_from_metadata"
flatland-trajectory-evaluate = "flatland.evaluators.trajectory_evaluator:evaluate_trajectory"
flatland-trajectory-analysis = "flatland.evaluators.trajectory_analysis:cli"
[tool.setuptools]
# declarative Cython extension build (https://docs.cython.org/en/latest/src/userguide/compilation_setuptools.html).
# cython is a [build-system] requires entry above, so it's available in every build - these modules now compile
# automatically whenever a C compiler is also available, with no extra flags needed. optional = true covers a
# missing/broken *C compiler* gracefully (falls back to the plain-Python sources with a warning instead of
# failing - see tox.ini's verify-build-no-gcc env); it does NOT cover Cython itself being absent, since
# `python -m build` (isolated or not, per PEP 517/518) always mandates every [build-system] requires entry be
# satisfiable, and fails outright rather than falling back if one is missing. Only an sdist is published to
# PyPI (tox.ini's [testenv:build]) - deliberately no wheel - since a wheel's platform/ABI tag is decided by
# whether Cython ever attempted to cythonize a module, not by whether the compile succeeded, so any wheel built
# here would end up platform-tagged rather than universal.
ext-modules = [
{ name = "flatland.envs.step_utils.state_machine", sources = ["flatland/envs/step_utils/state_machine.py"], optional = true },
{ name = "flatland.envs.step_utils.states", sources = ["flatland/envs/step_utils/states.py"], optional = true },
{ name = "flatland.envs.rail_env_shortest_paths", sources = ["flatland/envs/rail_env_shortest_paths.py"], optional = true },
]
[tool.setuptools.packages]
find = { }
[tool.setuptools_scm]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]