<commit_before>#-*- coding: utf-8 -*-
from __future__ import print_function

import os
import shutil

from commons import Subjects
from repository import BugRepositoryMaker


#clean
def clean():
	S = Subjects()
	for group in S.groups:
		for project in S.projects[group]:
			print(u'cleanning %s / %s ' % (group, project))
			dirpath = os.path.join(S.getPath_bugrepo(group, project), u'repository')
			fullrepo = os.path.join(S.getPath_bugrepo(group, project), u'repository_full.xml')
			filteredrepo = os.path.join(S.getPath_bugrepo(group, project), u'repository.xml')
			try:
				shutil.rmtree(dirpath)
			except Exception as e:
				print(u'Failed to remove repository folder')
			try:
				os.remove(fullrepo)
			except Exception as e:
				print(u'Failed to remove full repository file')
			try:
				os.remove(filteredrepo)
			except Exception as e:
				print(u'Failed to remove filtered repository file')
	pass


def work():
	S = Subjects()
	for group in ['JBoss']:#S.groups: # ['JBoss']:#'['Apache', 'JBoss', 'Wildfly',  'Spring']:#
		for project in S.projects[group]:
			obj = BugRepositoryMaker(project,
			                         S.getPath_bugrepo(group, project),
			                         S.getPath_gitrepo(group, project),
			                         S.getPath_bugrepo(group, project))
			obj.run(S.versions[project].keys())

#clean()
work()
pass<commit_msg>Update launcher_repoMaker.py<commit_after>#-*- coding: utf-8 -*-
from __future__ import print_function

import os
import shutil

from commons import Subjects
from repository import BugRepositoryMaker


#clean
def clean():
	S = Subjects()
	for group in S.groups:
		for project in S.projects[group]:
			print(u'cleanning %s / %s ' % (group, project))
			dirpath = os.path.join(S.getPath_bugrepo(group, project), u'repository')
			fullrepo = os.path.join(S.getPath_bugrepo(group, project), u'repository_full.xml')
			filteredrepo = os.path.join(S.getPath_bugrepo(group, project), u'repository.xml')
			try:
				shutil.rmtree(dirpath)
			except Exception as e:
				print(u'Failed to remove repository folder')
			try:
				os.remove(fullrepo)
			except Exception as e:
				print(u'Failed to remove full repository file')
			try:
				os.remove(filteredrepo)
			except Exception as e:
				print(u'Failed to remove filtered repository file')
	pass


def work():
	S = Subjects()
	for group in S.groups: # ['JBoss']:#'['Apache', 'JBoss', 'Wildfly',  'Spring']:#
		for project in S.projects[group]:
			obj = BugRepositoryMaker(project,
			                         S.getPath_bugrepo(group, project),
			                         S.getPath_gitrepo(group, project),
			                         S.getPath_bugrepo(group, project))
			obj.run(S.versions[project].keys())

#clean()
work()
pass
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0007288629737609329, 'mean_word_length': 3.3502377179080822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4125818', 'n_tokens_mistral': 1002, 'n_tokens_neox': 872, 'n_words': 226}