(self, filepath)
| 89 | # Read all useful information from all files under a jira issues dir |
| 90 | # Each issue data structure : (issue id) -> (title, description, comments, priority, type) |
| 91 | def generate_dataset(self, filepath): |
| 92 | dataset = {} |
| 93 | allFiles = os.listdir(filepath) |
| 94 | invalidName = "invalid" |
| 95 | numFiles = 0 |
| 96 | for eachFile in allFiles: |
| 97 | if 'GitHub' not in eachFile: |
| 98 | if invalidName in eachFile: |
| 99 | continue |
| 100 | arr = re.split('-|\.', eachFile) |
| 101 | fromFile = os.path.join('%s%s' % (filepath, eachFile)) |
| 102 | dom = xml.dom.minidom.parse(fromFile) |
| 103 | parseFile = dom.documentElement |
| 104 | dp = self.read_data_from_jira_file(parseFile, arr[2]) |
| 105 | |
| 106 | if arr[2] in dataset.keys(): |
| 107 | dataset[arr[2]]['title'] = dataset[arr[2]]['title'] + dp['title'] |
| 108 | dataset[arr[2]]['description'] = dataset[arr[2]]['description'] + dp['description'] |
| 109 | dataset[arr[2]]['comment'] = dataset[arr[2]]['comment'] + dp['comment'] |
| 110 | #if dataset[arr[2]]['type'] not in dp['type']: |
| 111 | # print (dataset[arr[2]]['type'], dp['type']) |
| 112 | #if dataset[arr[2]]['priority'] not in dp['priority']: |
| 113 | # print (dataset[arr[2]]['type'], dp['type']) |
| 114 | else: |
| 115 | dataset.update({arr[2]:dp}) |
| 116 | numFiles += 1 |
| 117 | #print (numFiles) |
| 118 | return dataset |
| 119 | |
| 120 | # Remove jira issues which has no description, comments and priority |
| 121 | def remove_uncomplete_issues(self, project_set, datasets): |
nothing calls this directly
no test coverage detected