-
-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
114 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,92 @@ | ||
[tool.pyright] | ||
# Package ###################################################################### | ||
|
||
[build-system] | ||
requires = ["setuptools >= 61.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "pettingzoo" | ||
description = "Gymnasium for multi-agent reinforcement learning." | ||
readme = "README.md" | ||
requires-python = ">= 3.7" | ||
authors = [{ name = "Farama Foundation", email = "[email protected]" }] | ||
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", | ||
"gymnasium>=0.26.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
# Update dependencies in `all` if any are added or removed | ||
atari = ["multi_agent_ale_py==0.1.11", "pygame==2.1.3.dev8"] | ||
classic = [ | ||
"chess==1.7.0", | ||
"rlcard==1.0.5", | ||
"pygame==2.1.3.dev8", | ||
"hanabi_learning_environment==0.0.4", | ||
] | ||
butterfly = ["pygame==2.1.3.dev8", "pymunk==6.2.0"] | ||
mpe = ["pygame==2.1.3.dev8"] | ||
sisl = ["pygame==2.1.3.dev8", "box2d-py==2.3.5", "scipy>=1.4.1"] | ||
other = ["pillow>=8.0.1"] | ||
tests = [ | ||
"pynput", | ||
"pytest", | ||
"AutoROM", | ||
"pytest", | ||
"pytest-cov", | ||
"pre-commit", | ||
] | ||
all = [ | ||
"multi_agent_ale_py==0.1.11", | ||
"pygame==2.1.3.dev8", | ||
"chess==1.7.0", | ||
"rlcard==1.0.5", | ||
"hanabi_learning_environment==0.0.4", | ||
"pymunk==6.2.0", | ||
"box2d-py==2.3.5", | ||
"scipy>=1.4.1", | ||
"pillow>=8.0.1", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://farama.org" | ||
Repository = "https://github.com/Farama-Foundation/PettingZoo" | ||
Documentation = "https://pettingzoo.farama.org" | ||
"Bug Report" = "https://github.com/Farama-Foundation/PettingZoo/issues" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["pettingzoo", "pettingzoo.*"] | ||
|
||
# Linters and Test tools ####################################################### | ||
|
||
[tool.black] | ||
safe = true | ||
|
||
[tool.isort] | ||
atomic = true | ||
profile = "black" | ||
src_paths = ["pettingzoo", "test"] | ||
|
||
[tool.pyright] | ||
# add any files/directories with type declaration to include | ||
include = [ | ||
"pettingzoo/", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,21 @@ | ||
"""Sets up the PettingZoo module.""" | ||
"""Setups the project.""" | ||
|
||
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 fh: | ||
long_description = "" | ||
header_count = 0 | ||
for line in fh: | ||
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 pettingzoo version.""" | ||
path = "pettingzoo/__init__.py" | ||
with open(path) as file: | ||
lines = file.readlines() | ||
path = CWD / "pettingzoo" / "__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") | ||
|
||
|
||
extras = { | ||
"atari": ["multi_agent_ale_py==0.1.11", "pygame==2.1.3.dev8"], | ||
"classic": [ | ||
"chess==1.7.0", | ||
"rlcard==1.0.5", | ||
"pygame==2.1.3.dev8", | ||
"hanabi_learning_environment==0.0.4", | ||
], | ||
"butterfly": ["pygame==2.1.3.dev8", "pymunk==6.2.0"], | ||
"mpe": ["pygame==2.1.3.dev8"], | ||
"sisl": ["pygame==2.1.3.dev8", "box2d-py==2.3.5", "scipy>=1.4.1"], | ||
"other": ["pillow>=8.0.1"], | ||
"tests": [ | ||
"pynput", | ||
"pytest", | ||
"codespell", | ||
"flake8", | ||
"isort", | ||
"AutoROM", | ||
"bandit", | ||
"pytest", | ||
"pytest-cov", | ||
"pre-commit", | ||
], | ||
} | ||
|
||
extras["all"] = ( | ||
extras["atari"] | ||
+ extras["classic"] | ||
+ extras["butterfly"] | ||
+ extras["mpe"] | ||
+ extras["sisl"] | ||
+ extras["other"] | ||
+ extras["tests"] | ||
) | ||
|
||
version = get_version() | ||
header_count, long_description = get_description() | ||
|
||
setup( | ||
name="PettingZoo", | ||
version=version, | ||
author="Farama Foundation", | ||
author_email="[email protected]", | ||
description="Gymnasium for multi-agent reinforcement learning", | ||
url="https://pettingzoo.farama.org/", | ||
license_files=("LICENSE.txt",), | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
keywords=["Reinforcement Learning", "game", "RL", "AI", "gymnasium"], | ||
python_requires=">=3.7, <3.12", | ||
packages=["pettingzoo"] | ||
+ ["pettingzoo." + pkg for pkg in find_packages("pettingzoo")], | ||
include_package_data=True, | ||
install_requires=["numpy>=1.18.0", "gymnasium>=0.26.0"], | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"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, | ||
) | ||
setup(name="pettingzoo", version=get_version()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from docs.code_examples import aec_rps, parallel_rps | ||
|
||
from pettingzoo.test import api_test, parallel_api_test | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
SuperSuit==3.6.0 | ||
torch==1.13.1 | ||
pettingzoo==1.22.0 | ||
pettingzoo==1.22.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pettingzoo==1.22.1 | ||
pettingzoo==1.22.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ Pillow==9.3.0 | |
torch==1.13.1 | ||
SuperSuit==3.6.0 | ||
ray[rllib]==2 | ||
pettingzoo==1.22.0 | ||
pettingzoo==1.22.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pettingzoo[classic]==1.22.1 | ||
pettingzoo[classic]==1.22.3 | ||
packaging==21.3 | ||
git+https://github.com/WillDudley/tianshou.git | ||
git+https://github.com/WillDudley/tianshou.git |