setup.rst 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Contributor Setup
  2. =================
  3. So you want to contribute to django-browserid? Great! We really appreciate any
  4. help you can give!
  5. The documentation below should help you set up a development environment and
  6. run the tests to ensure that your changes work properly.
  7. Get the code
  8. ------------
  9. You can check out the code from the `github repository`_:
  10. .. code-block:: sh
  11. git clone git://github.com/mozilla/django-browserid.git
  12. cd django-browserid
  13. It is a good idea to create a `virtualenv`_ (the example here uses
  14. `virtualenvwrapper`_) for isolating your development environment. To create a
  15. virtualenv and install all development packages:
  16. .. code-block:: sh
  17. mkvirtualenv django-browserid
  18. pip install -r requirements.txt
  19. Running tests
  20. -------------
  21. To check if your changes break any existing functionality, you can run the
  22. test suite:
  23. .. code-block:: sh
  24. ./setup.py test
  25. Before submitting a pull request, you should run the test suite in all the
  26. Django/Python combinations that we support. We support running the tests in all
  27. these combinations via tox_:
  28. .. code-block:: sh
  29. pip install tox
  30. tox
  31. Documenation
  32. ------------
  33. If you make changes to the documentation, you can build it locally with this
  34. command:
  35. .. code-block:: sh
  36. make -C docs/ html
  37. The generated files can be found in ``docs/_build/html``.
  38. JavaScript Tests
  39. ----------------
  40. To run the JavaScript tests, you must have `node.js`_ installed. Then, use the
  41. npm command to install the test dependencies:
  42. .. code-block:: sh
  43. npm install
  44. After that, you can run the JavaScript tests with the following command from
  45. the repo root:
  46. .. code-block:: sh
  47. npm test
  48. .. _`github repository`: https://github.com/mozilla/django-browserid
  49. .. _virtualenv: http://www.virtualenv.org/
  50. .. _virtualenvwrapper: http://virtualenvwrapper.readthedocs.org/
  51. .. _`node.js`: https://nodejs.org/
  52. .. _karma: https://karma-runner.github.io/
  53. .. _`karma-mocha`: https://github.com/karma-runner/karma-mocha
  54. .. _tox: http://tox.readthedocs.org/en/latest/