Skip to content

Commit

Permalink
Rename lib to persper, and remove direct sys.path setting in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
basicthinker committed Sep 6, 2017
1 parent b6bcbbe commit ad5f2b6
Show file tree
Hide file tree
Showing 33 changed files with 54 additions and 38 deletions.
3 changes: 0 additions & 3 deletions notebooks/apache_devrank.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"outputs": [],
"source": [
"# import dependencies and set default alpha value\n",
"import sys\n",
"if '../lib' not in sys.path: sys.path.append('../lib')\n",
"\n",
"import math\n",
"import pickle\n",
"import pprint\n",
Expand Down
10 changes: 7 additions & 3 deletions notebooks/call_graph_cpp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import sys\n",
"if '../lib' not in sys.path: sys.path.append('../lib')\n",
"\n",
"import numpy as np\n",
"from lxml import etree\n",
"from numpy import linalg as LA\n",
Expand Down Expand Up @@ -75,6 +73,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand Down Expand Up @@ -236,6 +235,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand Down Expand Up @@ -287,6 +287,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -299,6 +300,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -311,6 +313,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -323,6 +326,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down
3 changes: 0 additions & 3 deletions notebooks/commit_graph_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../lib')\n",
"\n",
"from graphs.commit_graph import draw_commit_graph"
]
},
Expand Down
2 changes: 0 additions & 2 deletions notebooks/fs_patch_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../lib')\n",
"import classifier\n",
"from classifier import binary_bug, multi_patch_type, limited_patch_type, only_bug_filter, stem, lemmatize\n",
"from sklearn.svm import LinearSVC\n",
Expand Down
2 changes: 0 additions & 2 deletions notebooks/jira_issue_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../lib')\n",
"import classifier\n",
"from classifier import binary_bug, multi_patch_type, limited_patch_type, only_bug_filter, stem, lemmatize\n",
"from sklearn.svm import LinearSVC\n",
Expand Down
12 changes: 9 additions & 3 deletions notebooks/linux_kernel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import sys\n",
"if '../lib' not in sys.path: sys.path.append('../lib')\n",
"\n",
"import glob\n",
"import pdb\n",
"import cProfile\n",
Expand All @@ -28,6 +26,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -47,6 +46,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -62,6 +62,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -77,6 +78,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -91,6 +93,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down Expand Up @@ -145,6 +148,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -157,6 +161,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -169,6 +174,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down
13 changes: 8 additions & 5 deletions notebooks/process_fs_patch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../lib')\n",
"import extractor"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down Expand Up @@ -61,6 +61,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand All @@ -80,14 +81,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import sys\n",
"if '../lib' not in sys.path: sys.path.append('../lib')\n",
"\n",
"from git import Commit\n",
"from graphs.patch_parser import PatchParser\n",
"\n",
Expand Down Expand Up @@ -134,6 +133,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down Expand Up @@ -162,6 +162,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand All @@ -188,6 +189,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand All @@ -211,6 +213,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down
4 changes: 0 additions & 4 deletions notebooks/process_jira_issue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../lib')\n",
"import extractor"
]
},
Expand Down Expand Up @@ -98,8 +96,6 @@
"outputs": [],
"source": [
"# import the labeler lib\n",
"import sys\n",
"sys.path.append('../lib')\n",
"import labeler\n",
"from labeler import apache_type"
]
Expand Down
6 changes: 3 additions & 3 deletions notebooks/test_processor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"import sys\n",
"if '../lib' not in sys.path: sys.path.append('../lib')\n",
"\n",
"from graphs.processor import Processor\n",
"\n",
"p = Processor('../repos/linux-kernel')"
Expand All @@ -21,6 +19,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
Expand All @@ -33,6 +32,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
Expand Down
Loading

0 comments on commit ad5f2b6

Please sign in to comment.