== Dev Week -- Helping develop the Ubuntu Websites -- nigelb and mhall119 -- Fri, Jul 15th, 2011 == {{{#!irc [17:01] hello everyone, my name is Michael Hall, and I'm one of the community webapp developers [17:02] you may not know it, but there are several projects that live under the *.ubuntu.com domain that are actually designed, developed and maintained by the Ubuntu community [17:03] among the biggest are the loco directory at http://loco.ubuntu.com and the UDS scheduler at http://summit.ubuntu.com [17:04] a larger (but by no means complete) list of these projects can be found under our umbrella project: https://launchpad.net/community-web-projects [17:05] most of our projects are written in Python and use the Django web framework [17:05] which makes them pretty easy to get started hacking on [17:06] the sites themselves are hosted on Canonical's servers, so we regularly interact with their IS team as well [17:07] any questions about community projects in general? [17:07] abhinav_singh asked: Are there PHP based web projects? [17:08] not yet, no, though we do maintain Wordpress and Drupal themes that match the ubuntu.com page [17:09] not that we have anything against PHP, it just so happens that the projects we've accumulated have all been Python [17:09] though status.ubuntu.com might be in PHP, cjohnston recently added that one so you can check with him [17:12] I'm going to single out the loco directory to show you how to get it set up, but the process will be similar across all of our django projects [17:12] first you need to find the development focus by checking https://launchpad.net/loco-directory [17:13] in this case, it's lp:loco-directory [17:13] so you can just run "bzr branch lp:loco-directory" [17:14] if you plan on making a single contribution, that's easy enough, but if you plan on working on multiple features or bug fixed, I'd highly recommend you follow the guide described here: http://micknelson.wordpress.com/2011/05/19/sharing-your-development-environment-across-branches/ [17:16] for loco-directory, there are instructions for setting up a python virtualenv here: https://wiki.ubuntu.com/LoCoDirectory/Development#Using_Virtualenv [17:16] virtualenv is great for python development because you can use python packages specific to your project, without them conflicting with versions used by other projects [17:17] Django provides a manage.py script that lets you perform various setup and maintenance activities, some of which I'll cover in a minute [17:18] it also provides a settings.py for configuring your project. [17:19] since some configuration settings are specific to your environment, you might want to override them by creating a local_settings.py, an example of which is included in the local_settings.py.sample [17:19] an example of why you would want this is database configuration [17:20] loco-directory uses postgresql by default, but that's a pretty big requirement for development, so you can tell Django to use an sqlite database, which is much simpler [17:21] once you have your django project configured, you will usually run "python manage.py syncdb", which will create any database tables Django needs to save your project's data to the database [17:21] after that, loco-directory provides a couple of commands for populating your database [17:22] the first is "lpupdate", which will perform a series of calls to Launchpad to retrieve the list of loco teams and their admins [17:22] this will give you the minimum amount of data that loco-directory needs, you won't have events, meeting or venue data [17:24] the second option is "import-live-data", which uses the loco-directory's JSON API to populate your local database with a copy of what is in the production site. This will give you everything you need to test out new features or reproduce bugs, but it can take a long time (upwards of an hour) do to the amount of data [17:24] you can do either of these by calling manage.py again: "python manage.py lpupate" or "python manage.py import-live-data" [17:25] but, by far the easiest option is to get a relatively up to date copy of someone else's sqlite database, which I happen to have for you here: http://people.ubuntu.com/~mhall119/loco-directory/ [17:25] once you have that, you can run "python manage.py runserver" to run the loco-directory through Django's built in web server, which is perfect for development and testing [17:26] any questions so far? [17:28] I guess not [17:29] each of our projects generally has a lead developer, who is your best point of contact for getting setup, as well as designing new features of solving bugs [17:29] for loco-directory, the lead is cjohnston [17:29] for summit it's nigelb [17:30] for cloud portal: daker [17:30] and for hall of fame it's cdbs [17:31] the leads generally set the targets for new features, and will also prioritize bugs if necessary [17:31] but you are encouraged to make whatever contributions interest you [17:32] some projects, like loco-directory, will tag small, easy bugs as "bitesize", and this is a good way for you to get starting making a contribution while you get familiar with the codebase [17:32] here's the list for loco-directory: https://bugs.launchpad.net/loco-directory/+bugs?field.tag=bitesize [17:33] once you have your local setup working, the process for contributing is generally the same: [17:33] 1) find a bug or feature to work on [17:33] 2) fix/implement it [17:34] 3) push it to a bzr branch on launchpad using "bzr push lp:~${your username}/${project name}/${branch name} [17:35] where ${branch name} is a unique name for your branch, typically something like "fixes-12345" where 12345 is the bug number [17:36] then you find your branch on launchpad and click the "Propose for merging" link and describe what your branch does [17:36] you should also add a "commit message" on this page, this is what will be added to the bzr log when your branch gets approved and merged [17:37] from there one of the developers on the project (not always the lead) will review your code, and either ask for changes or approve it [17:37] once it's approved, it will automatically be merged into the project's main branch [17:37] all of this is pretty standard for Ubuntu distributed development [17:39] any questions? [17:40] you don't need to know Python to contribute either, there's plenty of work that can be done in the HTML, CSS and Javascript sides too [17:44] Oh, I forgot to mention, discussion of community web projects is held in the #ubuntu-website channel here on freenode [17:44] you can find one or more of us there pretty much any time of day, since we have contributors all over the world [17:46] pleia2 asked: you mentioned that launchpad.net/community-web-projects is not a complete list, is there a more complete list somewhere? [17:47] good question, unfortunately not [17:47] there are several sites that are different mixes of canonical and community involvement, like the wiki, planet, etc [17:47] also some that probably should be on there, but aren't yet, like status.ubuntu.com [17:48] pleia2 asked: do you know the status on the Ubuntu Team Reports project? (I get asked about such a thing a lot by teams who hate using wiki for reporting) [17:49] I don't, dholbach might be able to give you more information on that [17:49] I know it's come up in the past couple of UDSs, but we just haven't had anybody willing to lead the project [17:50] if there are any aspiring community web contributors who want to take it for a spin, that would be awesome [17:51] right now our list of projects is outpacing our number of contributors [17:51] so there are plenty of places for people to get involved [17:51] and we are very encouraging to new contributors [17:52] any other questions before I'm out of time? }}}