/doc/dev/contributing.rst

https://github.com/MechanisM/mediacore · ReStructuredText · 113 lines · 78 code · 35 blank · 0 comment · 0 complexity · 40af695868eccafa5f71a45f7d88c287 MD5 · raw file

  1. .. _dev_contributing:
  2. =========================
  3. Contributing to MediaCore
  4. =========================
  5. Reporting Bugs
  6. --------------
  7. The simplest way to give back to MediaCore is to report bugs as you find
  8. them!
  9. Please post issues to our `issue tracker on Github
  10. <http://github.com/mediacore/mediacore/issues>`_.
  11. You can always post to our `community forums
  12. <http://getmediacore.com/community>`_ if you aren't sure if its a bug or
  13. not.
  14. Coding Conventions
  15. ------------------
  16. We follow `PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_, which is
  17. practically universal in the Python world. The only exception is that
  18. templates and javascript need not obey the 79 char line limit. Also,
  19. please be sure to use unix line endings.
  20. Documentation
  21. -------------
  22. We use `Sphinx <http://sphinx.pocoo.org/>`_ for our building our documentation,
  23. which is an extension of
  24. `reStructuredText <http://en.wikipedia.org/wiki/ReStructuredText>`_.
  25. To build the documentation you must have Sphinx and Pygments installed. They
  26. were probably installed when you first installed MediaCore, but just in case,
  27. here's how to install them. (This example assumes that you're using a
  28. ``virtualenv`` called ``mediacore_env``, as outlined in the :ref:`install
  29. instructions <install_toplevel>`.)
  30. .. sourcecode:: bash
  31. # As always, don't forget to work in your virtualenv
  32. $ source mediacore_env/bin/activate
  33. $ easy_install Sphinx Pygments
  34. # Build the HTML docs with sphinx
  35. $ cd doc
  36. $ make html
  37. Patches to the documentation can be submitted in the same way as
  38. patches to code, discussed below.
  39. Submitting Patches
  40. ------------------
  41. Generally we request that you create an issue in our `issue tracker
  42. <http://github.com/mediacore/mediacore/issues>`_ for any patch
  43. you'd like to submit. It helps us stay organized in the long run.
  44. Our Git repository is hosted over at `Github <http://github.com/>`_ and
  45. one of their handy features is forking. This perfect for submitting
  46. large features, or anything with two or more people working on it.
  47. There is an `excellent tutorial <http://help.github.com/forking/>`_
  48. on their site, so we won't explain it here. Pull requests can be sent to
  49. Nathan Wright.
  50. We'll explain how to do this if you've cloned our public Git repository
  51. on your local machine, without using Github forking. This is perfect for
  52. bugfixes and smaller features, where only one person is working on it.
  53. .. sourcecode:: bash
  54. # Getting a copy of our git repository (if you haven't already):
  55. $ git clone git://github.com/mediacore/mediacore.git
  56. # Create a new branch and switch to it:
  57. $ git checkout -b your_local_branch
  58. Make your changes and commit them. Once that's done, you're ready to
  59. create a patch for submission:
  60. .. sourcecode:: bash
  61. # Make sure you have the latest changes from our repository
  62. $ git fetch
  63. # Move your branch on top of our latest changes
  64. $ git rebase origin/master
  65. # This creates a file your_patch from the commits in your_local_branch
  66. $ git format-patch --stdout origin/master.. > your_patch
  67. Attach the ``your_patch`` file to an `issue
  68. <http://github.com/mediacore/mediacore/issues>`_ describing the
  69. problem and the fix.
  70. Helpful Resources
  71. -----------------
  72. Git can be a bit overwhelming at first but you'll grow to love it.
  73. * `Rails Contributor Guide
  74. <https://rails.lighthouseapp.com/projects/8994/sending-patches>`_:
  75. the principles are exactly the same.
  76. * `Sourcemage Git FAQ <http://www.sourcemage.org/Git_Guide>`_:
  77. solutions for many common problems.
  78. * `Git Community Book <http://book.git-scm.com/>`_.