CONTRIBUTING.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. .. highlight:: shell
  2. ============
  3. Contributing
  4. ============
  5. Contributions are welcome, and they are greatly appreciated! Every little bit
  6. helps, and credit will always be given.
  7. You can contribute in many ways:
  8. Types of Contributions
  9. ----------------------
  10. Report Bugs
  11. ~~~~~~~~~~~
  12. Report bugs at https://github.com/audreyr/py_thesis_toolbox/issues.
  13. If you are reporting a bug, please include:
  14. * Your operating system name and version.
  15. * Any details about your local setup that might be helpful in troubleshooting.
  16. * Detailed steps to reproduce the bug.
  17. Fix Bugs
  18. ~~~~~~~~
  19. Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
  20. wanted" is open to whoever wants to implement it.
  21. Implement Features
  22. ~~~~~~~~~~~~~~~~~~
  23. Look through the GitHub issues for features. Anything tagged with "enhancement"
  24. and "help wanted" is open to whoever wants to implement it.
  25. Write Documentation
  26. ~~~~~~~~~~~~~~~~~~~
  27. py_thesis_toolbox could always use more documentation, whether as part of the
  28. official py_thesis_toolbox docs, in docstrings, or even on the web in blog posts,
  29. articles, and such.
  30. Submit Feedback
  31. ~~~~~~~~~~~~~~~
  32. The best way to send feedback is to file an issue at https://github.com/audreyr/py_thesis_toolbox/issues.
  33. If you are proposing a feature:
  34. * Explain in detail how it would work.
  35. * Keep the scope as narrow as possible, to make it easier to implement.
  36. * Remember that this is a volunteer-driven project, and that contributions
  37. are welcome :)
  38. Get Started!
  39. ------------
  40. Ready to contribute? Here's how to set up `py_thesis_toolbox` for local development.
  41. 1. Fork the `py_thesis_toolbox` repo on GitHub.
  42. 2. Clone your fork locally::
  43. $ git clone git@github.com:your_name_here/py_thesis_toolbox.git
  44. 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
  45. $ mkvirtualenv py_thesis_toolbox
  46. $ cd py_thesis_toolbox/
  47. $ python setup.py develop
  48. 4. Create a branch for local development::
  49. $ git checkout -b name-of-your-bugfix-or-feature
  50. Now you can make your changes locally.
  51. 5. When you're done making changes, check that your changes pass flake8 and the
  52. tests, including testing other Python versions with tox::
  53. $ flake8 py_thesis_toolbox tests
  54. $ python setup.py test or pytest
  55. $ tox
  56. To get flake8 and tox, just pip install them into your virtualenv.
  57. 6. Commit your changes and push your branch to GitHub::
  58. $ git add .
  59. $ git commit -m "Your detailed description of your changes."
  60. $ git push origin name-of-your-bugfix-or-feature
  61. 7. Submit a pull request through the GitHub website.
  62. Pull Request Guidelines
  63. -----------------------
  64. Before you submit a pull request, check that it meets these guidelines:
  65. 1. The pull request should include tests.
  66. 2. If the pull request adds functionality, the docs should be updated. Put
  67. your new functionality into a function with a docstring, and add the
  68. feature to the list in README.rst.
  69. 3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
  70. https://travis-ci.com/audreyr/py_thesis_toolbox/pull_requests
  71. and make sure that the tests pass for all supported Python versions.
  72. Tips
  73. ----
  74. To run a subset of tests::
  75. $ python -m unittest tests.test_py_thesis_toolbox
  76. Deploying
  77. ---------
  78. A reminder for the maintainers on how to deploy.
  79. Make sure all your changes are committed (including an entry in HISTORY.rst).
  80. Then run::
  81. $ bump2version patch # possible: major / minor / patch
  82. $ git push
  83. $ git push --tags
  84. Travis will then deploy to PyPI if tests pass.