<commit_before>INSTRUCTIONS
================

**Step 1**: download and install [Node.js and npm](https://docs.npmjs.com/getting-started/installing-node) version 0.12.7 or newer.

----------
**Step 2**: clone [research-coi project](https://github.com/kuali/research-coi)
```
cd ~/workspace
git clone https://github.com/kuali/research-coi research-coi
```
----------
**Step 3**: install dependecies
```
cd ~/workspace/research-coi
npm install

If using Oracle:
  npm uninstall mysql
  npm install strong-oracle --save
  Go through the install process listed for [strong-oracle](https://github.com/strongloop/strong-oracle), including drivers.
```
----------
**Step 4**: Create Database
```
For MySQL:
  create database coi;

For Oracle:
  CREATE USER coi IDENTIFIED BY "&pw";
  grant create session to coidemo;
  grant create procedure to coidemo;
  grant create table to coidemo;
  grant create sequence to coidemo;
  create tablespace coi ....
  alter user coi default tablespace coi;
```

----------
**Step 5**: Create knexfile.js
```
For MySQL:

module.exports = {
  kc_coi: {
    client: 'mysql',
    connection: {
      database: 'coi',
      user: 'root',
      password: ''
    }
  },
  pool: {
    min: 2,
    max: 20
  }
};

For Oracle:

module.exports = {
  kc_coi: {
    client: 'strong-oracle',
    connection: {
      database: '<sid>',
      host: '<host name or ip>',
      port: '1521',
      user: 'COI',
      password: `<password>'
    }
  }
};

```
----------

**Step 6**: Apply Migrations:
```
node ~/workspace/kc-coi/node_modules/knex/lib/bin/cli.js --cwd=db/migration --knexfile <replace with knexfile.js path> migrate:latest --env kc_coi
```
----------
**Step 7**: Apply Seed Data:
```
node ~/workspace/kc-coi/node_modules/knex/lib/bin/cli.js --cwd=db/migration --knexfile <replace with knexfile.js path> seed:run --env kc_coi
```

Alternately you can add some demonstration data to play with:
```<commit_msg>Change Wording of Readme"<commit_after>INSTRUCTIONS
================

**Step 1**: download and install [Node.js and npm](https://docs.npmjs.com/getting-started/installing-node) version 0.12.7 or newer.

----------
**Step 2**: clone [research-coi project](https://github.com/kuali/research-coi)
```
cd ~/workspace
git clone https://github.com/kuali/research-coi research-coi
```
----------
**Step 3**: install dependecies
```
cd ~/workspace/research-coi
npm install

If using Oracle:
  npm uninstall mysql
  npm install strong-oracle --save
  Go through the install process listed for [strong-oracle](https://github.com/strongloop/strong-oracle), including drivers.
```
----------
**Step 4**: Create Database
```
For MySQL:
  create database coi;

For Oracle:
  CREATE USER coi IDENTIFIED BY "&pw";
  grant create session to coidemo;
  grant create procedure to coidemo;
  grant create table to coidemo;
  grant create sequence to coidemo;
  create tablespace coi ....
  alter user coi default tablespace coi;
```

----------
**Step 5**: Create knexfile.js
```
For MySQL:

module.exports = {
  kc_coi: {
    client: 'mysql',
    connection: {
      database: 'coi',
      user: 'root',
      password: ''
    }
  },
  pool: {
    min: 2,
    max: 20
  }
};

For Oracle:

module.exports = {
  kc_coi: {
    client: 'strong-oracle',
    connection: {
      database: '<sid>',
      host: '<host name or ip>',
      port: '1521',
      user: 'COI',
      password: `<password>'
    }
  }
};

```
----------

**Step 6**: Apply Migrations:
```
node ~/workspace/kc-coi/node_modules/knex/lib/bin/cli.js --cwd=db/migration --knexfile <replace with knexfile.js path> migrate:latest --env kc_coi
```
----------
**Step 7**: Apply Seed Data:
```
node ~/workspace/kc-coi/node_modules/knex/lib/bin/cli.js --cwd=db/migration --knexfile <replace with knexfile.js path> seed:run --env kc_coi
```

Alternatively you can add some demonstration data to play with:
```
{'fraction_non_alphanumeric': 0.18282619907168643, 'fraction_numerical': 0.009283135636926251, 'mean_word_length': 2.982546201232033, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 8, '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': '545546', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1301, 'n_words': 363}