Skip to content

Commit

Permalink
Add Travis checks for documentation building (#414)
Browse files Browse the repository at this point in the history
* CI checks for documentation building

* Dockerize

* Fix warnings in Sphinx docs

* Fix docker command
  • Loading branch information
AdamGleave committed Jul 22, 2019
1 parent edfc767 commit 2d8f49d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ services:
install:
- docker pull araffin/stable-baselines-cpu

script:
# For pull requests from fork, Codacy token is not available, leading to build failure
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then docker run -it --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov=. -v tests/"; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker run -it --env CODACY_PROJECT_TOKEN=$CODACY_PROJECT_TOKEN --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov-report xml --cov=. -v tests/ && python-codacy-coverage -r coverage.xml --token=$CODACY_PROJECT_TOKEN"; fi'
matrix:
include:
- name: "Unit Tests"
script:
# For pull requests from fork, Codacy token is not available, leading to build failure
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then docker run -it --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov=. -v tests/"; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker run -it --env CODACY_PROJECT_TOKEN=$CODACY_PROJECT_TOKEN --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov-report xml --cov=. -v tests/ && python-codacy-coverage -r coverage.xml --token=$CODACY_PROJECT_TOKEN"; fi'

- name: "Sphinx Documentation"
script:
- 'docker run -it --rm --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pip install .[docs] && pushd docs/ && make clean && make html"'
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -W # make warnings fatal
SPHINXBUILD = sphinx-build
SPHINXPROJ = StableBaselines
SOURCEDIR = .
Expand Down
20 changes: 10 additions & 10 deletions docs/guide/algos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ along with some useful characteristics: support for recurrent policies, discrete
============ ======================== ========= =========== ============ ================
Name Refactored [#f1]_ Recurrent ``Box`` ``Discrete`` Multi Processing
============ ======================== ========= =========== ============ ================
A2C ✔️ ✔️ ✔️ ✔️ ✔️
ACER ✔️ ✔️ ❌ [#f4]_ ✔️ ✔️
ACKTR ✔️ ✔️ ❌ [#f4]_ ✔️ ✔️
A2C ✔️ ✔️ ✔️ ✔️ ✔️
ACER ✔️ ✔️ ❌ [#f4]_ ✔️ ✔️
ACKTR ✔️ ✔️ ❌ [#f4]_ ✔️ ✔️
DDPG ✔️ ❌ ✔️ ❌ ✔️ [#f3]_
DQN ✔️ ❌ ❌ ✔️
HER ✔️ ❌ ✔️ ✔️
GAIL [#f2]_ ✔️ ✔️ ✔️ ✔️ ✔️ [#f3]_
PPO1 ✔️ ❌ ✔️ ✔️ ✔️ [#f3]_
PPO2 ✔️ ✔️ ✔️ ✔️ ✔️
SAC ✔️ ❌ ✔️
TRPO ✔️ ❌ ✔️ ✔ ✔️ [#f3]_
DQN ✔️ ❌ ❌ ✔️
HER ✔️ ❌ ✔️ ✔️ ❌
GAIL [#f2]_ ✔️ ✔️ ✔️ ✔️ ✔️ [#f3]_
PPO1 ✔️ ❌ ✔️ ✔️ ✔️ [#f3]_
PPO2 ✔️ ✔️ ✔️ ✔️ ✔️
SAC ✔️ ❌ ✔️
TRPO ✔️ ❌ ✔️ ✔ ✔️ [#f3]_
============ ======================== ========= =========== ============ ================

.. [#f1] Whether or not the algorithm has be refactored to fit the ``BaseRLModel`` class.
Expand Down
1 change: 1 addition & 0 deletions docs/guide/pretrain.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.. _pretrain:

.. automodule:: stable_baselines.gail
:noindex:


Pre-Training (Behavior Cloning)
Expand Down

0 comments on commit 2d8f49d

Please sign in to comment.