Thursday, June 11, 2009

Google Summer of Code 2009: Mid Third Week - status update!

Hello everyone,
I am leaving for the bachelor degree final end semester examination. The progress of this week is short and swift. Fixed up the problems Lennard indicated in the GHOP Program view I had submitted. The timeline now works properly for GHOP. In this regard, I added a GHOP Timeline view. Made changes to soc.logic.models.program by replacing the TIMELINE_LOGIC dictionary with self.timeline_logic property in the model to point to GSoC timeline logic. Added an identical property in soc.modules.ghop.logic.models.program to point to GHOP timeline logic.

Added getExtraMenus for GHOP Program view and a GHOP Organization view. Further I am still working on task quota limits. But I am quite sure, it is almost close to complete, given that the background work, i.e its dependencies are already in place.

Catch you all on June 19th. See you!

Monday, June 8, 2009

Newsfeed Status Update

Working on the news_feed feature has required work in all the different sections of the codebase (Model, logic, caching, view, template) and has required updates to about a dozen existing modules. As you can imagine, merging upstream is a fun exercise in getting aquainted with some of the more advanced features of version control.

The mechanics behind the news feed are very simple, at least to start with. Whenever an entity - a document, for instance - is created, updated, or deleted, it gathers a list of receivers. The implementation right now is limited to the scope of linkable models, but luckily that covers almost all of the use-cases where we'd want the news feed to be updated.

A new FeedItem entity is created for each receiver - since the receiver in the current implementation is the scope, the receiver is only one entity, but I'm working on a method to propagate news feed updates like an event bubbling up through a hierarchy.

A news feed is constructed for the receiver entities - such as Program, Organization, Club, etc. - and aggressively cached. The template for the news feed itself is very similar to how blogs are formatted in Melange.

One part of the template has been a big headache - the link redirecting to the sender entity.

Right now, this is what the link HTML template looks like -

href="/{{ item.sender.kind.lower }}/show/{{ }}"

Yes, it's hacky. But it works...most of the time. When the sender's kind name is "Document", then this translates to /document/, which is what we want. But when the sender's kind name is "StudentProject", this is rendered as /studentproject/, while it should be /student_project/. I'm still figuring out how to properly linkify an arbitrary entity...and I tried using the redirect views helper, but I was hoping to do something that wouldn't require any additional server-side code.

The next week has a lot of challenging tasks ahead. Now that the basic implementation is working, I'm going to work on automation and testing. I'm also going to code up an ATOM feed that can be used to export news feed updates. (This shouldn't be a security issue, since news feed updates only include very basic information and a link to the entity for further information)

Surveys also need to have their ACL component finished so they can be taken for midterms...I've struggled with this when attempting it before, but GSOC needs this feature working, so I'm going to have to figure out a way to do it.

Finally, I've also updated logic for surveys and documents so that based on the prefix of the document, it creates a scope property. This way, the scope doesn't have to be retrieved at runtime and the document model is more in sync with the rest of Linkable entities.

Google Summer of Code 2009: Second Week - status update!

Hi everyone,
Time for status update of the second week spanning from June 1st-7th! This week was a very productive one from my point of view. Spent most of the time, rather all of my time coding for Melange this week without any other distractions (especially University :D ). As set out in the previous week's post, I completed moving all the code from app/ghop to app/soc/modules/ghop.

The respective templates and contents of ghop also have been moved from app/ghop/templates to app/soc/templates/modules/ghop and app/ghop/content to app/soc/content/modules/ghop. A python module was added to ghop module and necessary changes have been made in app/app.yaml.template and app/

Secondly all the logic modules corresponding to each model defined specifically for GHOP (app/soc/modules/ghop/models/*) have been defined and committed. These logics are, "do nothing special" logic modules. They just inherit from their respective super classes, but do nothing specific about GHOP yet. The GHOP specific functionality is added in the due course for the necessary logic modules.

Thirdly, as I had said, I mostly concentrated on writing views. My first view, view for GHOPProgram create/edit is almost ready for commit. There are few small changes that are need to be made. I might send the updated patch by tonight. So everything required to get the views working is in place by now. I am also working on writing the second GHOPProgram view required, i.e the task quota limit view. I realized, to define this view, we also require view for GHOPOrganization to be in place. So this is a work in progress for now. I will be completing it as soon as possible.

Unfortunately I could not complete the work GHOPProgram views this week, because of unexpected delays in moves and defining the necessary logic. Also could not take time to include taggable-mixin support in models and could not move to GHOPOrganization views.

I will work on GHOPOrganization views for most of the time this week, along with completing the GHOPProgram views, since the latter is dependent on the former. Also unfortunately, because of my bachelor degree's final semester's end sem examination, I need to break from 11th of June upto 18th of June. I will have no time to work on Melange or anything else other than performing muggathons in long stretches of time(sleepless nights) :( I will not be able to attend conference calls next week, neither will I be able to update the blog/wiki, nor I will be available in GTalk/IRC. But I am quite sure I will compensate for this loss, by slogging in the subsequent weeks to come.

See you all, 2 weeks later :(