Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 2.19 KB

CONTRIBUTING.md

File metadata and controls

83 lines (55 loc) · 2.19 KB

Contributing guidelines

Once you send a pull request, it is automatically tested on CircleCI. Please setup CircleCI Local CLI and check your code in your local environment before submitting the pull request.

Coding standards

The following circleci job runs code checking:

$ circleci build --job checks

The above job contains following checkers:

If any warnings or errors are emitted, please fix them.

Note that we use comment-style type annotation for compatibility with Python 2.

Testing

The following circleci job runs all unit tests in Python 3.7:

$ circleci build --job tests-python37

Please make sure that the following jobs work without any errors in your environment:

  • tests-python27
  • tests-python35
  • tests-python36
  • tests-python37
  • examples-python27
  • examples-python35
  • examples-python36
  • examples-python37

In addition, to check the documents, run:

$ circleci build --job document

Please make sure that you can generate the documents without any errors.

Documentation

When adding a new feature to the framework, you also need to document it in the reference. The documentation source is stored under docs directory and written in reStructuredText format.

To build the documentation, you need to install Sphinx:

$ pip install sphinx sphinx_rtd_theme

Then you can build the documentation in HTML format locally:

$ cd docs
$ make html

HTML files are generated under build/html directory. Open index.html with the browser and see if it is rendered as expected.

Note that docstrings (documentation comments in the source code) are collected from the installed Optuna module. If you modified docstrings, make sure to install the module (e.g., using pip install -e .) before building the documentation.