8356f43586c915b9f4ec91882417b522f7fafb46
[mediagoblin.git] / docs / hackinghowto.rst
1 ===============
2 Hacking HOWTO
3 ===============
4
5 So you want to hack on GNU MediaGoblin
6 ======================================
7
8 First thing to do is check out the Web site where we list all the
9 project infrastructure including:
10
11 * the mailing list
12 * the IRC channel
13 * the bug tracker
14
15 Additionally, we have information on how to get involved, who to talk
16 to, what needs to be worked on, and other things besides!
17
18
19 How to set up an environment for hacking
20 ========================================
21
22 The following assumes you have these things installed:
23
24 1. virtualenv:
25
26 http://pypi.python.org/pypi/virtualenv
27
28 2. virtualenv wrapper:
29
30 http://www.doughellmann.com/projects/virtualenvwrapper/
31
32 3. git:
33
34 http://git-scm.com/
35
36
37 Follow these steps:
38
39 1. clone the repository::
40
41 git clone http://git.gitorious.org/mediagoblin/mediagoblin.git
42
43 2. create a virtual environment::
44
45 mkvirtualenv mediagoblin
46
47 3. if that doesn't put you in the virtual environment you created,
48 then do::
49
50 workon mediagoblin
51
52 4. run::
53
54 python setup.py develop
55
56
57 When you want to work on GNU MediaGoblin, make sure to enter your
58 virtual environment::
59
60 workon mediagoblin
61
62 Any changes you make to the code will show up in your virtual
63 environment--there's no need to continuously run ``python setup.py
64 develop``.
65
66
67 Running the test suite
68 ======================
69
70 Run::
71
72 python setup.py test
73
74
75 Creating a new file
76 ===================
77
78 All new files need to have the standard GNU MediaGoblin
79 license/copyright header.
80
81 For Python files, include the license/copyright header at the top such
82 that each line of the header starts with ``#``.
83
84 For Jinja2 template files, FIXME.
85
86 For JavaScript files, FIXME.
87
88 For CSS files, FIXME.
89
90 If you're doing the copy-paste thing, make sure to update the
91 copyright year.