contrib.rst 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .. _tune-contrib:
  2. Contributing to Tune
  3. ====================
  4. We welcome (and encourage!) all forms of contributions to Tune, including and not limited to:
  5. - Code reviewing of patches and PRs.
  6. - Pushing patches.
  7. - Documentation and examples.
  8. - Community participation in forums and issues.
  9. - Code readability and code comments to improve readability.
  10. - Test cases to make the codebase more robust.
  11. - Tutorials, blog posts, talks that promote the project.
  12. Developing Tune
  13. ---------------
  14. First, following the instructions in :ref:`python-develop` to develop Tune without compiling Ray.
  15. After Ray is set up, run ``pip install -r ray/python/ray/tune/requirements-dev.txt`` to install all packages required for Tune development.
  16. Submitting and Merging a Contribution
  17. -------------------------------------
  18. There are a couple steps to merge a contribution.
  19. 1. First rebase your development branch on the most recent version of master.
  20. .. code:: bash
  21. git remote add upstream https://github.com/ray-project/ray.git
  22. git fetch upstream
  23. git rebase upstream/master # or git pull . upstream/master
  24. 2. Make sure all existing tests `pass <tune-contrib.html#testing>`__.
  25. 3. If introducing a new feature or patching a bug, be sure to add new test cases
  26. in the relevant file in ``tune/tests/``.
  27. 4. Document the code. Public functions need to be documented, and remember to provide a usage
  28. example if applicable.
  29. 5. Request code reviews from other contributors and address their comments. One fast way to get reviews is
  30. to help review others' code so that they return the favor. You should aim to improve the code as much as
  31. possible before the review. We highly value patches that can get in without extensive reviews.
  32. 6. Reviewers will merge and approve the pull request; be sure to ping them if
  33. the pull request is getting stale.
  34. Testing
  35. -------
  36. Even though we have hooks to run unit tests automatically for each pull request,
  37. we recommend you to run unit tests locally beforehand to reduce reviewers’
  38. burden and speedup review process.
  39. .. code-block:: shell
  40. pytest ray/python/ray/tune/tests/
  41. Documentation should be documented in `Google style <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html>`__ format.
  42. We also have tests for code formatting and linting that need to pass before merge. You can run the following locally:
  43. .. code-block:: shell
  44. ray/scripts/format.sh
  45. What can I work on?
  46. -------------------
  47. We use Github to track issues, feature requests, and bugs. Take a look at the
  48. ones labeled `"good first issue" <https://github.com/ray-project/ray/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22>`__ and `"help wanted" <https://github.com/ray-project/ray/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22>`__ for a place to start. Look for issues with "[tune]" in the title.
  49. .. note::
  50. If raising a new issue or PR related to Tune, be sure to include "[tune]" in the title and add a ``tune`` label.
  51. For project organization, Tune maintains a relatively up-to-date organization of
  52. issues on the `Tune Github Project Board <https://github.com/ray-project/ray/projects/4>`__.
  53. Here, you can track and identify how issues are organized.
  54. Becoming a Reviewer
  55. -------------------
  56. We identify reviewers from active contributors. Reviewers are individuals who
  57. not only actively contribute to the project and are also willing
  58. to participate in the code review of new contributions.
  59. A pull request to the project has to be reviewed by at least one reviewer in order to be merged.
  60. There is currently no formal process, but active contributors to Tune will be
  61. solicited by current reviewers.
  62. .. note::
  63. These tips are based off of the TVM `contributor guide <https://github.com/dmlc/tvm>`__.