diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 5f03441..0d6b9e4 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -13,4 +13,4 @@ [source website]: https://github.com/thu-ml/tianshou/ [known issues]: https://github.com/thu-ml/tianshou/#faq-and-known-issues - [issue tracker]: https://github.com/thu-ml/tianshou/issues?q= + [issue tracker]: https://github.com/thu-ml/tianshou/projects/2 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 19ffcde..5e9db0c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,4 +17,4 @@ Less important but also useful: [source website]: https://github.com/thu-ml/tianshou [known issues]: https://github.com/thu-ml/tianshou/#faq-and-known-issues - [issue tracker]: https://github.com/thu-ml/tianshou/issues?q= \ No newline at end of file + [issue tracker]: https://github.com/thu-ml/tianshou/projects/2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 6607727..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,44 +0,0 @@ -# Contributing - -To install Tianshou in an "editable" mode, run -```bash -pip install -e . -``` -in the main directory. This installation is removable by -```bash -python setup.py develop --uninstall -``` -Additional dependencies for developments can be installed by -```bash -pip install ".[dev]" -``` - -#### Tests - -This command will run automatic tests in the main directory -```bash -pytest test --cov tianshou -s -``` - -To run on your own GitHub Repo, enable the [GitHub Action](https://github.com/features/actions) and it will automatically run the test. - -##### PEP8 Code Style Check - -We follow PEP8 python code style. To check, in the main directory, run: -```python -flake8 . --count --show-source --statistics -``` - -#### Documents - -Documents are written under the `docs/` directory as RestructuredText (`.rst`) files. `index.rst` is the main page. A Tutorial on RestructuredText can be found [here](https://pythonhosted.org/an_example_pypi_project/sphinx.html). - -API References are automatically generated by [Sphinx](http://www.sphinx-doc.org/en/stable/) according to the outlines under -`doc/api/` and should be modified when any code changes. - -To compile docs into webpages, run -``` -make html -``` -under the `docs/` directory. The generated webpages are in `docs/_build` and -can be viewed with browsers. diff --git a/README.md b/README.md index 21f0fb4..7385b1a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![PyPI](https://img.shields.io/pypi/v/tianshou)](https://pypi.org/project/tianshou/) [![Unittest](https://github.com/thu-ml/tianshou/workflows/Unittest/badge.svg?branch=master)](https://github.com/thu-ml/tianshou/actions) -[![codecov](https://codecov.io/gh/thu-ml/tianshou/graph/badge.svg)](https://codecov.io/gh/thu-ml/tianshou) +[![codecov](https://img.shields.io/codecov/c/gh/thu-ml/tianshou)](https://codecov.io/gh/thu-ml/tianshou) [![Documentation Status](https://readthedocs.org/projects/tianshou/badge/?version=latest)](https://tianshou.readthedocs.io) [![GitHub issues](https://img.shields.io/github/issues/thu-ml/tianshou)](https://github.com/thu-ml/tianshou/issues) [![GitHub stars](https://img.shields.io/github/stars/thu-ml/tianshou)](https://github.com/thu-ml/tianshou/stargazers) @@ -57,9 +57,9 @@ If no error occurs, you have successfully installed Tianshou. ## Documentation -The tutorials and API documentation are hosted on [tianshou.readthedocs.io/en/stable/](https://tianshou.readthedocs.io/en/stable/) (stable version) and [tianshou.readthedocs.io/en/latest/](https://tianshou.readthedocs.io/en/latest/) (develop version). +The tutorials and API documentation are hosted on [tianshou.readthedocs.io](https://tianshou.readthedocs.io/). -The example scripts are under [test/](https://github.com/thu-ml/tianshou/blob/master/test) folder and [examples/](https://github.com/thu-ml/tianshou/blob/master/examples) folder. +The example scripts are under [test/](https://github.com/thu-ml/tianshou/blob/master/test) folder and [examples/](https://github.com/thu-ml/tianshou/blob/master/examples) folder. It may fail to run with PyPI installation, so please re-install the github version through `pip3 install git+https://github.com/thu-ml/tianshou.git@master`. @@ -249,17 +249,11 @@ You can check out the [documentation](https://tianshou.readthedocs.io) for advan ## Contributing -Tianshou is still under development. More algorithms and features are going to be added and we always welcome contributions to help make Tianshou better. If you would like to contribute, please check out [CONTRIBUTING.md](https://github.com/thu-ml/tianshou/blob/master/CONTRIBUTING.md). +Tianshou is still under development. More algorithms and features are going to be added and we always welcome contributions to help make Tianshou better. If you would like to contribute, please check out [docs/contributing.rst](https://github.com/thu-ml/tianshou/blob/master/docs/contributing.rst). ## TODO -- [ ] More examples on [mujoco, atari] benchmark -- [ ] More algorithms -- [ ] Prioritized replay buffer -- [x] RNN support -- [ ] Imitation Learning -- [ ] Multi-agent -- [ ] Distributed training +Check out the [Issue/PR Categories](https://github.com/thu-ml/tianshou/projects/2) and [Support Status](https://github.com/thu-ml/tianshou/projects/3) page for more detail. ## Citing Tianshou diff --git a/docs/_static/images/action1.jpg b/docs/_static/images/action1.jpg new file mode 100644 index 0000000..59790a3 Binary files /dev/null and b/docs/_static/images/action1.jpg differ diff --git a/docs/_static/images/action2.jpg b/docs/_static/images/action2.jpg new file mode 100644 index 0000000..4f3ade3 Binary files /dev/null and b/docs/_static/images/action2.jpg differ diff --git a/docs/_static/images/action3.png b/docs/_static/images/action3.png new file mode 100644 index 0000000..ef510cf Binary files /dev/null and b/docs/_static/images/action3.png differ diff --git a/docs/contributing.rst b/docs/contributing.rst index 4653417..5bb9ff3 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -1,7 +1,76 @@ Contributing ============ -We always welcome contributions to help make Tianshou better. If you would like to contribute, please check out the `guidelines `_ here. Below are an incomplete list of our contributors (find more on `this page `_). +Install Develop Version +----------------------- -* Jiayi Weng (`Trinkle23897 `_) -* Minghao Zhang (`Mehooz `_) +To install Tianshou in an "editable" mode, run + +.. code-block:: bash + + pip3 install -e . + +in the main directory. This installation is removable by + +.. code-block:: bash + + python3 setup.py develop --uninstall + +Additional dependencies for developments can be installed by + +.. code-block:: bash + + pip3 install ".[dev]" + +PEP8 Code Style Check +--------------------- + +We follow PEP8 python code style. To check, in the main directory, run: + +.. code-block:: bash + + flake8 . --count --show-source --statistics + +Test Locally +------------ + +This command will run automatic tests in the main directory + +.. code-block:: bash + + pytest test --cov tianshou -s + +Test by GitHub Actions +---------------------- + +1. Click the `Actions` button in your own repo: + +.. image:: _static/images/action1.jpg + :align: center + +2. Click the green button: + +.. image:: _static/images/action2.jpg + :align: center + +3. You will see ``Actions Enabled.`` on the top of html page. + +4. When you push a new commit to your own repo (e.g. ``git push``), it will automatically run the test in this page: + +.. image:: _static/images/action3.png + :align: center + +Documentation +------------- + +Documentations are written under the ``docs/`` directory as ReStructuredText (``.rst``) files. ``index.rst`` is the main page. A Tutorial on ReStructuredText can be found `here `_. + +API References are automatically generated by `Sphinx `_ according to the outlines under ``docs/api/`` and should be modified when any code changes. + +To compile documentation into webpages, run + +.. code-block:: bash + + make html + +under the ``docs/`` directory. The generated webpages are in ``docs/_build`` and can be viewed with browsers. diff --git a/docs/contributor.rst b/docs/contributor.rst new file mode 100644 index 0000000..03097c0 --- /dev/null +++ b/docs/contributor.rst @@ -0,0 +1,7 @@ +Contributor +=========== + +We always welcome contributions to help make Tianshou better. Below are an incomplete list of our contributors (find more on `this page `_). + +* Jiayi Weng (`Trinkle23897 `_) +* Minghao Zhang (`Mehooz `_) diff --git a/docs/index.rst b/docs/index.rst index 88320cd..74e3f28 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -69,6 +69,7 @@ Tianshou is still under development, you can also check out the documents in sta :caption: Community contributing + contributor Indices and tables