Tuesday, June 19, 2012

Shipment Tracking and Data Syncing

Hi,

This week I spent time working on Syncing of shipment tracking data, available on admin dashboard with student shipment list which is available on student dashboard.  First I sorted out the consumer key and consumer key secret problem which were set to none, by creating an API access key for http://localhost:8080/ and then supplied them in respective fields in http://localhost:8080/site/edit page.  

And the whole week had been a great experience for learning by mistakes. I pushed a wrong commit “Change date format” in gsoc/views/trackings shipmenttracking branch and happened to mix up the commit messages of two patches “Change date format” and “Change worksheet id”  ‘.’ I learnt these situations can be avoided with extra carefulness  while pushing the branch to remote origin.

I also thought of changing the column names in soc.modules.gsoc.tasks.trackings and not to hardcore the worksheet id in spreadsheet link. A discussion with Madhu made me clear that since Google provides us data in the particular format and the code is written according to that so I need not think about that. So the shipment tracking and sync part has been integrated successfully to melange and this week I’ll be working on Proposal Sync and hoping that I’ll make it work by this weekend.

Melange Functional Testing

Hi,

This week i worked on developing test scripts for testing Profile Page and Search Page but i spent major part of this week on developing a script for loading and running these test scripts one by one. Initially i tried to run them with bin/run-tests in soc but i was not successful and faced a lot of issues so i made a new functional-run.py script for executing these test cases one by one in my local environment and the way i want them to run.

Options that i provided in this functional-run.py script:
(1) -r  for report format, whether you want result on console(default) or you want a html based report. If you give the option like this $ python functional-run.py -r "html", a result folder is created in the functional folder where all the test scripts are saved and then it pick up all the files whose name start with "test" and executes them one by one and finally a html based report is saved in functional/results folder.

(2) -v for virtual display, if you want to execute all the scripts in virtual display. when this option is provided script.  All the scripts are executed virtually and you will not see thier execution in firefox. you will only see the final result either on console or in result report depending upon the report format you had chosen.

Currently this script is only for executing functional tests in my local environment.

Monday, June 18, 2012

Planning and Bug Fixes

So this week really hasn't been as productive as I had been hoping it would be between a rather annoying bug in dashboard and a ludicrous amount of time at work. After implementing a less-than-optimal fix where I just manually store the name of the organization for a Connection for the getListData() query in dashboard.py (~line 1270), I have reached a point where:

  • Users and org admins can view Connections that they have initiated (e.g. if a user initiates a Connection, they can view it in their dashboard but the org admin cannot view it under "Requests for My Organizations")
  • The query for the user will actually fetch all GSoCConnection objects involving the User, but will not display them all so I'm assuming it's a Javascript problem
  • The above is true for the org admin side, but I don't thing that the org_admin_for property is being set correctly because it doesn't contain a full list of the organizations that the org admin is responsible for
  • If I had to guess, I'd say that the Javascript will likely be a problem as well once I figure out the above problem.
Given that this is a demo, I think that there are a bunch of changes I'd like to make and it would be counter-productive to spend a bunch of time fixing them. Instead, I think I'm going to try and combine all of the requirements into one module with ConnectionPage and ShowConnection views. Daniel and I have worked out some changes to the Connection module that will simplify the flow of the interaction. Plus, and doing so will give me the extra control I think I need. I have a design of the two views on a legal pad sitting next to me and can either scan them or whip up a Google doc (or Wiki on Google Code) to divulge the design if anyone would like to see it. In the meantime I think I'm going to put the dashboard fix on the back burner so that I can try to work on this connection view.