Files
Gymnasium/pyproject.toml
2025-06-07 17:57:58 +01:00

169 lines
4.9 KiB
TOML

# Package ######################################################################
[build-system]
requires = ["setuptools >= 61.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "gymnasium"
description = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)."
readme = "README.md"
requires-python = ">= 3.10"
authors = [{ name = "Farama Foundation", email = "contact@farama.org" }]
license = { text = "MIT License" }
keywords = ["Reinforcement Learning", "game", "RL", "AI", "gymnasium"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
]
dependencies = [
"numpy >=1.21.0",
"cloudpickle >=1.2.0",
"typing-extensions >=4.3.0",
"farama-notifications >=0.0.1",
]
dynamic = ["version"]
[project.optional-dependencies]
# Update dependencies in `all` if any are added or removed
atari = ["ale_py >=0.9"]
box2d = ["box2d-py ==2.3.5", "pygame >=2.1.3", "swig ==4.*"]
classic-control = ["pygame >=2.1.3"]
classic_control = ["pygame >=2.1.3"] # kept for backward compatibility
mujoco = ["mujoco >=2.1.5", "imageio >=2.14.1", "packaging >=23.0"]
toy-text = ["pygame >=2.1.3"]
toy_text = ["pygame >=2.1.3"] # kept for backward compatibility
jax = [
"jax >=0.4.16",
"jaxlib >=0.4.16",
"flax >=0.5.0",
"array-api-compat >=1.11.0",
"numpy>=2.1",
]
torch = ["torch >=1.13.0", "array-api-compat >=1.11.0", "numpy>=2.1"]
array-api = ["array-api-compat >=1.11.0", "numpy>=2.1"]
other = [
"moviepy >=1.0.0",
"matplotlib >=3.0",
"opencv-python >=3.0",
"seaborn >= 0.13",
]
all = [
# All dependencies above except accept-rom-license
# NOTE: No need to manually remove the duplicates, setuptools automatically does that.
# atari
"ale_py >=0.9",
# box2d
"box2d-py ==2.3.5",
"pygame >=2.1.3",
"swig ==4.*",
# classic-control
"pygame >=2.1.3",
# mujoco
"mujoco >=2.1.5",
"imageio >=2.14.1",
"packaging >=23.0",
# toy-text
"pygame >=2.1.3",
# jax
"jax >=0.4.16",
"jaxlib >=0.4.16",
"flax >= 0.5.0",
"array-api-compat >=1.11.0",
"numpy>=2.1",
# torch
"torch >=1.13.0",
"array-api-compat >=1.11.0",
"numpy>=2.1",
# array-api
"array-api-compat >=1.11.0",
"numpy>=2.1",
# other
"opencv-python >=3.0",
"matplotlib >=3.0",
"moviepy >=1.0.0",
]
testing = [
"pytest >=7.1.3",
"scipy >=1.7.3",
"dill >=0.3.7",
"array_api_extra >=0.7.0",
]
[project.urls]
Homepage = "https://farama.org"
Repository = "https://github.com/Farama-Foundation/Gymnasium"
Documentation = "https://gymnasium.farama.org"
"Bug Report" = "https://github.com/Farama-Foundation/Gymnasium/issues"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["gymnasium", "gymnasium.*"]
[tool.setuptools.package-data]
gymnasium = [
"envs/mujoco/assets/*.xml",
"envs/classic_control/assets/*.png",
"envs/phys2d/assets/*.png",
"envs/toy_text/font/*.ttf",
"envs/toy_text/img/*.png",
"py.typed",
]
# Linters and Test tools #######################################################
[tool.black]
[tool.isort]
atomic = true
profile = "black"
src_paths = ["gymnasium", "tests", "docs/_scripts"]
extra_standard_library = ["typing_extensions"]
indent = 4
lines_after_imports = 2
multi_line_output = 3
[tool.pyright]
include = ["gymnasium/**"]
exclude = ["tests/**", "**/node_modules", "**/__pycache__"]
strict = []
typeCheckingMode = "basic"
pythonVersion = "3.10"
pythonPlatform = "All"
typeshedPath = "typeshed"
enableTypeIgnoreComments = true
# This is required as the CI pre-commit does not download the module (i.e. numpy, pygame, box2d)
# Therefore, we have to ignore missing imports
reportMissingImports = "none"
# Some modules are missing type stubs, which is an issue when running pyright locally
reportMissingTypeStubs = false
# For warning and error, will raise an error when
reportInvalidTypeVarUse = "none"
reportAttributeAccessIssue = "none" # pyright provides false positives
reportArgumentType = "none" # pyright provides false positives
reportPrivateUsage = "warning"
reportIndexIssue = "none" # TODO fix one by one
reportReturnType = "none" # TODO fix one by one
reportCallIssue = "none" # TODO fix one by one
reportOperatorIssue = "none" # TODO fix one by one
reportOptionalMemberAccess = "none" # TODO fix one by one
reportAssignmentType = "none" # TODO fix one by one
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning:gymnasium.*:"]