From bce1cc2d4f287e925c81dc4d42009b7f8ced0d71 Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Thu, 31 Oct 2013 20:29:51 +0400 Subject: [PATCH] Project 'openstack/openstack' is excluded from analysis That project has all core projects as sub-modules. As result commits are assigned incorrectly and all emails are assigned to 'openstack/openstack'. The change introduces parameter 'exclude' for project source. Resolves bug 1246785 Change-Id: I35a004382b187e4322e65f898177f91deced1dac --- etc/default_data.json | 3 ++- etc/default_data.schema.json | 6 ++++++ stackalytics/processor/default_data_processor.py | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/etc/default_data.json b/etc/default_data.json index ef3ddba58..9ddb61e9b 100644 --- a/etc/default_data.json +++ b/etc/default_data.json @@ -5339,7 +5339,8 @@ { "organization": "openstack", "project_type": "openstack", - "project_group": "other" + "project_group": "other", + "exclude": ["openstack"] }, { "organization": "openstack-dev", diff --git a/etc/default_data.schema.json b/etc/default_data.schema.json index 3b52e54cf..ad1e17065 100644 --- a/etc/default_data.schema.json +++ b/etc/default_data.schema.json @@ -143,6 +143,12 @@ }, "project_group": { "type": ["string", "null"] + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + } } }, "required": ["organization", "project_type"], diff --git a/stackalytics/processor/default_data_processor.py b/stackalytics/processor/default_data_processor.py index a0297fc3c..0dd430cdf 100644 --- a/stackalytics/processor/default_data_processor.py +++ b/stackalytics/processor/default_data_processor.py @@ -62,11 +62,13 @@ def _retrieve_project_list(default_data): LOG.warn('Fail to retrieve list of projects. Keep it unmodified') return False + exclude = set(project_source.get('exclude', [])) + for repo in repos: repo_uri = repo.git_url repo_name = repo.name - if repo_uri not in repo_index: + if (repo_uri not in repo_index) and (repo_name not in exclude): r = { 'branches': ['master'], 'module': repo_name,