CONTRIBUTING.rst 3.7 KB

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