-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
100 lines (89 loc) · 2.34 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import os
from typing import Dict, List
from setuptools import find_packages, setup
def get_version() -> str:
# https://packaging.python.org/guides/single-sourcing-package-version/
init = open(os.path.join("moss", "__init__.py"), "r").read().split()
return init[init.index("__version__") + 2][1:-1]
def get_install_requires() -> List[str]:
launchpad = [
"dm-reverb==0.12.0",
"dm-launchpad==0.5.2",
"tensorflow==2.8.1",
]
jax_requirements = [
"chex",
"distrax",
"flax==0.7.5",
"jax==0.4.20",
"jaxlib==0.4.20",
"optax",
"rlax",
] + launchpad
requirements = [
"absl-py",
"dm-env",
"dm-tree",
"envpool",
"numpy==1.26",
"pillow",
"pygame",
"pettingzoo[all]",
"scipy==1.12",
"tensorboardX",
"tqdm",
"typing-extensions",
] + jax_requirements
return requirements
def get_extras_require() -> Dict[str, List[str]]:
req = {
"dev":
[
"sphinx<8",
"sphinx_rtd_theme",
"jinja2",
"sphinxcontrib-bibtex",
"flake8",
"flake8-bugbear",
"yapf",
"isort",
"mypy==1.0",
"pydocstyle",
"doc8",
"pyenchant",
"pytest",
"pytest-cov",
],
}
return req
setup(
name="moss-rl",
version=get_version(),
description="A Python library for Reinforcement Learning.",
long_description=open("README.md", encoding="utf8").read(),
long_description_content_type="text/markdown",
author="lanzhiyi",
author_email="[email protected]",
url="https://github.com/hilanzy/moss",
packages=find_packages(),
license="MIT",
python_requires=">=3.8",
install_requires=get_install_requires(),
extras_require=get_extras_require(),
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 3 - Alpha",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
# Pick your license as you wish (should match "license" above)
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="reinforcement-learning python machine learning",
)