mkdir -p /usr/local/owh-ds/application/
cd /usr/local/owh-ds/application/
git clone [email protected]:semanticbits/owh-ds.git
git checkout develop
cd /owh-ds/software/owh
Install both client and server dependencies
cd /owh-ds/software/owh/client/
npm install
npm install --dev
cd /owh-ds/software/owh/server/
npm install
npm install --dev
cd owh-ds/software/owh/client
nohup npm run-script test-single-run > nohup.out &
Start node server and run selenium test cases
cd owh-ds/software/owh/server
nohup npm run-script start > nohup.out &
cd owh-ds/software/owh/client
nohup npm run-script protractor > nohup.out &
Install istanbul globally and run specs. You can also use istanbul that we installed as dependencies, need to specify istanbul path
cd owh-ds/software/owh/server
istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive test
Below steps are to load YRBS and Mortality data sets(few years data) into local Elasticsearch service.
-
Download and run elasticsearch
-
To load YRBS sample data(For few years)
- Download YRBS sample data https://s3.amazonaws.com/owh-data/YRBS/Sample-data/yrbs-sample-data.rar
- Go to local checked out owh-ds codebase software/owh/backoffice/yrbs_indexer.py file update INPUT_FILES_DIR with above downloaded folder path
- Update ES_HOST to 127.0.0.1
- Install boto and elasticsearch python libraries using python pip. If you are using windows pip.exe script available in python installation folder
- Go to folder .../software/owh/backoffice and run yrbs_indexer.py. Creating indexes may take more than hour.
-
To load Mortality data
- Download data set from here
- Hit this link http://www.cdc.gov/nchs/data_access/vitalstatsonline.htm
- Scroll down and go to ‘Mortality Multiple Cause Files’ section and download U.S. Data (.zip files)
- Extract both the zips in a folder and update this folder path in mortality_indexer.py file
- Update ES_HOST in software/owh/backoffice/mortality_indexer.py file.
- And run mortality_indexer.py. Creating indexes may take more than hour.
- Download data set from here
-
Environment variable NODE_ENV
- Create environment variable NODE_ENV and set value to 'dev'. As per elasticsearch configuration(elasticsearch.js), local running elasticsearch service will be used, if NODE_ENV value set to either 'test' or 'dev'
- package.json - nodeJS root file and it has all dependencies and start-up scripts
- bower.json - bower root file and it has all dependencies
- karma.conf.js - Unit test cases configuration file
- protractor.conf.js - Selenium test cases using Protractor.
To start the application run below script.
cd /owh-ds/software/owh/server/
nohup npm run-script start > nohup.out &