Commit | Line | Data |
---|---|---|
5a40e1ec WKG |
1 | .. _hacking-howto: |
2 | ||
00fdc7bd WKG |
3 | =============== |
4 | Hacking HOWTO | |
5 | =============== | |
6 | ||
5a40e1ec WKG |
7 | |
8 | So you want to hack on GNU MediaGoblin? | |
9 | ======================================= | |
56d507b6 WKG |
10 | |
11 | First thing to do is check out the Web site where we list all the | |
12 | project infrastructure including: | |
13 | ||
14 | * the mailing list | |
15 | * the IRC channel | |
16 | * the bug tracker | |
17 | ||
18 | Additionally, we have information on how to get involved, who to talk | |
19 | to, what needs to be worked on, and other things besides! | |
20 | ||
21 | ||
c66d0f5c WKG |
22 | How to set up and maintain an environment for hacking |
23 | ===================================================== | |
56d507b6 | 24 | |
56d507b6 | 25 | |
c66d0f5c WKG |
26 | Getting requirements |
27 | -------------------- | |
56d507b6 | 28 | |
c66d0f5c WKG |
29 | First, you need to have the following installed before you can build |
30 | an environment for hacking on GNU MediaGoblin: | |
56d507b6 | 31 | |
c66d0f5c | 32 | * Python 2.6 or 2.7 - http://www.python.org/ |
56d507b6 | 33 | |
c66d0f5c | 34 | You'll need Python as well as the dev files for building modules. |
56d507b6 | 35 | |
c66d0f5c WKG |
36 | * python-lxml - http://lxml.de/ |
37 | * git - http://git-scm.com/ | |
38 | * MongoDB - http://www.mongodb.org/ | |
39 | ||
40 | If you're running Debian GNU/Linux or a Debian-derived distribution | |
41 | such as Mint or Ubuntu, running the following should install these | |
42 | requirements:: | |
43 | ||
44 | sudo apt-get install mongodb git-core python python-dev python-lxml | |
45 | ||
46 | ||
47 | Running bootstrap and buildout | |
48 | ------------------------------ | |
49 | ||
50 | After installing the requirements, follow these steps: | |
51 | ||
52 | 1. Clone the repository:: | |
53 | ||
54 | git clone http://git.gitorious.org/mediagoblin/mediagoblin.git | |
56d507b6 | 55 | |
719f82ba | 56 | 2. Bootstrap and run buildout:: |
56d507b6 | 57 | |
c66d0f5c WKG |
58 | cd mediagoblin |
59 | python bootstrap.py && ./bin/buildout | |
60 | ||
61 | ||
62 | That's it! Using this method, buildout should create a ``user_dev`` | |
63 | directory, in which certain things will be stored (media, beaker | |
64 | session stuff, etc). You can change this, but for development | |
65 | purposes this default should be fine. | |
66 | ||
67 | ||
68 | .. Note:: | |
69 | ||
70 | We used `zc.buildout <http://www.buildout.org/>`_ because it | |
71 | involves fewer steps to get things running and less knowledge of | |
72 | Python packaging. However, if you prefer to use `virtualenv | |
73 | <http://pypi.python.org/pypi/virtualenv>`_, that should work just | |
74 | fine. | |
56d507b6 WKG |
75 | |
76 | ||
c66d0f5c WKG |
77 | Updating dependencies |
78 | --------------------- | |
56d507b6 | 79 | |
c66d0f5c WKG |
80 | While hacking on GNU MediaGoblin over time, you'll eventually have to |
81 | update the dependencies. To do that, run:: | |
56d507b6 | 82 | |
c66d0f5c | 83 | ./bin/buildout |
56d507b6 WKG |
84 | |
85 | ||
dae6add9 CAW |
86 | Running the server |
87 | ================== | |
88 | ||
89 | Run:: | |
90 | ||
c66d0f5c | 91 | ./bin/paster serve mediagoblin.ini --reload |
dae6add9 CAW |
92 | |
93 | ||
56d507b6 WKG |
94 | Running the test suite |
95 | ====================== | |
96 | ||
97 | Run:: | |
98 | ||
c66d0f5c | 99 | ./bin/nosetests |
56d507b6 WKG |
100 | |
101 | ||
102 | Creating a new file | |
103 | =================== | |
104 | ||
5a40e1ec WKG |
105 | FIXME - this needs to be updated when it's set in stone. |
106 | ||
908dee6b | 107 | All new files need to have license/copyright information. |
56d507b6 | 108 | |
908dee6b | 109 | The following kinds of files get the GNU AGPL header: |
56d507b6 | 110 | |
908dee6b WKG |
111 | * Python files |
112 | * JavaScript files | |
113 | * templates | |
114 | * other files with code in them | |
56d507b6 | 115 | |
908dee6b | 116 | The following files get a CC BY header: |
56d507b6 | 117 | |
908dee6b | 118 | * CSS files |
56d507b6 | 119 | |
908dee6b WKG |
120 | The following files don't get a header because that's hard, but are |
121 | under the CC BY license: | |
122 | ||
123 | * image files | |
124 | * video files | |
5a40e1ec WKG |
125 | |
126 | ||
127 | Quickstart for Django programmers | |
128 | ================================= | |
129 | ||
130 | FIXME - write this | |
131 | ||
132 | ||
133 | Bite-sized bugs to start with | |
134 | ============================= | |
135 | ||
136 | FIXME - write this |