1.2 KiB
Contributing
To install Tianshou in an "editable" mode, run
pip install -e .
in the main directory. This installation is removable by
python setup.py develop --uninstall
Additional dependencies for developments can be installed by
pip install ".[dev]"
Tests
This command will run automatic tests in the main directory
pytest test --cov tianshou -s
To run on your own GitHub Repo, enable the GitHub Action and it will automatically run the test.
PEP8 Code Style Check
We follow PEP8 python code style. To check, in the main directory, run:
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.
API References are automatically generated by Sphinx 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.