From ea42d6bb40f2fcd26913b782a15e1ddd3f8f13e7 Mon Sep 17 00:00:00 2001 From: Utsav Garg Date: Fri, 16 Jun 2017 12:42:12 +0530 Subject: [PATCH] Integrate coveralls for test coverage (#81) --- .coveralls.yml | 2 + .travis.yml | 9 +++++ README.md | 1 + requirements/caffe_tensorflow_install.sh | 48 ++++++++++++------------ requirements/dev.txt | 1 + 5 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 000000000..2a7555519 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,2 @@ +service_name: travis-ci +repo_token: pRtqMs56eQ9z9bXUNvESwld0f5E98utL9 diff --git a/.travis.yml b/.travis.yml index b37672259..632096119 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty sudo: required language: python @@ -8,6 +9,7 @@ python: cache: directories: - $HOME/.cache/pip + - $HOME/caffe before_cache: - rm -f $HOME/.cache/pip/log/debug.log @@ -15,10 +17,17 @@ cache: install: - pip install -r requirements/dev.txt - . $HOME/.nvm/nvm.sh + - sh requirements/caffe_tensorflow_install.sh - nvm install stable - nvm use stable - npm install +before_script: + - export PYTHONPATH=$PYTHONPATH:$HOME/caffe/caffe/python script: - flake8 ./ - npm run ci + - coverage run --source=caffe_app manage.py test + +after_success: + - coveralls diff --git a/README.md b/README.md index 5ce2f38e5..27bb6d479 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Join the chat at https://gitter.im/Cloud-CV/IDE](https://badges.gitter.im/Cloud-CV/IDE.svg)](https://gitter.im/Cloud-CV/IDE?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/Cloud-CV/Fabrik.svg?branch=master)](https://travis-ci.org/Cloud-CV/Fabrik) +[![Coverage Status](https://coveralls.io/repos/github/Cloud-CV/Fabrik/badge.svg?branch=coveralls)](https://coveralls.io/github/Cloud-CV/Fabrik?branch=coveralls) This is a React+Django webapp with a simple drag and drop interface to build and configure deep neural networks with support for export of model configuration files to caffe and tensorflow. It also supports import from these frameworks to visualize different model architectures. Our motivation is to build an online IDE where researchers can share models and collaborate without having to deal with deep learning code. diff --git a/requirements/caffe_tensorflow_install.sh b/requirements/caffe_tensorflow_install.sh index 5c9299968..30bfbff51 100644 --- a/requirements/caffe_tensorflow_install.sh +++ b/requirements/caffe_tensorflow_install.sh @@ -8,29 +8,31 @@ echo "Installing caffe specific dependencies" sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev -#Download caffe -echo "Downloading caffe" -cd -mkdir caffe -cd caffe -wget https://github.com/BVLC/caffe/archive/25391bf9e0552740af8253c6d6fd484297889a49.zip -unzip -o 25391bf9e0552740af8253c6d6fd484297889a49.zip -rm 25391bf9e0552740af8253c6d6fd484297889a49.zip -mv caffe-25391bf9e0552740af8253c6d6fd484297889a49 caffe -cd caffe - -#Install caffe -echo "Installing caffe" -cp Makefile.config.example Makefile.config -CPU_ONLY=1 USE_OPENCV=0 make all -j4 - -#Install pycaffe -echo "Install PyCaffe" -CPU_ONLY=1 USE_OPENCV=0 make pycaffe -j2 - -echo "export PYTHONPATH=$(pwd)/python:$PYTHONPATH" > ~/.bash_profile -source ~/.bash_profile - +if [ ! -d $HOME/caffe/caffe ]; then + #Download caffe + echo "Downloading caffe" + cd + mkdir caffe + cd caffe + wget https://github.com/BVLC/caffe/archive/25391bf9e0552740af8253c6d6fd484297889a49.zip + unzip -o 25391bf9e0552740af8253c6d6fd484297889a49.zip + rm 25391bf9e0552740af8253c6d6fd484297889a49.zip + mv caffe-25391bf9e0552740af8253c6d6fd484297889a49 caffe + cd caffe + + #Install caffe + echo "Installing caffe" + cp Makefile.config.example Makefile.config + CPU_ONLY=1 USE_OPENCV=0 make all -j4 + + #Install pycaffe + echo "Install PyCaffe" + CPU_ONLY=1 USE_OPENCV=0 make pycaffe -j2 + + echo "export PYTHONPATH=$(pwd)/python:$PYTHONPATH" > ~/.bash_profile + source ~/.bash_profile + export PYTHONPATH=$(pwd)/python +fi echo "#################### Caffe Install Complete! ####################" echo "Installing Tensorflow dependencies" diff --git a/requirements/dev.txt b/requirements/dev.txt index 88e4cd13f..e5cef05d6 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -2,3 +2,4 @@ pep8==1.7.0 flake8==3.0.4 +python-coveralls==2.9.1