tag:blogger.com,1999:blog-109562016079044692024-03-13T10:29:34.882-07:00Melange Development BlogBlog about ongoing development of Melange project. Melange is a web application for representing Open Source contribution workflows, such as the existing Google Summer of Code TM (GSoC) program or Google Highly Open Participation Contest TM (GHOP).Sverre Rabbelierhttp://www.blogger.com/profile/02151436719767191504noreply@blogger.comBlogger180125tag:blogger.com,1999:blog-10956201607904469.post-75007590403678184762012-08-21T05:29:00.000-07:002012-08-21T05:30:17.982-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
This week i worked on creating a results directory feature for tests results. After every test case executes it takes a screenshot and save it in results directory with the test case name , works for both scenarios when a individual test case is executed or entire test suite is run. Also i worked to implement one more suggestion by Leo, i.e. Removing xpath locator's from the test case config wherever id of the web element is available. <br />
<br />
I am reading a lot more these days about features provided by the python standard library and incorporating more features from it to the existing framework. I will continue to implement suggestions by Leo and also on some new features or test cases.<br />
<br />
I really enjoy a lot working with melange and i enjoyed all this time i worked on framework. I felt happy every time i saw a test case ran successfully. It is fun to see functional tests executing. <i>Leo</i> is a really great guy, he helped me whenever i needed his help. I am really thankful to him for his valuable suggestions from time to time and his help on various aspects of my work. Also i am very thankful to <i>Lennard</i> for his code reviews and his help in improving the entire framework.<br />
<br />
These three months i worked with you people were really awsome. Now I work harder than i used to do, I am more confident than i used to be. <i>THANKS A TON</i> for everything :)</div>
Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-463289237976604042012-08-20T17:22:00.000-07:002012-08-20T17:22:59.922-07:00Wrapping Up GSoC 2012Hey all,<br />
I've spent this week working on the connection tests (one of which I'm having trouble with) and working on fixes for what I thought were fixes for the anonymous connection activation, but with school around the corner (like tomorrow) I've been pretty busy. I'm not too worried though since I think I got a lot of stuff done this second midterm and I'm going to be hanging around anyway to make sure everything gets finished. I'd really really like to see my code end up in production and I think it's pretty close in terms of functionality - the tricky part will be removing all of the invite/request code that we don't need anymore. One thing I want to note is that I added a pass and a todo in one of the tests in connection so that it doesn't break anything, but if anyone wants to look at it you're more than welcome to.<br />
<br />
On another note, this will be my last post as part of the GSoC 2012 program! Again I'll still want to hang around and do what work I can while I'm in school and maintaining a part time job (among other things), but I've had an awesome experience working with the Melange team and I've learned a ton. I'm looking forward to working with everyone in the future, but I've really enjoyed working on Melange for my Google Summer of Code project.<br />
<br />
- Drewdcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-43085193954560781862012-08-14T09:06:00.002-07:002012-08-14T09:06:31.724-07:00Wrapping Up and TestingHey all, sorry for the <i><u>super</u></i> late blog post this time. I've spent my Melange time this week working on a potpourri of issues that Lennard has kindly pointed out for me by volunteering to try to break my code. Some of these smaller fixes include:<br />
<br />
<ul>
<li>Including the message from the form in the connection notification email</li>
<li>Sending connection emails to the person it's actually supposed to be sent to</li>
<li>Added an email field to AnonymousConnection that prevents sending duplicate invitations to the same email address</li>
<li>Added an error flash message to OrgConnectionPage and a url parameter in order to notify the user when the above condition arises</li>
<li>Added functionality to gsoc/views/profile that will automatically promote users to the role offered by the org</li>
<li>Changed the representation of a message in soc/models/connection/Connection to a db.TextProperty so that the form will render its Textarea widget correctly and allow for multiline input</li>
<ul>
<li>Removed the widget override for message in Meta</li>
</ul>
<li>Using commas instead of semicolons now for the emailed/dupes parameters that are posted back onto the OrgConnectionPage in order to support displaying multiple emails </li>
<li>Fixed a bug that allowed the existence of a User entity to prevent a person from being marked as "anonymous" (no GSoCProfile) to establish an anonymous connection</li>
<li>Added an extra column to dashboard to display the status of a connection</li>
<ul>
<li>Added a status() method to the connection model to get a quick, user friendly status and replaced the _determineStatus method (which I hated) in the ShowConnection page with a call to GSoCConnection.status() and display it in a single status field.</li>
</ul>
<li>Now registering with an anonymous connection also redirects you to the dashboard</li>
<li>Incorporated Lennard's welcome email code for new mentors in <a href="http://code.google.com/p/soc/source/detail?r=ec45b9f4c37a0b429816b3cd32e90283d74a25e5" target="_blank">this commit</a> into connection for org admins and mentors</li>
</ul>
I've also been delving deeper into the testing suite and determining what to test and how to do it; this is what I'll be working on for the rest of the week. One dilemma I do have is when a user accepts an org admin connection and is promoted as such, they have the ability to view the status of their own connection. I need to either remove all actions from the connection form or delete the connection after it's been completed (assuming the user did not accept only the mentor position out of an org admin offer), which is a small shift in the logic of the connection and is something I want to discuss at the weekly conference today. Again, sorry for the late post!!!dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-9708484377320150402012-08-14T03:36:00.001-07:002012-08-14T03:36:44.701-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hi,<br />
<br />
This week i worked on things like removing the need to specify manually whether we are identifying an element by xpath or id, instead let the modules do it for you. This was one of the suggestions from Leo which i implemented this week. Apart from that i worked on killing the server as soon as test case has finished execution although some minor changes can be made to it in course of time.<br />
<br />
Also i fixed the clear function in seed_db.py and started to make changes in seed_db so that it fits my need. Now seed_db in my branch first clear the already present data in the datastore and after that it seed the datastore. Changes were also made to all the test cases so that they fit in with the changes in base module. Next week i am planning to add some more features to the existing framework.</div>
Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com1tag:blogger.com,1999:blog-10956201607904469.post-88353366501404741912012-08-07T04:10:00.000-07:002012-08-07T04:10:55.585-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hi,<br />
<br />
This week i worked on creating assertTextIn(), openUrl() and clearDatastore() methods, fixed import order, synchronization problems and changing names of few fields along with others. Major part of the week spent in reading and experimenting, trying to find out how the framework can be improved.<br />
<br />
Currently local server starts at a random port and execute the tests, clears the datastore after every test but it has to be improved to get it working even for remote instances. Next week i am planning to improve clearDatastore() method and start working on suggestions made by Leo.</div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-53330584856973335222012-08-06T15:57:00.004-07:002012-08-06T15:57:55.887-07:00Anonymous Connections, aka Mentor/Admin InvitesHey all,<br />
So as you may (or may not) know, I flew home Monday morning to drive up the the Adirondacks in New York with my family to visit my neighbors and came back very late on Thursday. Incidentally, I had 0 internet or cell phone service for 3 days. None. Zilch. It was incredible. That said while I may have gone 100% dark on you guys, I didn't have a flood of emails waiting when I got back so hopefully you all weren't too mad at me. Better yet, I got a bunch of work done up there; so much that I only missed the timeline by like a day. Which probably should have been longer anyway.<br />
<br />
So unfortunately I wasn't able to do the daily snippet emails, so if you'll bear with me and take a peek at my big ol' commit on my <i>connection</i> branch and tell me if I screwed anything up I'd really appreciate it. Style should be ok, I've made an effort to improve it for fear of death by Daniel. The process looks a little like this:<br />
<br />
<ol><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4lxNmNE1I-L8cZdpwYvDTuIdyLTe16yiaRQOnn1bm_N3wDbPtg-6QRoo2SVCCg4V_sTHS1LUmXgFwPyCqHnwAXe4uLQ8AsIBjA__K8bET6ZgAKDYDJjIDB55L8TPD6_bhZw5105ABKsM/s1600/Screen+Shot+2012-08-04+at+8.44.55+PM.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4lxNmNE1I-L8cZdpwYvDTuIdyLTe16yiaRQOnn1bm_N3wDbPtg-6QRoo2SVCCg4V_sTHS1LUmXgFwPyCqHnwAXe4uLQ8AsIBjA__K8bET6ZgAKDYDJjIDB55L8TPD6_bhZw5105ABKsM/s400/Screen+Shot+2012-08-04+at+8.44.55+PM.png" width="400" /></a>
<li>Org admin clicks the "Start Connection" link inside an org homepage and is redirected to the OrgConnectionPage view, which looks pretty much the same.</li>
<li>Admin enters the emails and/or link_ids of users they wish to connect with and clicks the submit button. </li>
<li>OrgConnectionForm separates the valid link_ids/emails and the emails without any GSoCProfiles to be used by the generate() method</li>
<li>Page displays something like the picture above for all emails that were sent notifications.</li>
<li><span style="text-align: left;">The users receives an email with a link that looks pretty much like this: <</span><span style="text-align: left;">http://localhost:8081/gsoc/profile/mentor/google/gsoc2009/08b7e441bd0ede68f7b2421bd8e2f6e0> where that last ugly section is an md5 hash of the AnonymousConnection object created as a placeholder.</span></li>
<li style="text-align: left;">The user follows the link, signs in, and is directed to create a GSoCProfile</li>
<li style="text-align: left;">Once the user clicks submit, the AnonymousConnection object is deleted and replaced with a GSoCConnection object.</li>
<li style="text-align: left;">Normal interaction with the connection continues from here</li>
</ol>
<div style="text-align: left;">
All in all, this pretty much took a couple of modifications and a second transaction in OrgConnectionPage, an additional url configuration for gsoc/views/profile, a template and another method in notifications. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I need to test this on the production server, which brings me to my current situation: my changes are taking effect locally but not on my appengine instance. I tried building with paver again but I'm kinda stuck here and am probably going to need help since complex build phases are not included in my list of string skills (yet :P). If you have a fix and would like to email me I'll keep an eye on it, but I'll probably just end up harassing you all on the conference call tomorrow.</div>
<br />dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-53222016493019965502012-07-31T04:35:00.000-07:002012-07-31T04:35:34.656-07:00Melange Functional Tests<div dir="ltr" style="text-align: left;" trbidi="on">
Hello everyone,<br />
<br />
This week i did not work much due to reasons concerning my health, although i managed to consolidate loginOnLocalhost() and loginByGoogleAccount() in to a single login() method. Also i deprecated the setup() method and merged its functionality with init() method. Renamed a few methods so that nose runner picks up them in order.<br />
<br />
Next week i am looking forward to implement suggestions of Leo on running a separate dev server for each test
process and clean the data store after each test case. It is a much better way as compared to the current implementation. Also i am looking forward to solve the problem of code duplication in tests and make the test suite clean and much better.</div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-68866097455363959292012-07-24T02:29:00.000-07:002012-07-24T02:30:14.789-07:00Melange Functional Testing: New Tests<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hello,<br />
<br />
This week i worked on creating the following test scripts:<br />
<br />
(1) <a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gsoc_proposal.py?name=functional_testing">test_gsoc_proposal.py</a><br />
(2) <a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gsoc_faq_page.py?name=functional_testing">test_gsoc_faq_page.py</a><br />
(3) <a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gsoc_events_and_timeline.py?name=functional_testing">test_gsoc_events_and_timeline.py</a><br />
(4) <a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gsoc_connect_with_us.py?name=functional_testing">test_gsoc_connect_with_us.py</a><br />
(5)<a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gci_timeline.py?name=functional_testing"> test_gci_timeline.py</a><br />
(6) <a href="http://code.google.com/p/soc/source/browse/tests/functional/test_gci_tasks_page.py?name=functional_testing">test_gci_tasks_page.py</a><br />
<br />
Next week i will work on improving the test scripts. GSoC Proposal test was quite fun, It involved iframe. Switching to iframe and then switching back was interesting. It is good to see executing functional tests :)<br />
<br />
<br /></div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-23988211653891581372012-07-23T17:47:00.001-07:002012-07-23T17:47:08.784-07:00Comments & Connections Finally Play NiceIf you've been following my series of "Daily Snippet" posts to the melange-soc-dev list, you'll know that I've made a whole bunch of fixes and may even be eagerly awaiting to hear whether I actually got this working. I'm happy to say that the ShowConnection page now supports the user and org admins leaving comments on a connection now accompanied by more reliable buttons, reasonable status messages, and a bunch of stability fixes. At the risk of boring both of us to tears (you by reading this and me by typing it), I'm going to glaze over what I've done this week. If you want more details I would be happy to provide them, or you can dig back through the Daily Snippet messages.<br />
<br />
<ul>
<li>Fixed Connection notifications in the User/Org ConnectionPage transactions</li>
<li>Modified template for above notification so that it's a little cleaner</li>
<li>Revamped ShowConnection's checkAccess() method so that it actually does what it's supposed to (and added a connectionFromKwargs() method to the Mutator class)</li>
<li>Added newCommentContext() to gsoc.logic.helper.notifications for notifications of new Connections</li>
<li>Added getComments() to and made associated changes in ShowConnection's conext() method</li>
<li>Modified/Stole code from proposal_review and put it in the show_connection template in order to display GSoCComment instances</li>
<li>Added PostHandler() class (also stolen from proposal_review) to gsoc/views/connection.py and modified it to work for Connections. Also added it to gsoc callback</li>
<li>Added associated URL patterns to gsoc/views/helper/url_patterns and url_names</li>
<li>Modified commentVisible() in soc/views/helper/access_checker to take an org argument so that it can be used by both proposal_review and connection without extensive modification - also modified where it is invoked in those two modules</li>
</ul>
<div>
There's probably more, but I think that this is a good list. Take a peek at the results:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B5YFf5TAs3y_ux5uHdRnSkoxiUaKpFvbF29x9MTETa66DIz8p3uJH-AQxq_i0f8r5IAmWXd54obRYFYJz42QHhwpZyPmjgs8l5YaQBq4sikMEiD1tZ1aQBv1mSQzmTNrjcM3sXPhREo/s1600/Screen+Shot+2012-07-23+at+7.24.24+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B5YFf5TAs3y_ux5uHdRnSkoxiUaKpFvbF29x9MTETa66DIz8p3uJH-AQxq_i0f8r5IAmWXd54obRYFYJz42QHhwpZyPmjgs8l5YaQBq4sikMEiD1tZ1aQBv1mSQzmTNrjcM3sXPhREo/s320/Screen+Shot+2012-07-23+at+7.24.24+PM.png" width="290" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
User perspective:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfE7KA0l5hvW2DZrum3NNLvd1cXGRIJF16gr_53K1tl8BAo933kVH01c7mFriFtCeFS91mhE8y3xG8D0bHjJY4YAHXVxRk5iq-rpzwdA5iMMM4ac2l-nQ42VSyNwIpR5ZGVS1b4cwAxIY/s1600/Screen+Shot+2012-07-23+at+7.25.36+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfE7KA0l5hvW2DZrum3NNLvd1cXGRIJF16gr_53K1tl8BAo933kVH01c7mFriFtCeFS91mhE8y3xG8D0bHjJY4YAHXVxRk5iq-rpzwdA5iMMM4ac2l-nQ42VSyNwIpR5ZGVS1b4cwAxIY/s320/Screen+Shot+2012-07-23+at+7.25.36+PM.png" width="300" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Same data, org admin perspective:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEian0E_e2WK165BPH1d1vATFjUd0RVU-crGbVQzysNHNZwBr8bALR-FN2Oj_dmZzLj0txmPVE5PvaZvJEL966iudwtM55fEbEjw5OjJWlleQlukKfA2KMMTcjsmNGpqL-EyDte_8vbAa84/s1600/Screen+Shot+2012-07-23+at+7.40.18+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEian0E_e2WK165BPH1d1vATFjUd0RVU-crGbVQzysNHNZwBr8bALR-FN2Oj_dmZzLj0txmPVE5PvaZvJEL966iudwtM55fEbEjw5OjJWlleQlukKfA2KMMTcjsmNGpqL-EyDte_8vbAa84/s320/Screen+Shot+2012-07-23+at+7.40.18+PM.png" width="236" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This snippet idea was awesome, it really helps keep me on track and motivates me to get what I need done on time. I'm going to make one more change and try to eliminate the query in connectionFromKwargs() mentioned above and will commit everything tonight. The two big things on my radar right now are inviting users without profiles (or even entities) and integration; I need to start by fixing a link Daniel sent me on my production instance. </div>
<div>
<br /></div>dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-42394598779627909462012-07-17T05:29:00.000-07:002012-07-17T05:29:43.638-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
This week i worked on writing a temporary script to start the server and seed_db automatically on giving command $bin/run-tests tests/functional and starts execution of functional tests. The data store file is also saved in a temporary location so that functional tests do not overwrite the local data store. I also worked on planning test scripts for: <br />
GSOC Events & Timeline Page.<br />
GSoC Proposal Page.<br />
GCI tasks Page.<br />
Connect With Us Page.<br />
GCI Events and Timeline<br />
GCI Home Page<br />
GCI Search Page.<br />
FAQ page.<br />
<br />
Next week i will work on creating specific test cases on the remaining scripts as mentioned in my proposal timeline.<br />
<br />
P.S.: THANK YOU !!!</div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-86306571859695133742012-07-16T14:25:00.002-07:002012-07-16T14:25:54.114-07:00Improvements and Git ChaosHey all,<br />
<br />
So in light of the recent Midterm Evaluations (and I'm still here, woot!) I haven't been very active with updating my branch in anticipation of a wave of feedback and suggested changes that I would need to make to be able to commit anything else. That said I got some feedback on things I needed to change in the connection module today and immediately applied them, mostly style issues but a couple of fixes including removing a gratuitous query and adding inheritance for the ConnectionForm. I had done this originally but it was clumsy and I ditched it, but it's a lot prettier now.<br />
<br />
In keeping up with my timeline [0] I added a query in the connection module to essentially rate-limit the number of existing pending connections a User is allowed to have in order to try and prevent spamming. A user can have no more than three existing Connections without response for an org admin at a time, at which point they are prevented from creating any more. I've also been sketching up and thinking about how to add comments to the ShowConnection page in order to make it easier for users and org admins to communicate. It's likely going to almost identical to that of the proposal_review module and its pages since I like that format, but it's a work in progress.<br />
<br />
I spent a good amount of time wrestling with my working directory in git since I remembered that I would not be able to make fast-forward commits once I reset my changes on connection_demo to master so that I could update the branch and then apply the connection templates and associated models. I should probably have merged the connection_demo branch back with my backup branch and then made my changes, but instead I added them on top of the existing chaotic working directory and threw a whole new headache into the mix. So what I did was end up branching off master and then applying all of these new changes in a nice super commit, so sorry about that to anyone who is fundamentally disturbed by my actions.<br />
<br />
I don't think I shared my updated timeline with the development list correctly so I changed its permission settings, so you guys should be able to check it out now.<br />
<br />
[0] <a href="https://docs.google.com/document/d/10iYPYh2Y_U3nMzI7-g_HzT-xz9QbavM7ni6wLH_y3P0/edit" target="_blank">Drew's Melange Timeline</a>dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-50286303051225577282012-07-10T10:53:00.003-07:002012-07-10T10:54:58.635-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="internal-source-marker_0.7142894510179758" style="text-align: -webkit-auto;"><span style="font-family: Times, 'Times New Roman', serif;"><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Hi</span><br /><span style="background-color: transparent;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">I have been working on proposal sync this week. Initially “Sync with Google Documents” was not appearing as linked on proposal submit page, according to orcun’s design an authorization window pops up clicking on this link. Then a talk with Madhu made me realize that the view being rendered by v2.modules.gsoc.proposal.base.py on proposal submit page has a dependency block which contains melange.gdata.core melange.gdata and melange.autocomplete, which have been imported from soc.content.JS. Present melange codebase does not have melange.gdata.js file. The Java Script view on proposal submit page is actually provided by files in JS folder (imported in dependency block). I had to copy melange.gdata.js file in current shipmenttracking branch from orcun’s code and its minimized version in js.min file folder.</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">This folder contains minimized version of javascript files. We run closure compiler, when we publish online and at that time these minimized files are loaded instead of files in js folder to make loading faster. Since I am working on local instance I have made changes in app.yaml to load JS files from js instead of js.min.</span><br /><span style="background-color: transparent;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">I learnt about using ‘firebug’ and ‘chome development console’ to check JS errors in the code while the web page loads. Working with these makes it very easy to find out where the error is being generated from. Initially the melange.gdata could not load and displayed LoginFactoryFunction is not a function which resides in melange.gdata.js file.</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">I renamed melange.gdata.core to melange.gdata in melange.dependencies and something started working now. There appeared a blank popup which was mainly meant for authorisation to access the Google Docs. </span><br /><span style="background-color: transparent;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">I have proposal syncing working to some extent now, there are no errors on the client side and I have to dissect the problem on the server side. I have updated my online instance[0] and you can check the demo when submitting a proposal.</span><br /><span style="background-color: transparent;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">[0] </span><a href="http://melange-aditi1.appspot.com/"><span style="background-color: transparent; color: #1155cc; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">http://melange-aditi1.appspot.com/</span></a></span></b></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-84475309211057223232012-07-10T06:42:00.000-07:002012-07-10T06:42:49.433-07:00Melange Functional Testing: Adding More Tests<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hi,<br />
<br />
This week i worked on adding test cases to already existing test scripts. I also added code to subclass all the test cases from FunctionalTestCase class where FunctionalTestCase class now inherits from unittest.TestCase. Code cleaning continued this week too, added new comments in some test cases and updated comments in almost all tests cases. Added two more test cases to GSoC Student Registration Test, one test case to GSoC profile test case, one test case to both GCI dashboard and GSoC dashboard tests. Also i did changed the names of test methods so that in case a test fails it will be easy to locate which test case belonging to which tests script failed.<br />
<br />
I also played with parallel execution of test cases. It saves a lot of time. To run tests in parallel we just have to pass the number of processes as argument i.e. $bin/run-tests --processes=5 tests/functional/<br /></div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-69521229090672930432012-07-09T18:42:00.000-07:002012-07-09T18:42:06.887-07:00Adjustments, Improvements, and seed_db AnticsHey all, so this week has been rather low key as I've been awaiting feedback and suggestions from everyone, but I've gotten my branch to a point where it should theoretically be ready to be merged into the main code.<br />
<br />
So far I've done mostly cleanup work, such as adding comments to the Connection model and fixing style issues in some of my other work. Some substantial modifications I've made include cleaning up the AccessChecker class in soc.views.helper, which got pretty cluttered between my hacked-together initial demo which basically just involved me switching out Request object stuff with the Connection object. I marked a bunch of methods in that class for future removal when my code gets merged into the main branch, stuff like _canAccessRequestEntity really won't need to be there anymore since the invite and request modules will be removed an as many methods related to them as possible without breaking anything. I also removed methods that I had written but were no longer using, which cleaned up a bunch of the accumulated clutter. The status messages needed some work so I changed how the status message presented to the user is determined when viewing a connection and it seems to be working, but I'll continue to improve upon it. While doing that I realized that there was a logical bug that allowed users promoted to org admins to view and modify their own connections, which I prevented by adding a line in the canViewConnection() method in ShowConnection's checkAccess method.<br />
<br />
Also at Daniel's suggestion I moved the HTML template that the module was using into its proper location within the gsoc template subdirectory rather than the soc request one where it was previously located. I've begun working on the tests for the connection module but only have a skeleton for the moment and am going to dedicate time to working on that module very soon.<br />
<br />
I emailed the list about this, but nothing I do seems to enable seed_db on my appengine instance. I've made soc.logic.system.isDebug() method return True and after that even took the if statement out of soc.views.legacy so that the seed_db url pattern will always get added in, yet when I deploy it nothing seems to work. Lennard's given me some great advice on setting this up but as to why this still isn't working I'm clueless. My next step might be to try just running the seed method on the GAE interactive console to populate some data, but I'm working to get this resolved so that you all can mess around with a running instance of my code.<br />
<br />
For when I do manage to get this to work, here are some instructions as to how to test everything out:<br />
<br />
<ol>
<li>Create a mentor profile</li>
<li>Log in with either the default admin profile or your new mentor profile</li>
<li>If you're an org admin, go to My Dashboard -> My Organizations -> select an org -> Start Connection -> input either the email address or link_id of your mentor profile -> Submit. If you're a mentor, get to the "View all participating organizations" page -> select an org -> Start Connection -> Submit. </li>
<li>The connection should be available in Dashboard -> My Connections, though there is a bug I'm working out that has to do with the org_admin_for variable in the dashboard module in gsoc; it may be something to do with the data populated by seed_db. You can avoid this bug by doing everything through Organization 0</li>
</ol>
<div>
That's it. Let me know if anything isn't working and I'll fix it, I'm on a straight sprint right now trying to get seed_db to work/populate the datastore asap.<span style="background-color: white;"> </span></div>dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-29537479631337033202012-07-03T10:14:00.003-07:002012-07-03T10:51:30.991-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Times, 'Times New Roman', serif; font-size: x-small;"><b id="internal-source-marker_0.1576774255372584" style="text-align: -webkit-auto;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Hi</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">The week spent in struggling to find the difference between the online instance and the local instance of melange, since the same online instance was not showing shipment, projects and proposals on student dashboard, which I could see in the local instance. I used localhost:8080/_ah/admin/interactive console to create entities as Lennard said that it was the right way but unfortunately it did not work too.</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Actually, I did not realize that I was signed in as an admin in the online instance instead of as a student while accessing the student dashboard via the URL. The code in gsoc.views.dashboard only allows a student, who has project to see the shipment, proposal and project components. </span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">We have specifics about the spreadsheet too, like it should have exactly the same columns as listed in the task/trackings.py and two worksheets with gid=0 and gid=1, otherwise, the syncing fails. </span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">So I created a student profile to see if I can see the shipment details after syncing. I also manually set student_info.number_of_projects=1 so that the student components are rendered. The syncing now can be done successfully. You can see the demo in my instance.</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">The details are:</span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Instance: </span><a href="http://melange-aditi1.appspot.com/"><span style="background-color: transparent; color: #1155cc; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">http://melange-aditi1.appspot.com/</span></a><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Student username: <redacted></redacted></span></b></span><b id="internal-source-marker_0.1576774255372584" style="text-align: -webkit-auto;"><a href="mailto:atmelange@gmail.com"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">atmelange@gmail.com</span></a></b><span style="font-family: Times, 'Times New Roman', serif; font-size: x-small;"><b style="text-align: -webkit-auto;"><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">password: <redacted></redacted></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Public Spreadsheet: </span><a href="https://docs.google.com/spreadsheet/ccc?key=0AuENNrqFbxWEdFVIaVJSczZOSkVPUWc0MWFrOEo2cXc#gid=0"><span style="background-color: transparent; color: #1155cc; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">https://docs.google.com/spreadsheet/ccc?key=0AuENNrqFbxWEdFVIaVJSczZOSkVPUWc0MWFrOEo2cXc#gid=0</span></a><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">After this I started working on proposal syncing. I added useGDataJS function in soc.views.helper.response.py for proposal syncing which was missing in the patches supplied by Orcun. I am stuck now at “Sync with Google Documents” not being </span></b><b id="internal-source-marker_0.1576774255372584" style="text-align: -webkit-auto;"><span style="background-color: transparent; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">appearing as linked. I have mailed Orcun for his help and will proceed further.</span></b></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-75421928408837583932012-07-03T04:38:00.000-07:002012-07-03T04:40:15.955-07:00Melange Functional Tests.<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hello everyone.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
This past week i worked on cleaning the scripts and making the code better. I am making an entire framework using selenium and python for the first time, so its obvious there will be mistakes and i am making a lot of mistakes but this is how i am learning. Everyday i learn something new and its not only about coding skills , but a lot more. My communications skills are improving , i am learning about processes and many other things. I have made a couple of scripts till now, they are running fine but there is lot more space to improve. Oh wait, do they really run. Everybody likes screenshots. How about a video !!!<br />
<br />
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/eLWjukS54b8?feature=player_embedded' frameborder='0'></iframe><br />
<br />
Speed of exceution as shown in the video is different as compared to original execution. If you wish to see that please clone my branch at google code [0] and give a shot to functional tests. However execution of these tests does not mean that these test scripts are done. There is a lot of space for improvement and a lot more to be done. In the video you will see the execution of following scripts:<br />
<br />
test_gci_about_page.py<br />
test_gci_dashboard.py<br />
test_gci_leader_board.py<br />
test_gci_student_registration.py<br />
test_gsoc_about_page.py<br />
test_gsoc_accepted_orgs_page.py<br />
test_gsoc_dashboard.py<br />
test_gsoc_profile_page.py<br />
test_gsoc_search_page.py<br />
test_gsoc_student_registration.py <br />
<br />
<form class="src_nav">
Most of all i am enjoying a lot working on this project. Not only this project is adding to my coding skills but also educating me on how effectively we can contribute to open source projects.</form>
<br />
[0] http://code.google.com/p/soc/source/browse/?name=functional_testing<br />
<br />
<br />
<br /></div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-30311202940589854812012-07-02T19:17:00.001-07:002012-07-02T19:17:52.129-07:00Functional Connection ModuleHey there, so this past week I've been working out the kinks I've been avoiding having to deal with and "finalizing" as much as possible for the first fully working implementation of the connection module. And also doing pretty much all the work on ShowConnection. I feel like I've got an excellent handle on the URL configuration and redirect stuff, so I'm pretty pumped about this. This round the code seems to be free of stupid mistakes (e.g. <i style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; white-space: pre-wrap;">if org_mentor is False and org_org_admin is False:</i><span style="background-color: white;">, which Lenard pointed out to my </span><span style="background-color: white;">amusement</span><span style="background-color: white;">/horror) and does everything I think it's expected to. Excited? Wonderful, me too.</span><br />
<span style="background-color: white;"><br /></span><br />
I had accidentally moved the line to run the method to create the entity inside of a transaction outside of the foor loop for users in OrgConnectionPage, so after fixing that and something else (I forget what it was) I got the form to start properly creating entities again. Speaking of the form, it also now supports either a drop-down or a radio button if you uncomment the code in order to allow an org admin to choose the role to offer the user. I also made some changes to the template that the views were using in order to properly display form erros this time around, which was causing a certain degree of frustration and occasional raging. So this is fully working by my expectations, but do let me know if there's anything else that this view is supposed to do other than create a GSoCConnection model. Oh, a screenshot you ask? Well alright.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheL3AqjZEH8YponQxSCCcCs4bayg5zAvzHXzkTQrUAYe6i-ka9qbcDpXU2QLlPoLQ4uFvxyk_QwwRinZy1oxzssWIqOjpRD36qLceBG2cqAgxzoAPlKy4FpciSenyX-qSnyMdSscgtB_4/s1600/Screen+Shot+2012-07-02+at+9.42.49+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheL3AqjZEH8YponQxSCCcCs4bayg5zAvzHXzkTQrUAYe6i-ka9qbcDpXU2QLlPoLQ4uFvxyk_QwwRinZy1oxzssWIqOjpRD36qLceBG2cqAgxzoAPlKy4FpciSenyX-qSnyMdSscgtB_4/s320/Screen+Shot+2012-07-02+at+9.42.49+PM.png" width="307" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Next, we have the user side of things. I modified pretty much the same stuff as OrgConnectionPage as I recall, which was basically just entity creation and template modification for errors. Here's what it looks like:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBg8NDqzlwcG4Oxf9KX2V_WbbgaiNdtPlyplGm8Qva1Z48JexxcGGZxf8gUfBxwtS1jTVkU3ZIhs-oSzF4qc1qgJiYqwPZidc3MAkR23F94Ml4qiDO4FNqpw2xB0ecYgjlE_64EIqDF6s/s1600/Screen+Shot+2012-07-02+at+9.48.44+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBg8NDqzlwcG4Oxf9KX2V_WbbgaiNdtPlyplGm8Qva1Z48JexxcGGZxf8gUfBxwtS1jTVkU3ZIhs-oSzF4qc1qgJiYqwPZidc3MAkR23F94Ml4qiDO4FNqpw2xB0ecYgjlE_64EIqDF6s/s320/Screen+Shot+2012-07-02+at+9.48.44+PM.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Most of the work was dedicated ShowConnectionPage. I messed around with the URL configuration in order to get it to display properly. You can get to this page through the dashboard, though now the dashboard will display ALL GSoCConnection objects rather than just those related to the current user or org admin. One thing I need to fix is the org_admin_for member of the RequestData object in the dashboard object that handles displaying the connections, as it's only populating with one org. In the meantime this view itself works with a proper checkAccess() method and template to display all of the buttons. Though the buttons could be spaced out and organized better; this will be a refinement I intend to tackle in the second half of GSoC :). A user and an org admin are presented with buttons that allow them to take action in response to the current state of the connection, notably that a user can accept only a mentoring role if they are offered an org admin role. There are a series of methods to handle promoting the user in the event that the org admin and user change their side of the connection to equivalent values. In the spirit of a gratuitous number of screenshots, here's a picture of a mentor invitation on the org admin side:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNT-1nuxYnzYBlqCDcWpdqQzFhY5A8GHS33qYnoc5pdixWTQLeaLKgfF3aktHzaQ-fYwON8yLx6kgEqrhfGJ4DUWLFxTQ4MkXsC0bgunUHloJuB4k9sV2NwVl22gCBJPU9phZNCp55nbA/s1600/Screen+Shot+2012-07-02+at+10.07.49+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNT-1nuxYnzYBlqCDcWpdqQzFhY5A8GHS33qYnoc5pdixWTQLeaLKgfF3aktHzaQ-fYwON8yLx6kgEqrhfGJ4DUWLFxTQ4MkXsC0bgunUHloJuB4k9sV2NwVl22gCBJPU9phZNCp55nbA/s320/Screen+Shot+2012-07-02+at+10.07.49+PM.png" width="320" /></a></div>
<br />
Among other modifications include changes to the show_connection() method in the soc/views/helper request_data module in order to reflect a change in URL schema, AccessChecker's canViewConnection() method in order to determine who can view a GSoCConnection, and the soc/views/helper/notification connectionContext() method and associated template for email messages when a new connection is formed.<br />
<br />
All of the above changes can be found on the main repo in an updated version of the connection_demo branch, so feel free to give it a look. I won't go so far as to say that for a first version it's perfect, but I think it's a great basis upon which we can make refinements and improve this mechanism. I've still got a little time to make adjustments before the midterm evaluation, so if there's anything you would like to see added or done differently than let me know and I'll get it done.<br />
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;"><br /></span>dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-43995891081278139762012-06-26T09:27:00.000-07:002012-06-26T09:27:05.204-07:00Shipment Tracking and Proposal Sync<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: -webkit-auto;">
<b id="internal-source-marker_0.6359099589753896"><span style="font-family: Times, 'Times New Roman', serif;"><span style="background-color: transparent; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Last week I worked on making the shipment tracking work on a live instance. I deployed the working instance to appspot and I faced the same problems that I faced locally. The syncing did not work because of the missing program key. I am sure that a program is seeded because I use seed_db to seed the datastore. I select the program GSoC 2009 in /site/edit too if its available and sometimes the programs doesn’t even appear in /site/edit after multiple seeding too. I spent quite a lot time trying to figure out where the problem is but in vain. At last, I approached Madhu for help but we could not fix up any meeting as it was quite a busy week for him.</span><br /><span style="background-color: transparent; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> Finally, I decided to work on proposal syncing and attack shipment tracking when Madhu is available. I spent most of my time studying how proposal syncing works and reading the relevant django docs for forms processing etc. First I tried to see if proposal syncing feature worked. When I visited the proposal submission page, I got an AttributeError in gsoc.views.proposal.ProposalPage stating that response_helper had no attribute useGDataJS. So, I just commented that line to see if there are no crashes. Proposal submission page loaded fine but “Sync With Google Documents” was disabled in the page. I could not find useGDataJS helper function in any of the patches given by Orcun. I guess I have to contact Orcun to know more about this function or figure it out myself. This pretty much sums up my work.</span></span></b></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-7215156113928955272012-06-26T07:23:00.000-07:002012-06-26T07:24:09.151-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
This week i worked on creating the test scripts for <a href="https://github.com/armaan/Melange-tests/blob/master/test_gci_student_registration.py">gci student registration</a>, <a href="https://github.com/armaan/Melange-tests/blob/master/test_gci_dashboard.py">gci dashboard</a>, <a href="https://github.com/armaan/Melange-tests/blob/master/test_gci_leader_board.py">gci leaderboard</a>, <a href="https://github.com/armaan/Melange-tests/blob/master/test_gci_about_page.py">gci about page</a>, <a href="https://github.com/armaan/Melange-tests/blob/master/test_gsoc_accepted_orgs_page.py">gsoc accepted organisation page</a>. I also made few changes to base module <a href="https://github.com/armaan/Melange-tests/blob/master/melange_functional_actions.py">melange_functional_actions.py</a>, added a new method to login on melange using Google account in case functional test is exceuted against the melange instance hosted on App Engine. I was successfull in running test cases with nose. I can execute all the tests with $ bin/run-tests tests/functional. It picks all the test scripts and execute them one by one. I am currently in process of moving all the scripts from my repository on github to my soc <a href="http://code.google.com/p/soc/source/browse/?name=functional_testing">functional_testing</a> branch.<br />
<br />
Now, I am planning to refine the test cases i have written so far and send them to Leo and list for review and suggestions. Next week i am planning to work on already written test cases and make them better.</div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-68696470657509882632012-06-25T16:33:00.000-07:002012-06-25T16:35:59.321-07:00Connection Module and Related ViewsThis week's work went towards finally implementing the connection module with the views I've been envisioning. I started off with two - ConnectionPage and ShowConnectionPage - to be replaced by OrgConnectionPage, UserConnectionPage, and ShowConnectionPage in order to divide up the logic between views and cut down on the (admittedly small) number of conditionals within these pages. You can find the updated model on the main repo, <a href="http://code.google.com/p/soc/source/browse/app/soc/models/connection.py?name=connection_demo" target="_blank">and also right here</a>. Apologies to anybody who might get notifications of commits, I've pretty much been spamming them almost every time I do something substantial or interesting.<br />
<br />
First let me start off by saying that I've made some adjustments to the ConnectionModel per Daniel's suggestion and a couple of my own design. The new method for determining the state of the connection relies on four boolean variables: <i>user_mentor, user_org_admin, org_mentor, </i>and <i>org_org_admin. </i>These little switches allow for easily determining the implied state and any promotions. I've also set the parent entity of this model to be the User instance from the org-user relationship and changed it so that the model contains the Profile instance for the User to make it easier to handle promotions and getting certain information in the ShowConnectionPage class.<br />
<br />
OrgConnectionPage is fully working, allowing an org admin to initiate a connection between an organization that they are an admin for and a user, granting them the role of either org admin or mentor. Except for the fact that it won't show the ValidationErrors for the role checkboxes...still workin on that one. It will validate (I stole the existing link id cleaning methods for now), create a GSoCConnection entity, and post back onto itself. The url configuration is pretty simple, just in the format of <i>connect/sponsor/program/organization</i> and you can get to it from the org admin dashboard by clicking on an organization under "My Organizations." I combined the two links for "Invite Mentor" and "Invite Org Admin" into "Start Connection," which I think will suffice until I come up with a more intuitive name. Within the view is a checkbox that allows you to pick either one or both roles to offer. Everybody likes screenshots, so here's a picture:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1-wHsPGAdQ60w9SiG0qKRPyXVJ3fuUA37zVUrE1Y78RddwG8LgQFz0P9bzf_Syuzm-k-rEwa31eVf5p6S1ZljFo2IGwbnlqxo4eoa8im2vfpvsnNDpbbINR_Nx7py4sCTdTAtNLskT0/s1600/org+connection+form.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1-wHsPGAdQ60w9SiG0qKRPyXVJ3fuUA37zVUrE1Y78RddwG8LgQFz0P9bzf_Syuzm-k-rEwa31eVf5p6S1ZljFo2IGwbnlqxo4eoa8im2vfpvsnNDpbbINR_Nx7py4sCTdTAtNLskT0/s320/org+connection+form.png" width="275" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
UserConnectionPage has been giving me a headache. It took me a while but I finally understand the URL configuration system (....I think) and how it all fits into the big picture along with AccessChecker and RedirectHelper. It's giving me problems at the moment since my connect() method in AccessChecker requires a user keyword argument, and I'm linking it from the Apply class in gsoc/views/org_home which doesn't have the data I need and I'm not seeing a way to put it there. Once I figure that out though (most likely by harassing people on IRC), all I have to do is make a small change in the class's generate() method and it should be working.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The checkAccess() methods on both of these classes should be good to go, but it's likely that someone will point out something I missed and I'm going to feel like a moron. But it's an easy fix, so I'm not stressed out about that at the moment.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The notification module's connectionContext() method should also be very easy to whip together once I get the ShowConnectionPage working, it should just involve creating a template and finishing the rest of the method.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Speaking of ShowConnectionPage, I had this guy working for a little while. Originally I was redirecting to this page after a successful post in OrgConnectionPage and it was showing me everything I wanted to see, but I ended up not liking how it was working and the url configuration started to give me problems so I scrapped most of the work and will take it on this upcoming week. Right after I convince my friend dashboard.py to behave and show all of the GSoCConnection instances properly. Mario if you're reading this I'm probably going to try and track you down with Javascript questions! </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's all for this week. I've got a couple of questions for the conference call tomorrow (the checkbox errors not showing up and making org_home cooperate for UserConnectionPage, if anyone wants to prepare :P) but if I can figure those out I'll have this fully working by the midterm evaluation.</div>
<div>
<br /></div>dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-82904307376689064072012-06-19T10:06:00.000-07:002012-06-19T10:24:22.158-07:00Shipment Tracking and Data Syncing<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="internal-source-marker_0.012186037609353662" style="text-align: -webkit-auto;"><span style="background-color: transparent; color: #222222; font-family: Times, 'Times New Roman', serif; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Hi,</span></b><br />
<span style="font-family: Times, 'Times New Roman', serif; text-align: -webkit-auto;"><span style="color: #222222; font-size: x-small;"><span style="white-space: pre-wrap;"><br /></span></span><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">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 </span><a href="http://localhost:8080/" style="font-weight: bold;"><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">http://localhost:8080/</span></a><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> and then supplied them in respective fields in http://localhost:8080/site/edit page. </span><br /><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">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.</span><br /><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; color: #222222; font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">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. </span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-56050455461795392452012-06-19T06:45:00.000-07:002012-06-19T06:45:23.250-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi, <br />
<br />
This week i worked on developing test scripts for testing <a href="https://github.com/armaan/Melange-tests/blob/master/test_profile_page.py">Profile Page</a> and <a href="https://github.com/armaan/Melange-tests/blob/master/test_search_page.py">Search Page</a> 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.<br />
<br />
Options that i provided in this functional-run.py script: <br />
(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.<br />
<br />
(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.<br />
<br />
Currently this script is only for executing functional tests in my local environment.</div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-40123525552366200922012-06-18T18:13:00.001-07:002012-06-18T18:13:27.091-07:00Planning and Bug FixesSo 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:<br />
<br />
<ul>
<li>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")</li>
<li>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</li>
<li>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</li>
<li>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.</li>
</ul>
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.dcrodmanhttp://www.blogger.com/profile/17704798325052301146noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-17931250310247032822012-06-12T04:19:00.000-07:002012-06-12T04:19:27.096-07:00Melange Functional Testing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br /><br />This week i did a little bit reading on nose test runner and other articles on functional testing. I was travelling to my home town so i was not able to do much this week, though i have started work on creating test script for <a href="https://github.com/armaan/Melange-tests/blob/master/Profile_page_test.py">Profile Page</a>.<br /><br /> I am learning a lot of new things and that makes me feel good. I am continuously making changes to base module to make it much better. I hope that in few days base module will be good enough to be accepted. As soon as this module will be accepted, i will start sending test scripts. Instead of using TC01 and TC02 for naming test data sheets. I am planning to give them more meaningful names like Gsoc_Student_Registration and Gsoc_Profile. Leo has reviewed my first patch and suggested few changes, i am currently in process of making those changes to make the base module much better. After Profile page, my plan is to create test script for Search page and Events & Timeline page. </div>Anonymoushttp://www.blogger.com/profile/06182903137241774816noreply@blogger.com0tag:blogger.com,1999:blog-10956201607904469.post-42698496316004120312012-06-12T01:35:00.000-07:002012-06-11T14:07:10.045-07:00Extension and Integration with External APIs : Shipment Tracking and Data Syncing<div dir="ltr" style="text-align: left;" trbidi="on">
Hi<br />
<b id="internal-source-marker_0.9229264841414988" style="text-align: -webkit-auto;"><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Though the previous week’s strategy of working on my own local branch worked well but it was too much duplicating of work as many of the patches had already been integrated with Shipmenttracking branch and Madhu said that the time could be better spent on implementing the features. He asked me to continue working on the shipmenttracking branch itself and integrate the rest of the patches. I integrated the rest of the patches viz. </span></b><br />
<span id="internal-source-marker_0.9229264841414988" style="text-align: -webkit-auto;"><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">“Add dashboard for students to view shipments.”</span></span><br />
<div>
<span style="text-align: -webkit-auto;"><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">“Add view works as proxy view to deliver JS requests.”</span><br /><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">I ran bin/paver build --skip-pylint command to create taggable folder in build, which was initially not there because current melange doesn’t contain it. Made correction in module import in gsoc.views.proposal and gsoc.views.trackings.py files. </span><br /><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Create and edit of the shipment tracking info successfully added on the admin dashboard but when we try to sink the spreadsheet with melange, it fails. I tried to debug what the source of the error was and suspect that it is </span><b><img height="176px;" src="https://lh4.googleusercontent.com/DykRpYQjRumtEJLX7Oo2nMNe6B2UIjAzwm01fSFMKVjC2GQgFa4exBp78qmhpKdLZBP6ZDOZM8McmZGNdmfQQM_XmCpLBn8MPa4h-8S5M7YZPDDHuXg" width="305px;" /> <img height="172" src="https://lh3.googleusercontent.com/K4htg8DZLtbDt_fsYOGBS7q_JFJjkyqwFIAJqgzlC_Y8LJR2CfloPDMR7GVShDr1bYhd7i84OqPjnMmgIz8TASS1WLbIn3NDeywpEH8FmGqxjjU5Jzc" width="320" /></b><br /><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">due to missing consumer_key and consumer_secret. Both of the variables are set to “None”, which causes an AttributeError at gdata.Oauth.redirect.</span><br /><span style="font-size: 13px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Oauth_input_params are set to “None” and in app/service.py and the function setOAuthInputParameters in soc.views.helper.gdata_apis.oauth.py to reset them but consumer_key and consumer_secret are also of “Nonetype”. I have mailed Madhu regarding the issue and hoping to solve it soon. </span></span></div>
</div>Unknownnoreply@blogger.com0