<commit_before># Bluemix Python Web application

[![Build Status](https://travis-ci.org/NYU-DevOps-S17/Orders.svg?branch=master)](https://travis-ci.org/NYU-DevOps-S17/Orders)
[![codecov](https://codecov.io/gh/NYU-DevOps-S17/Orders/branch/master/graph/badge.svg)](https://codecov.io/gh/NYU-DevOps-S17/Orders)

This repository if for Team Bravo Orders Project.

Follow the steps below to get the code up and running locally.

## Prerequisite : Vagrant and VirtualBox

## Get the code
From a terminal navigate to a location where you want this application code to be downloaded to and issue:
```bash
    $ git clone <EMAIL>:NYU-DevOps-S17/Orders.git
    $ cd Orders
    $ vagrant up
    $ vagrant ssh
    $ cd /vagrant
```
This will place you into an Ubuntu VM all set to run the code.

You can run the code to test it out in your browser with the following command:

    $ python run.py

You should be able to see it at: http://localhost:5000/

When you are done, you can use `Ctrl+C` to stop the server and then exit and shut down the vm with:

    $ vagrant halt

## BlueMix deployment

Once there is an update on the master branch, BlueMix will auto build/deploy the latest working copy.

    BlueMix URL: https://nyu-devops-orders.mybluemix.net/

## BDD / TDD tests command when running locally

Use the following commands to test BDD and TDD results.
```bash
    BDD: $ behave
    TDD: $ nosetests
```

## Structure of application

**Procfile** - Contains the command to run when you application starts on Bluemix. 

**requirements.txt** - Contains the external python packages that are required by the application. 

**runtime.txt** - Controls which python runtime to use. In this case we want to use 2.7.9.

**README.md** - this readme.

**manifest.yml** - Controls how the app will be deployed in Bluemix and specifies memory and other services like Redis that are needed to be bound to it.<commit_msg>add swagger link<commit_after># Bluemix Python Web application

[![Build Status](https://travis-ci.org/NYU-DevOps-S17/Orders.svg?branch=master)](https://travis-ci.org/NYU-DevOps-S17/Orders)
[![codecov](https://codecov.io/gh/NYU-DevOps-S17/Orders/branch/master/graph/badge.svg)](https://codecov.io/gh/NYU-DevOps-S17/Orders)

This repository if for Team Bravo Orders Project.

Follow the steps below to get the code up and running locally.

## Prerequisite : Vagrant and VirtualBox

## Get the code
From a terminal navigate to a location where you want this application code to be downloaded to and issue:
```bash
    $ git clone <EMAIL>:NYU-DevOps-S17/Orders.git
    $ cd Orders
    $ vagrant up
    $ vagrant ssh
    $ cd /vagrant
```
This will place you into an Ubuntu VM all set to run the code.

You can run the code to test it out in your browser with the following command:

    $ python run.py

You should be able to see it at: http://localhost:5000/

Swagger doc page: http://localhost:5000/apidocs/index.html

When you are done, you can use `Ctrl+C` to stop the server and then exit and shut down the vm with:

    $ vagrant halt

## BlueMix deployment

Once there is an update on the master branch, BlueMix will auto build/deploy the latest working copy.

    BlueMix URL: https://nyu-devops-orders.mybluemix.net/
    BlueMix Swagger doc page: https://nyu-devops-orders.mybluemix.net/apidocs/index.html?url=/v1/spec

## BDD / TDD tests command when running locally

Use the following commands to test BDD and TDD results.
```bash
    BDD: $ behave
    TDD: $ nosetests
```

## Structure of application

**Procfile** - Contains the command to run when you application starts on Bluemix. 

**requirements.txt** - Contains the external python packages that are required by the application. 

**runtime.txt** - Controls which python runtime to use. In this case we want to use 2.7.9.

**README.md** - this readme.

**manifest.yml** - Controls how the app will be deployed in Bluemix and specifies memory and other services like Redis that are needed to be bound to it.
{'fraction_non_alphanumeric': 0.09419743782969103, 'fraction_numerical': 0.009796533534287867, 'mean_word_length': 3.690223792697291, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6970537', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1211, 'n_words': 500}