Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hezyin committed Apr 2, 2019
1 parent f85dfcc commit 7b7a735
Showing 1 changed file with 0 additions and 120 deletions.
120 changes: 0 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,123 +82,3 @@ coverage html
# then visit htmlcov/index.html in your browser
```



## Interactive mode with jupyter notebook

1. Install Jupyter

Reference <http://jupyter.org/install.html>.

E.g., on Ubuntu LTS 16.04:

```
sudo -H pip3 install --upgrade pip
sudo -H pip3 install jupyter
```

To automaically remove cell outputs and unnecessary meta information from notebook before committing, install jq (a lightweight and flexible command-line JSON processor) and activate it by running gitconfig.sh. E.g., on Ubuntu:

```
sudo apt install -y jq
./gitconfig.sh
```

2. Install pipenv kernel into jupyter notebook

In the project folder, run

```
pipenv shell
```

This will bring up a terminal in your virtualenv like this:

```
(code-analytics-8iDyuztf) bash-3.2$
```

In that shell, do

```
python -m ipykernel install --user --name=my-virtualenv-name
```

Launch jupyter notebook:

```
jupyter notebook
```

In your notebook, the new kernel should now be an option. Enjoy your interactions with the notebook!


## Analyze Javascript Projects

Note: This section will be updated soon as we refactor the js graph server.

Download the submodule `contribs/js-callgraph`:

```bash
git submodule update --init --recursive
```

Run the following commands:

```bash
npm install --prefix contribs/js-callgraph
pipenv install
pipenv run ./tools/repo_creater/create_repo.py test/js_test_repo/
pipenv run pytest test/test_graphs/test_analyzer_js.py
```


## Debug/Prod Mode for Java Server

This is a debug and prod mode switch in Java analyzer,
by default the server is always in a debug mode, in case
you want to turn it into prod mode where any exception raised
is logged in a file and processing is not interrupted.

We just need to set the environment variable:

``export DEBUG_JAVA=False``

If this environment variable is set ot `False` then Prod mode is on
else Debug mode is on.

## Trouble Shooting

#### 1. No module named 'persper'

Add this repo to python path so python can find the persper package. Insert the following line into `.bashrc` or `.bash_profile`.

```
export PYTHONPATH="/path/to/repo:$PYTHONPATH"
```

<!--### Batch Mode
Complete the basic setup first.
Note: setup-linux-ubuntu.sh can be used for Ubuntu Server.
Read help info of dev_analysis.py:
```bash
./dev_analysis.py -h
```
To output results of PageRank and DevRank over the call graph:
```bash
./dev_analysis.py -x ./repos/linux-4.10-xml/kernel/ -o linux-kernel.xlsx -a 0 1 0.05 -pd
```
To output results of DevRank over the call-commit graph:
```bash
./dev_analysis.py -s ./repos/linux/ -x ./repos/linux-4.10-xml/ -o linux-cc.xlsx -n 100 200 -a 0 1 0.05 -c
```
A sample long-time run:
```bash
nohup ./dev_analysis.py -s ./repos/linux/ -x ./repos/linux-4.10-xml/ -o linux-4.10-cc.xlsx -n 1000 10000 -a 0 1 0.05 -c > dev.out 2>&1 &
```
-->

0 comments on commit 7b7a735

Please sign in to comment.