# 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.7"
authors = [{ name = "Farama Foundation", email = "contact@farama.org" }]
license = { text = "MIT License" }
keywords = ["Reinforcement Learning", "game", "RL", "AI", "gymnasium"]
classifiers = [
    "Development Status :: 4 - Beta",  # change to `5 - Production/Stable` when ready
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    'Intended Audience :: Science/Research',
    'Topic :: Scientific/Engineering :: Artificial Intelligence',
]
dependencies = [
    "numpy >=1.21.0",
    "jax-jumpy >=0.2.0",
    "cloudpickle >=1.2.0",
    "importlib-metadata >=4.8.0; python_version < '3.10'",
    "typing-extensions >=4.3.0",
    "gymnasium-notices >=0.0.1",
    "shimmy >=0.1.0,<1.0",
]
dynamic = ["version"]

[project.optional-dependencies]
# Update dependencies in `all` if any are added or removed
atari = ["shimmy[atari] >=0.1.0,<1.0"]
accept-rom-license = ["autorom[accept-rom-license] ~=0.4.2"]
box2d = ["box2d-py ==2.3.5", "pygame ==2.1.3.dev8", "swig ==4.*"]
classic-control = ["pygame ==2.1.3.dev8"]
classic_control = ["pygame ==2.1.3.dev8"]  # kept for backward compatibility
mujoco-py = ["mujoco-py >=2.1,<2.2"]
mujoco_py = ["mujoco-py >=2.1,<2.2"]       # kept for backward compatibility
mujoco = ["mujoco >=2.3.1.post1", "imageio >=2.14.1"]
toy-text = ["pygame ==2.1.3.dev8"]
toy_text = ["pygame ==2.1.3.dev8"]         # kept for backward compatibility
jax = ["jax ==0.3.24", "jaxlib ==0.3.24"]
other = [
    "lz4 >=3.1.0",
    "opencv-python >=3.0",
    "matplotlib >=3.0",
    "moviepy >=1.0.0",
    "torch >=1.0.0",
]
all = [
    # All dependencies above except accept-rom-license
    # NOTE: No need to manually remove the duplicates, setuptools automatically does that.
    # atari
    "shimmy[atari] >=0.1.0,<1.0",
    # box2d
    "box2d-py ==2.3.5",
    "pygame ==2.1.3.dev8",
    "swig ==4.*",
    # classic-control
    "pygame ==2.1.3.dev8",
    # mujoco-py
    "mujoco-py >=2.1,<2.2",
    # mujoco
    "mujoco >=2.3.1.post1",
    "imageio >=2.14.1",
    # toy-text
    "pygame ==2.1.3.dev8",
    # jax
    "jax ==0.3.24",
    "jaxlib ==0.3.24",
    # other
    "lz4 >=3.1.0",
    "opencv-python >=3.0",
    "matplotlib >=3.0",
    "moviepy >=1.0.0",
    "torch >=1.0.0",
]
testing = ["pytest ==7.1.3"]

[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/toy_text/font/*.ttf",
    "envs/toy_text/img/*.png",
    "py.typed",
]

# Linters and Test tools #######################################################

[tool.black]
safe = true

[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/**", "tests/**"]
exclude = ["**/node_modules", "**/__pycache__"]
strict = []

typeCheckingMode = "basic"
pythonVersion = "3.7"
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"

# reportUnknownMemberType = "warning"  # -> raises 6035 warnings
# reportUnknownParameterType = "warning"  # -> raises 1327 warnings
# reportUnknownVariableType = "warning"  # -> raises 2585 warnings
# reportUnknownArgumentType = "warning"  # -> raises 2104 warnings
reportGeneralTypeIssues = "none"  # -> commented out raises 489 errors
reportUntypedFunctionDecorator = "none"  # -> pytest.mark.parameterize issues

reportPrivateUsage = "warning"
reportUnboundVariable = "warning"

[tool.pytest.ini_options]
filterwarnings = ['ignore:.*The environment .* is out of date.*']
# filterwarnings = ['ignore:.*step API.*:DeprecationWarning']
