2022-07-06 09:05:35 +02:00
|
|
|
import itertools
|
2022-12-08 22:06:02 +01:00
|
|
|
from pathlib import Path
|
|
|
|
from typing import List
|
2022-07-06 09:05:35 +02:00
|
|
|
|
2022-07-07 10:47:04 +02:00
|
|
|
from setuptools import setup, find_packages
|
2020-08-28 15:48:34 +02:00
|
|
|
|
2022-07-06 09:05:35 +02:00
|
|
|
# Environment-specific dependencies for dmc and metaworld
|
|
|
|
extras = {
|
2023-07-07 18:16:13 +02:00
|
|
|
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
|
2023-09-17 19:05:42 +02:00
|
|
|
'metaworld': ['metaworld @ git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld'],
|
2023-05-15 17:09:52 +02:00
|
|
|
'box2d': ['gymnasium[box2d]>=0.26.0'],
|
2023-07-07 10:48:17 +02:00
|
|
|
'mujoco': ['mujoco==2.3.3', 'gymnasium[mujoco]>0.26.0'],
|
2023-10-11 11:36:36 +02:00
|
|
|
'mujoco-legacy': ['mujoco-py >=2.1,<2.2', 'cython<3'],
|
2023-09-18 19:42:58 +02:00
|
|
|
'jax': ["jax >=0.4.0", "jaxlib >=0.4.0"],
|
2022-07-06 09:05:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# All dependencies
|
|
|
|
all_groups = set(extras.keys())
|
2023-05-15 17:09:52 +02:00
|
|
|
extras["all"] = list(set(itertools.chain.from_iterable(
|
|
|
|
map(lambda group: extras[group], all_groups))))
|
2022-07-06 09:05:35 +02:00
|
|
|
|
2023-05-18 18:03:42 +02:00
|
|
|
extras['testing'] = extras["all"] + ['pytest']
|
|
|
|
|
2022-12-08 22:06:02 +01:00
|
|
|
|
|
|
|
def find_package_data(extensions_to_include: List[str]) -> List[str]:
|
|
|
|
envs_dir = Path("fancy_gym/envs/mujoco")
|
|
|
|
package_data_paths = []
|
|
|
|
for extension in extensions_to_include:
|
2023-05-15 17:09:52 +02:00
|
|
|
package_data_paths.extend([str(path)[10:]
|
|
|
|
for path in envs_dir.rglob(extension)])
|
2022-12-08 22:06:02 +01:00
|
|
|
|
|
|
|
return package_data_paths
|
|
|
|
|
|
|
|
|
2021-06-24 16:51:38 +02:00
|
|
|
setup(
|
2023-10-11 11:38:42 +02:00
|
|
|
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
|
2022-07-14 09:45:35 +02:00
|
|
|
name='fancy_gym',
|
2023-10-11 12:41:38 +02:00
|
|
|
version='1.0',
|
2022-07-07 10:47:04 +02:00
|
|
|
classifiers=[
|
2023-10-11 12:41:38 +02:00
|
|
|
'Development Status :: 4 - Beta',
|
2022-10-18 08:51:10 +02:00
|
|
|
'Intended Audience :: Science/Research',
|
|
|
|
'License :: OSI Approved :: MIT License',
|
|
|
|
'Natural Language :: English',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
'Programming Language :: Python :: 3.7',
|
|
|
|
'Programming Language :: Python :: 3.8',
|
|
|
|
'Programming Language :: Python :: 3.9',
|
|
|
|
'Programming Language :: Python :: 3.10',
|
2022-07-07 10:47:04 +02:00
|
|
|
],
|
|
|
|
extras_require=extras,
|
2021-06-24 16:51:38 +02:00
|
|
|
install_requires=[
|
2023-06-24 12:24:52 +02:00
|
|
|
'gymnasium>=0.26.0',
|
2023-01-17 11:18:30 +01:00
|
|
|
'mp_pytorch<=0.1.3'
|
2021-06-24 16:51:38 +02:00
|
|
|
],
|
2023-05-15 17:09:52 +02:00
|
|
|
packages=[package for package in find_packages(
|
|
|
|
) if package.startswith("fancy_gym")],
|
2022-07-07 10:47:04 +02:00
|
|
|
package_data={
|
2022-12-08 22:06:02 +01:00
|
|
|
"fancy_gym": find_package_data(extensions_to_include=["*.stl", "*.xml"])
|
2022-07-07 10:47:04 +02:00
|
|
|
},
|
2022-07-14 08:25:25 +02:00
|
|
|
python_requires=">=3.7",
|
2022-07-13 15:10:43 +02:00
|
|
|
url='https://github.com/ALRhub/fancy_gym/',
|
2022-10-18 08:51:10 +02:00
|
|
|
license='MIT license',
|
2021-06-24 16:51:38 +02:00
|
|
|
author_email='',
|
2022-07-14 08:25:25 +02:00
|
|
|
description='Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.'
|
2021-06-24 16:51:38 +02:00
|
|
|
)
|