Skip to content

Commit 5161cab

Browse files
committed
Minor: unify data files location at data
1 parent d989622 commit 5161cab

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

data/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The data structure of fs-patch.pickle:
2+
3+
The data structure of jira-issues.pickle:
4+
5+
A nested dictionary [repo_name][issue_id]['commits'/'title'/'description'/'comment'/'type'/'priority']
6+
7+
'commits' indexes a list of commit hashes related to the issue.
8+

notebooks/data/fs-patch.pickle

-3.06 MB
Binary file not shown.

notebooks/fs_patch_classification.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"outputs": [],
3535
"source": [
3636
"import pickle\n",
37-
"datasets = pickle.load(open('data/fs-patch.pickle', 'rb'))"
37+
"datasets = pickle.load(open('../data/fs-patch.pickle', 'rb'))"
3838
]
3939
},
4040
{

notebooks/process_fs_patch.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"outputs": [],
168168
"source": [
169169
"import pickle\n",
170-
"pickle.dump(datasets, open('data/fs-patch.pickle', 'wb'), True)"
170+
"pickle.dump(datasets, open('../data/fs-patch.pickle', 'wb'), True)"
171171
]
172172
},
173173
{
@@ -189,12 +189,12 @@
189189
"import dicttoxml\n",
190190
"from xml.dom.minidom import parseString\n",
191191
"\n",
192-
"datasets = pickle.load(open('data/fs-patch.pickle', 'rb'))\n",
192+
"datasets = pickle.load(open('../data/fs-patch.pickle', 'rb'))\n",
193193
"fss = ['ext3', 'ext4', 'btrfs', 'xfs', 'jfs', 'reiserfs']\n",
194194
"for fs in fss:\n",
195195
" xml = dicttoxml.dicttoxml(datasets[fs], custom_root=fs)\n",
196196
" dom = parseString(xml)\n",
197-
" file = open('data/' + fs + '-patch.xml', 'w')\n",
197+
" file = open('../data/' + fs + '-patch.xml', 'w')\n",
198198
" file.write(dom.toprettyxml())\n",
199199
" file.close()"
200200
]

notebooks/tf-idf-Spark.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"outputs": [],
173173
"source": [
174174
"def getInfoFromXML(fromDir, path):\n",
175-
" toDir = \"./data/desAndCom/\"\n",
175+
" toDir = \"../data/desAndCom/\"\n",
176176
" fromFile = os.path.join('%s%s' % (fromDir, path))\n",
177177
" toFile = os.path.join('%s%s' % (toDir, path))\n",
178178
" #print fromFile, toFile, path\n",
@@ -262,9 +262,9 @@
262262
" return numFiles\n",
263263
" #print allDir\n",
264264
"\n",
265-
"filePath = \"./data/spark-issues/\"\n",
265+
"filePath = \"../data/spark-issues/\"\n",
266266
"#eachFile(filePath)\n",
267-
"numFiles = getUsefulInfo(filePath) #write all useful information to ./data/desAndCom\n",
267+
"numFiles = getUsefulInfo(filePath) #write all useful information to ../data/desAndCom\n",
268268
"numFiles"
269269
]
270270
},
@@ -319,8 +319,8 @@
319319
},
320320
"outputs": [],
321321
"source": [
322-
"fileList = os.listdir(\"./data/desAndCom/\")\n",
323-
"fileDir = \"./data/desAndCom/\"\n",
322+
"fileList = os.listdir(\"../data/desAndCom/\")\n",
323+
"fileDir = \"../data/desAndCom/\"\n",
324324
"files = []\n",
325325
"for tempFile in fileList:\n",
326326
" if \"ipynb\" in tempFile:\n",
@@ -404,8 +404,8 @@
404404
},
405405
"outputs": [],
406406
"source": [
407-
"fileList = os.listdir(\"./data/desAndCom/\")\n",
408-
"fileDir = \"./data/clearFiles/\"\n",
407+
"fileList = os.listdir(\"../data/desAndCom/\")\n",
408+
"fileDir = \"../data/clearFiles/\"\n",
409409
"files = []\n",
410410
"for tempFile in fileList:\n",
411411
" if \"ipynb\" in tempFile:\n",
@@ -623,7 +623,7 @@
623623
},
624624
"outputs": [],
625625
"source": [
626-
"testFilenames = sorted(glob('./data/clearFiles/*'))\n",
626+
"testFilenames = sorted(glob('../data/clearFiles/*'))\n",
627627
"#print testFilenames\n",
628628
"\n",
629629
"# While we're at it, let's make a list of the lengths, so we can use them to plot dot sizes. \n",

notebooks/weight_opt.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"import pickle\n",
146146
"\n",
147147
"# Download the test pickle file from https://share.weiyun.com/9ecbf5799502577312baa6b17a584b17\n",
148-
"datasets = pickle.load(open('data/jira-issues-test.pickle', 'rb'))"
148+
"datasets = pickle.load(open('../data/jira-issues-test.pickle', 'rb'))"
149149
]
150150
},
151151
{

0 commit comments

Comments
 (0)