[Soc-coordination] Report 2 -- Improving Team Activity Metrics

Vipin Nair swvist at gmail.com
Mon Jun 18 00:34:03 UTC 2012


Hi,

This is the second report on the GSoC project 'Improving Team Activity
Metrics' with Sukhbir Singh and Andreas Tille as the mentors.

I have developed an API to access data from the teammetrics database.
The API is not yet complete, but a lot of data can be accessed over
the API. Monthly data for different metrics has been made available
now and I am writing code to make annual data to be available over the
API. The API currently returns data in the JSON format.


API Details
--------------------------------------------------------------------------------

The following data is available over the API:

1) Monthly Data for a particular metric:

I present a user agnostic monthly data for a metric for each month for
all available years. This data is made available so that the end user
may be able to identify some trend in the data.

API Request Format : GET api/v<API_VERSION>/<TEAM>/<METRIC>/
Sample API Request: GET api/v1/teammetrics/list/

For example teammetrics list data for 2012 gives us the following information.

Year : 2012
month: 1 - liststat: 51
month: 2 - liststat: 44
month: 3 - liststat: 48
month: 4 - liststat: 12
month: 5 - liststat: 66


2) Monthly Data for Global Top N users

I identify the global top N users for a particular metric and present
each individuals data for each month for all the available years.
Global Top N means Top N contributors to any metric computed with all
the available data.

Data we get is an extension of the above but instead of just a value
for a given month, data for each of the Top N contributors is returned
for a given month.

API Request Format : GET api/v<API_VERSION>/<TEAM>/<METRIC>/<N>/
Sample API Request : GET api/v1/teammetrics/list/5/


3) Monthly Data for all Metrics:

For this I return the monthly data for each metric for a given team.
The result is same as (1) but instead of a single metric, data for all
available metrics is provided.

API Request Format : GET api/v<API_VERSION>/<TEAM>/
Sample API Request : GET api/v1/teammetrics/


--------------------------------------------------------------------------------


Data is only available for the teammetrics project. Data for other
teams is not available as I am yet to add data to a simple config file
that links teams and its different metrics. I will write a script to
populate the config file, once I am done with the current phase.

For the design of the API, I am following the best practices as laid
out in this document[1] released by APIGEE, one of the leading API
services firm.

The development has been a little slow as I expected to finish the API
before submitting this report. I am following the test driven
development methodology which has actually slowed me down since I am
new to this. I have written unit tests for all the finished modules
with 93% test coverage. I am actively working on the API module for
which the code coverage is 39%. I expect to reach 100%code  coverage
soon. Currently all tests pass, and the API is in active development.
I have written test cases using the unittest module available in the
standard library but I am using nosetests as the test runner as it
helps me keep the tests organized better. Django test runner has been
avoided as it is tightly coupled with the ORM, which we have chosen to
avoid to reduce the complexity of the project.

Assuming, nosetests module is installed and the current directory is
the project directory, all the tests can be executed using the simple
command:

$nosetests tests/

Once the API is stable, I'll update the Debian Wiki with proper API
documentation and it will be released for acceptance testing.

All the code is available on the repo[2]. Check the 'web-devel' branch
for the bleeding edge version.

[1] : http://info.apigee.com/Portals/62317/docs/web%20api.pdf
[2] : https://alioth.debian.org/scm/browser.php?group_id=100628


-- 
Regards,
Vipin Nair
National Institute of Technology, Calicut
http://swvist.github.com



More information about the Soc-coordination mailing list