From 1c108c33c7dd7e15c2f606e6a7a7e8c6aa513733 Mon Sep 17 00:00:00 2001 From: Adam Gleave Date: Fri, 8 May 2020 17:12:08 -0700 Subject: [PATCH 1/3] Add readthedocs config --- README.md | 5 ++++- ci/build_venv.sh | 2 +- readthedocs.yml | 14 ++++++++++++++ setup.py | 10 +++++++--- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 readthedocs.yml diff --git a/README.md b/README.md index 61350c8..58fefe6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -[![CircleCI](https://circleci.com/gh/HumanCompatibleAI/seals.svg?style=svg)](https://circleci.com/gh/HumanCompatibleAI/seals) [![codecov](https://codecov.io/gh/HumanCompatibleAI/seals/branch/master/graph/badge.svg)](https://codecov.io/gh/HumanCompatibleAI/seals) +[![CircleCI](https://circleci.com/gh/HumanCompatibleAI/seals.svg?style=svg)](https://circleci.com/gh/HumanCompatibleAI/seals) +[![Documentation Status](https://readthedocs.org/projects/chai-seals/badge/?version=latest)](https://chai-seals.readthedocs.io/en/latest/?badge=latest) +[![codecov](https://codecov.io/gh/HumanCompatibleAI/seals/branch/master/graph/badge.svg)](https://codecov.io/gh/HumanCompatibleAI/seals) +[![PyPI version](https://badge.fury.io/py/seals.svg)](https://badge.fury.io/py/seals) **Status**: alpha, pre-release. diff --git a/ci/build_venv.sh b/ci/build_venv.sh index 84e40ff..3480309 100755 --- a/ci/build_venv.sh +++ b/ci/build_venv.sh @@ -9,4 +9,4 @@ fi virtualenv -p python3.7 ${venv} source ${venv}/bin/activate -pip install .[cpu,test] +pip install .[cpu,test,docs] diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 0000000..dee2f3e --- /dev/null +++ b/readthedocs.yml @@ -0,0 +1,14 @@ +version: 2 + +sphinx: + configuration: docs/conf.py + +formats: all + +python: + version: 3.7 + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/setup.py b/setup.py index f0963c6..57c7126 100644 --- a/setup.py +++ b/setup.py @@ -47,12 +47,15 @@ def get_readme() -> str: "pytest-shard", "pytest-xdist", "pytype", - "sphinx", - "sphinxcontrib-napoleon", "stable-baselines>=2.8.0", "tensorflow>=1.8.0,<2.0.0", ] +DOCS_REQUIRE = [ + "sphinx", + "sphinxcontrib-napoleon", +] + setup( name="seals", version=get_version(), @@ -68,7 +71,8 @@ def get_readme() -> str: tests_require=TESTS_REQUIRE, extras_require={ # recommended packages for development - "dev": ["ipdb", "jupyter", *TESTS_REQUIRE], + "dev": ["ipdb", "jupyter", *TESTS_REQUIRE, *DOCS_REQUIRE], + "docs": DOCS_REQUIRE, "test": TESTS_REQUIRE, }, url="https://github.com/HumanCompatibleAI/benchmark-environments", From 6adfe3481a6ed700d39042819cf6971602d826f6 Mon Sep 17 00:00:00 2001 From: Adam Gleave Date: Fri, 8 May 2020 17:44:20 -0700 Subject: [PATCH 2/3] Make MuJoCo optional dependency (should be anyway) --- ci/build_venv.sh | 2 +- setup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/build_venv.sh b/ci/build_venv.sh index 3480309..7669de7 100755 --- a/ci/build_venv.sh +++ b/ci/build_venv.sh @@ -9,4 +9,4 @@ fi virtualenv -p python3.7 ${venv} source ${venv}/bin/activate -pip install .[cpu,test,docs] +pip install .[cpu,docs,mujoco,test] diff --git a/setup.py b/setup.py index 57c7126..d79838d 100644 --- a/setup.py +++ b/setup.py @@ -67,13 +67,16 @@ def get_readme() -> str: packages=find_packages("src"), package_dir={"": "src"}, package_data={"seals": ["py.typed"]}, - install_requires=["gym[mujoco]"], + install_requires=["gym"], tests_require=TESTS_REQUIRE, extras_require={ # recommended packages for development "dev": ["ipdb", "jupyter", *TESTS_REQUIRE, *DOCS_REQUIRE], "docs": DOCS_REQUIRE, "test": TESTS_REQUIRE, + # We'd like to specify `gym[mujoco]`, but this is a no-op when Gym is already + # installed. See https://github.com/pypa/pip/issues/4957 for issue. + "mujoco": ["mujoco_py>=1.50, <2.0", "imageio"], }, url="https://github.com/HumanCompatibleAI/benchmark-environments", license="MIT", From f3d1c7b8db5379a33b2584daaf00dcd711a2d75c Mon Sep 17 00:00:00 2001 From: Adam Gleave Date: Fri, 8 May 2020 18:10:49 -0700 Subject: [PATCH 3/3] Remove unnecessary whitespace and constant --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index d79838d..5ad58de 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,6 @@ def get_readme() -> str: return f.read() -TF_VERSION = ">=1.15.0,<2.0" TESTS_REQUIRE = [ # remove pin once https://github.com/nedbat/coveragepy/issues/881 fixed "black", @@ -50,7 +49,6 @@ def get_readme() -> str: "stable-baselines>=2.8.0", "tensorflow>=1.8.0,<2.0.0", ] - DOCS_REQUIRE = [ "sphinx", "sphinxcontrib-napoleon",