GSoC’18 Eighth Coding Week

ANJALI DHANUKA
3 min readJul 9, 2018

--

Second Phase is also going to end. I still can’t believe it. This blog is about the last week of the second coding phase prior to the evaluation period. This blog is in continuation with my previous blog GSoC’18 Seventh Coding Week.

As I mentioned in my previous blog, I had planned to do a lot of things in this week so the tasks were:

Search Implementation

  1. Event Filter on the basis of name, start date, end date, city, state, country and job for the administrators.
  2. Event Filter on the basis of name, start date, end date, city, state, country for the volunteers.
  3. Job Filter on the basis of name, start date, end date, city, state, country and event for the administrators.
  4. Job Filter on the basis of name, start date, end date, city, state, country for the volunteers.
  5. Volunteer Filter on the basis of event and jobs associated for the administrators.

Event Filter

Since the volunteer and administrator forms differ by a single field only and the fields are non compulsory, I created a single class for the SearchForm and just differed the fields written in HTML for the two templates.

event/forms.py

Also, I defined a common method in services file which takes all these arguments(non-compulsory) and filters out the events in the corresponding views.

event/services.py

I showed up all the events initially and then as the user fills the form, the corresponding events get filtered.

Administrator Event Filter

Job Filter

Similar implementation as the Event filter.

Event and Job Based Filters for volunteer

Initially the volunteer filter was confined to first name, last name, city, organization. This was added to let the administrator access the list of all the volunteers associated with a particluar job or event.

Volunteer Search Filter with additional field

Also, I addeed these paramters in the method defined in services file for volunteer search.

search_volunteers

Writing tests for the enhancements

As I mentioned about my novelity in writing tests and the unorganized tests with work still in progress lacking documentation and implementation of proper standards. These factors made it really difficult for me to hasten up the process, rather I could hardly complete the tests for atmost one enhancement after spending the whole day, for example Sunday, I was writing tests for the Event Filter, and I almost spent the whole day doing nothing other than this. However, I completed the tests for the following enhancements:

Event Search Implementation

event/tests/test_searchEvent.py

Class contains 7 tests to check each parameter separately and their combinations to check intersection.

test for checking the event name parameter

It creates temporary objects, tests them with different parameters which could raise exceptions, return no result and so on. These test results are matched with the expected results as provided to the tests already.

Tasks for the next week

This week has been dedicated to VMS Portal Api implementation. Also I’ll be writing the tests for the enhancements. I hope it takes me smaller time in writing the tests for other enhancements. Stay tuned for my next blog,

--

--

ANJALI DHANUKA

Student Developer at GSoC | Programmer | Applied Mathematics Undergrad at IITR