From bc0ca6c308fc329b11e6301b1b5ce5577b075552 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Mon, 5 Dec 2022 19:56:00 +0800 Subject: [PATCH] Packaging with `pyproject.toml` (#180) --- .github/workflows/build-publish.yml | 12 +- .github/workflows/build.yml | 4 +- .github/workflows/pre-commit.yml | 12 +- gymnasium/envs/mujoco/ant_v4.py | 6 +- gymnasium/envs/mujoco/half_cheetah_v4.py | 6 +- gymnasium/envs/mujoco/hopper_v4.py | 6 +- gymnasium/envs/mujoco/humanoid_v4.py | 6 +- gymnasium/envs/mujoco/humanoidstandup_v4.py | 6 +- .../mujoco/inverted_double_pendulum_v4.py | 6 +- gymnasium/envs/mujoco/inverted_pendulum_v4.py | 6 +- gymnasium/envs/mujoco/pusher_v4.py | 4 +- gymnasium/envs/mujoco/reacher_v4.py | 4 +- gymnasium/envs/mujoco/swimmer_v4.py | 6 +- gymnasium/envs/mujoco/walker2d_v4.py | 6 +- pyproject.toml | 111 ++++++++++++++++++ requirements.txt | 15 --- setup.py | 106 ++--------------- test_requirements.txt | 10 -- 18 files changed, 164 insertions(+), 168 deletions(-) delete mode 100644 requirements.txt delete mode 100644 test_requirements.txt diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 701478daf..dd96506d0 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -39,15 +39,15 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies - run: python -m pip install --upgrade setuptools wheel - - name: Build wheels - run: python setup.py sdist bdist_wheel + run: python -m pip install --upgrade pip setuptools build + - name: Build sdist and wheels + run: python -m build - name: Store wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: dist @@ -58,7 +58,7 @@ jobs: if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Download dists - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: artifact path: dist diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbefdaaad..6860d02dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: matrix: python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: | docker build -f bin/all-py.Dockerfile \ --build-arg PYTHON_VERSION=${{ matrix.python-version }} \ @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: | docker build -f bin/necessary-py.Dockerfile \ --build-arg PYTHON_VERSION='3.10' \ diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c7fdc44ba..80ce02af6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,9 +13,9 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: pip install pre-commit - - run: pre-commit --version - - run: pre-commit install - - run: pre-commit run --all-files + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - run: python -m pip install pre-commit + - run: python -m pre_commit --version + - run: python -m pre_commit install + - run: python -m pre_commit run --all-files diff --git a/gymnasium/envs/mujoco/ant_v4.py b/gymnasium/envs/mujoco/ant_v4.py index b4929e6ba..71f713c8e 100644 --- a/gymnasium/envs/mujoco/ant_v4.py +++ b/gymnasium/envs/mujoco/ant_v4.py @@ -169,9 +169,9 @@ class AntEnv(MujocoEnv, utils.EzPickle): | `exclude_current_positions_from_observation`| **bool** | `True`| Whether or not to omit the x- and y-coordinates from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies | ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/half_cheetah_v4.py b/gymnasium/envs/mujoco/half_cheetah_v4.py index 013a95df6..2227a4820 100644 --- a/gymnasium/envs/mujoco/half_cheetah_v4.py +++ b/gymnasium/envs/mujoco/half_cheetah_v4.py @@ -128,9 +128,9 @@ class HalfCheetahEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/hopper_v4.py b/gymnasium/envs/mujoco/hopper_v4.py index 3468945c1..1909cd4cf 100644 --- a/gymnasium/envs/mujoco/hopper_v4.py +++ b/gymnasium/envs/mujoco/hopper_v4.py @@ -134,9 +134,9 @@ class HopperEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/humanoid_v4.py b/gymnasium/envs/mujoco/humanoid_v4.py index 4c8b32267..11a18c2a2 100644 --- a/gymnasium/envs/mujoco/humanoid_v4.py +++ b/gymnasium/envs/mujoco/humanoid_v4.py @@ -208,9 +208,9 @@ class HumanoidEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/humanoidstandup_v4.py b/gymnasium/envs/mujoco/humanoidstandup_v4.py index 368098092..d515135a6 100644 --- a/gymnasium/envs/mujoco/humanoidstandup_v4.py +++ b/gymnasium/envs/mujoco/humanoidstandup_v4.py @@ -184,9 +184,9 @@ class HumanoidStandupEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/inverted_double_pendulum_v4.py b/gymnasium/envs/mujoco/inverted_double_pendulum_v4.py index 625a11986..fd732dbee 100644 --- a/gymnasium/envs/mujoco/inverted_double_pendulum_v4.py +++ b/gymnasium/envs/mujoco/inverted_double_pendulum_v4.py @@ -117,9 +117,9 @@ class InvertedDoublePendulumEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks (including inverted pendulum) * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/inverted_pendulum_v4.py b/gymnasium/envs/mujoco/inverted_pendulum_v4.py index 37d78a386..3ff34d510 100644 --- a/gymnasium/envs/mujoco/inverted_pendulum_v4.py +++ b/gymnasium/envs/mujoco/inverted_pendulum_v4.py @@ -86,9 +86,9 @@ class InvertedPendulumEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks (including inverted pendulum) * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/pusher_v4.py b/gymnasium/envs/mujoco/pusher_v4.py index aa490885c..28d2a9b9b 100644 --- a/gymnasium/envs/mujoco/pusher_v4.py +++ b/gymnasium/envs/mujoco/pusher_v4.py @@ -133,8 +133,8 @@ class PusherEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks (not including reacher, which has a max_time_steps of 50). Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/reacher_v4.py b/gymnasium/envs/mujoco/reacher_v4.py index 126c2a45e..171adce6a 100644 --- a/gymnasium/envs/mujoco/reacher_v4.py +++ b/gymnasium/envs/mujoco/reacher_v4.py @@ -115,8 +115,8 @@ class ReacherEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks (not including reacher, which has a max_time_steps of 50). Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/swimmer_v4.py b/gymnasium/envs/mujoco/swimmer_v4.py index a3559136e..ea8c9c921 100644 --- a/gymnasium/envs/mujoco/swimmer_v4.py +++ b/gymnasium/envs/mujoco/swimmer_v4.py @@ -117,9 +117,9 @@ class SwimmerEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/gymnasium/envs/mujoco/walker2d_v4.py b/gymnasium/envs/mujoco/walker2d_v4.py index 8f224bbac..329687dba 100644 --- a/gymnasium/envs/mujoco/walker2d_v4.py +++ b/gymnasium/envs/mujoco/walker2d_v4.py @@ -139,9 +139,9 @@ class Walker2dEnv(MujocoEnv, utils.EzPickle): ## Version History - * v4: all mujoco environments now use the mujoco bindings in mujoco>=2.1.3 - * v3: support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) - * v2: All continuous control environments now use mujoco_py >= 1.50 + * v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3 + * v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen) + * v2: All continuous control environments now use mujoco-py >= 1.50 * v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments. * v0: Initial versions release (1.0.0) """ diff --git a/pyproject.toml b/pyproject.toml index 5a184eed2..ae86c1c19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,113 @@ +# 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; python_version == '3.7'", + "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.0", "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.20", "jaxlib ==0.3.20"] +other = [ + "lz4 >=3.1.0", + "opencv-python >=3.0", + "matplotlib >=3.0", + "moviepy >=1.0.0", + "tensorflow >=2.1.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.0", + "imageio >=2.14.1", + # toy-text + "pygame ==2.1.3.dev8", + # jax + "jax ==0.3.20", + "jaxlib ==0.3.20", + # other + "lz4 >=3.1.0", + "opencv-python >=3.0", + "matplotlib >=3.0", + "moviepy >=1.0.0", + "tensorflow >=2.1.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] @@ -7,6 +117,7 @@ safe = true 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 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index bbb82247d..000000000 --- a/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -numpy>=1.21.0 -cloudpickle>=1.2.0 -importlib_metadata>=4.8.0; python_version < '3.10' -gymnasium_notices>=0.0.1 -dataclasses==0.8; python_version == '3.6' -typing_extensions==4.3.0; python_version == '3.7' -opencv-python>=3.0 -lz4>=3.1.0 -matplotlib>=3.0 -box2d-py==2.3.5 -pygame==2.1.3.dev8 -ale-py~=0.8.0 -mujoco>=2.3.0 -mujoco_py<2.2,>=2.1 -imageio>=2.14.1 diff --git a/setup.py b/setup.py index ddbc649f4..9ff42fca5 100644 --- a/setup.py +++ b/setup.py @@ -1,112 +1,22 @@ """Setups the project.""" -import itertools -from typing import Dict, List -from setuptools import find_packages, setup +import pathlib +from setuptools import setup -def get_description(): - """Gets the description from the readme.""" - with open("README.md") as file: - long_description = "" - header_count = 0 - for line in file: - if line.startswith("##"): - header_count += 1 - if header_count < 2: - long_description += line - else: - break - return header_count, long_description + +CWD = pathlib.Path(__file__).absolute().parent def get_version(): """Gets the gymnasium version.""" - path = "gymnasium/__init__.py" - with open(path) as file: - lines = file.readlines() + path = CWD / "gymnasium" / "__init__.py" + content = path.read_text() - for line in lines: + for line in content.splitlines(): if line.startswith("__version__"): return line.strip().split()[-1].strip().strip('"') raise RuntimeError("bad version data in __init__.py") -# Environment-specific dependencies. -extras: Dict[str, List[str]] = { - "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.0", "swig==4.*"], - "classic_control": ["pygame==2.1.0"], - "mujoco_py": ["mujoco_py<2.2,>=2.1"], - "mujoco": ["mujoco>=2.3.0", "imageio>=2.14.1"], - "toy_text": ["pygame==2.1.0"], - "jax": ["jax==0.3.20", "jaxlib==0.3.20"], - "other": [ - "lz4>=3.1.0", - "opencv-python>=3.0", - "matplotlib>=3.0", - "moviepy>=1.0.0", - "tensorflow>=2.1.0", - "torch>=1.0.0", - ], -} - -# All dependency groups - accept rom license as requires user to run -all_groups = set(extras.keys()) - {"accept-rom-license"} -extras["all"] = list( - set(itertools.chain.from_iterable(map(lambda group: extras[group], all_groups))) -) -extras["testing"] = [ - "pytest==7.1.3", -] - -version = get_version() -header_count, long_description = get_description() - -setup( - name="Gymnasium", - version=version, - author="Farama Foundation", - author_email="contact@farama.org", - description="A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)", - url="https://gymnasium.farama.org/", - license="MIT", - license_files=("LICENSE",), - long_description=long_description, - long_description_content_type="text/markdown", - keywords=["Reinforcement Learning", "game", "RL", "AI", "gymnasium"], - python_requires=">=3.7", - tests_require=extras["testing"], - packages=[ - package for package in find_packages() if package.startswith("gymnasium") - ], - package_data={ - "gymnasium": [ - "envs/mujoco/assets/*.xml", - "envs/classic_control/assets/*.png", - "envs/toy_text/font/*.ttf", - "envs/toy_text/img/*.png", - "py.typed", - ] - }, - include_package_data=True, - install_requires=[ - "numpy >= 1.21.0", - "jax-jumpy >= 0.2.0", - "cloudpickle >= 1.2.0", - "importlib_metadata >= 4.8.0; python_version < '3.10'", - "gymnasium_notices >= 0.0.1", - "shimmy>=0.1.0, <1.0", - ], - classifiers=[ - "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", - ], - extras_require=extras, - zip_safe=False, -) +setup(name="gymnasium", version=get_version()) diff --git a/test_requirements.txt b/test_requirements.txt deleted file mode 100644 index 1e21cc45a..000000000 --- a/test_requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -box2d-py==2.3.5 -lz4>=3.1.0 -opencv-python>=3.0 -mujoco>=2.3.0 -matplotlib>=3.0 -imageio>=2.14.1 -pygame==2.1.3.dev8 -mujoco_py<2.2,>=2.1 -pytest==7.1.3 -gym==0.26.2