polish docs

This commit is contained in:
Trinkle23897 2020-04-11 19:29:46 +08:00
parent 6a244d1fbb
commit befdfb07e8
10 changed files with 87 additions and 60 deletions

View File

@ -13,4 +13,4 @@
[source website]: https://github.com/thu-ml/tianshou/ [source website]: https://github.com/thu-ml/tianshou/
[known issues]: https://github.com/thu-ml/tianshou/#faq-and-known-issues [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

View File

@ -17,4 +17,4 @@ Less important but also useful:
[source website]: https://github.com/thu-ml/tianshou [source website]: https://github.com/thu-ml/tianshou
[known issues]: https://github.com/thu-ml/tianshou/#faq-and-known-issues [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

View File

@ -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.

View File

@ -6,7 +6,7 @@
[![PyPI](https://img.shields.io/pypi/v/tianshou)](https://pypi.org/project/tianshou/) [![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) [![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) [![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 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) [![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 ## 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`.
<!-- 这里有一份天授平台简短的中文简介https://www.zhihu.com/question/377263715 --> <!-- 这里有一份天授平台简短的中文简介https://www.zhihu.com/question/377263715 -->
@ -249,17 +249,11 @@ You can check out the [documentation](https://tianshou.readthedocs.io) for advan
## Contributing ## 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 ## TODO
- [ ] More examples on [mujoco, atari] benchmark 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.
- [ ] More algorithms
- [ ] Prioritized replay buffer
- [x] RNN support
- [ ] Imitation Learning
- [ ] Multi-agent
- [ ] Distributed training
## Citing Tianshou ## Citing Tianshou

BIN
docs/_static/images/action1.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
docs/_static/images/action2.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
docs/_static/images/action3.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,7 +1,76 @@
Contributing Contributing
============ ============
We always welcome contributions to help make Tianshou better. If you would like to contribute, please check out the `guidelines <https://github.com/thu-ml/tianshou/blob/master/CONTRIBUTING.md>`_ here. Below are an incomplete list of our contributors (find more on `this page <https://github.com/thu-ml/tianshou/graphs/contributors>`_). Install Develop Version
-----------------------
* Jiayi Weng (`Trinkle23897 <https://github.com/Trinkle23897>`_) To install Tianshou in an "editable" mode, run
* Minghao Zhang (`Mehooz <https://github.com/Mehooz>`_)
.. 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 <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 ``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.

7
docs/contributor.rst Normal file
View File

@ -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 <https://github.com/thu-ml/tianshou/graphs/contributors>`_).
* Jiayi Weng (`Trinkle23897 <https://github.com/Trinkle23897>`_)
* Minghao Zhang (`Mehooz <https://github.com/Mehooz>`_)

View File

@ -69,6 +69,7 @@ Tianshou is still under development, you can also check out the documents in sta
:caption: Community :caption: Community
contributing contributing
contributor
Indices and tables Indices and tables