Giter Site home page Giter Site logo

cas_analyzer's Introduction

CAS Analyzer

Analyzes repositories and generate median values of the buggy versus non buggy metrics

##Installation

  1. Clone this repository in to an empty directory
  2. Copy the ./config.example.json to ./config.json and change the appropriate credentials and settings to match the environment.

###Dependencies

  • Python >= 3.3
  • Pip for Python Version > 3.3
  • Git > 1.7
  • R
  • python-dev
  • rpy2
  • requests
  • dateutil

###Setting up python3.3 virtual env on Ubuntu

  • Assumes you are working on Ubuntu 12.04

Install python3.3 using the deadsnakes PPA:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.3

Version 1.7.1.2 of virtual env that comes with Ubuntu 12.04 is not compatibale with python3.3. Therefore, we must installa new version so that we can setup a working virutal environment. First, you must uninstall the current python-virtualenv:

sudo apt-get remove python-virtualenv

Next, install the latest easy_install:

wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py

Next, install pip and the virtualenv:

sudo easy_install pip
sudo pip install virtualenv
virtualenv --no-site-packages --distribute -p /usr/bin/python3.3 ~/.virtualenvs/pywork3

By default, typically we don't have the python-dev available for python3 on Ubuntu after setting up a new virtual environment for it and so have to install it as it's a dependency for rpy2. Install this with apt-get:

sudo apt-get install python3.3-dev

Now, we are finally ready to set up our virtual environment:

virtualenv -p /usr/bin/python3.3 /path/to/new/virtual/environment

To activate the virtual env:

source /path/to/new/virtual/environemnt/bin/activate

Type deactiviate to exit the virtual env

###Installing rpy2

  • Assumes you are working on Ubuntu 12.04 and python 3.3

Getting rpy2 to work can be a bit tricky. First, make sure R is installed. To do this, first get the repository SSL key and import it to apt by doing

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 
gpg -a --export E084DAB9 | sudo apt-key add -

Then, Edit the list of sources gksudo gedit /etc/apt/sources.list and add the following repo at the bottom:deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/

Finally, we can install R by running the following commands:

sudo apt-get update 
sudo apt-get install r-base

Now we are ready to install rpy2. Make sure python version 3 or greater is in use (3.2 is not compatibale, however), such as by using a virtualenv and run

pip install rpy2

###Additional Pip Packages Install the following packages by doing pip install and then the package name. Make sure you are using python3, such as using a virtualenv if using Ubuntu.

  • SQL Alchemy (sqlalchemy)
  • Py-PostgreSQL (py-postgresql)
  • requests (requests)
  • python-dateutil (python-dateutil)

###First-Time Database Setup Set up the database for the first time by running the scan.py included in the CAS_Reader repo like normal (see Usage below), but with [option] parameter set to initDb

##Usage In a terminal, type `python analyze.py ' to start the analyzer.

cas_analyzer's People

Contributors

tofferrosen avatar bgrawi avatar

Stargazers

Keichi Takahashi avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

chubbymaggie

cas_analyzer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.