Added more projects into default conf

* Implemented automatic retrieval of projects from github
* Add project sources from openstack, openstack-dev, openstack-infra and stackforge
* Default data can be loaded from URI
* Refactored user processing in record processor
* Added support for dummy RCS

Implements blueprint add-more-projects

Change-Id: Ifacebaf833688cc19ed739a08a9324597a9d5f40
This commit is contained in:
Ilya Shakhat
2013-08-02 17:52:10 +04:00
parent 4d228d61ae
commit 4b2c440dbf
17 changed files with 219 additions and 443 deletions

View File

@@ -19,6 +19,10 @@ from stackalytics.processor import utils
LOG = logging.getLogger(__name__)
def get_user_id(launchpad_id, email):
return launchpad_id or email
def normalize_user(user):
user['emails'] = [email.lower() for email in user['emails']]
if user['launchpad_id']:
@@ -40,7 +44,7 @@ def normalize_user(user):
return cmp(x["end_date"], y["end_date"])
user['companies'].sort(cmp=end_date_comparator)
user['user_id'] = user['launchpad_id'] or user['emails'][0]
user['user_id'] = get_user_id(user['launchpad_id'], user['emails'][0])
def _normalize_users(users):