<commit_before>Positron
===

[Positron](https://github.com/artsy/positron) is Artsy Writer or the editorial tool for Artsy.

![ArtsyWriter](/doc/ArtsyWriter.png)

Meta
---

* __State:__ production
* __Production:__ [https://www.artsy.net/](https://www.artsy.net/) | [Heroku](https://dashboard.heroku.com/apps/positron-production/resources)
* __Staging:__ [https://staging.artsy.net/](https://staging.artsy.net/) | [Heroku](https://dashboard.heroku.com/apps/positron-staging/resources)
* __Github:__ [https://github.com/artsy/positron/](https://github.com/artsy/positron/)
* __CI:__ [Semaphore](https://semaphoreapp.com/artsy/positron/); merged PRs to artsy/positron#master are automatically deployed to staging; production is manually deployed from semaphore
* __Point People:__ [@craigspaeth](https://github.com/craigspaeth), [@kanaabe](https://github.com/kanaabe)

[![Build Status](https://semaphoreapp.com/api/v1/projects/f6c57bfa-d60c-476d-b7cf-5f3954b69495/253300/badge.png)](https://semaphoreapp.com/artsy/positron)

Set-Up
---

- Install [NVM](https://github.com/creationix/nvm)
- Install Node 6
```
nvm install 6
nvm alias default 6
```
- Fork Positron to your Github account in the Github UI.
- Clone your repo locally (substitute your Github username).
```
git clone <EMAIL>:craigspaeth/positron.git && cd positron
```
- Install node modules
```
yarn install
```
- Create a .env file in the root of the project and paste in sensitive configuration. You can copy the .env.example and fill in the sensitive config with the config vars from staging `heroku config --app=positron-staging`.

  ( note: Leave non-sensitive configuration as it appears in the .env.example rather than copying over the config vars from `heroku config --app=positron-staging`. )
- Positron uses MongoDB as a database. To install MongoDB using homebrew do the following, if you would prefer to install manually check the documentation at [MongoDB](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)
```
brew install mongodb
```
- Start the MongoDB database
```
mongod
```
- Install and run elasticsearch
```
brew install elasticsearch
elasticsearch -d
```
- Start the server
```
make s
```
- Positron should now be running at [http://localhost:3005/](http://localhost:3005/)
<commit_msg>A little help with .env.<commit_after>Positron
===

[Positron](https://github.com/artsy/positron) is Artsy Writer or the editorial tool for Artsy.

![ArtsyWriter](/doc/ArtsyWriter.png)

Meta
---

* __State:__ production
* __Production:__ [https://www.artsy.net/](https://www.artsy.net/) | [Heroku](https://dashboard.heroku.com/apps/positron-production/resources)
* __Staging:__ [https://staging.artsy.net/](https://staging.artsy.net/) | [Heroku](https://dashboard.heroku.com/apps/positron-staging/resources)
* __Github:__ [https://github.com/artsy/positron/](https://github.com/artsy/positron/)
* __CI:__ [Semaphore](https://semaphoreapp.com/artsy/positron/); merged PRs to artsy/positron#master are automatically deployed to staging; production is manually deployed from semaphore
* __Point People:__ [@craigspaeth](https://github.com/craigspaeth), [@kanaabe](https://github.com/kanaabe)

[![Build Status](https://semaphoreapp.com/api/v1/projects/f6c57bfa-d60c-476d-b7cf-5f3954b69495/253300/badge.png)](https://semaphoreapp.com/artsy/positron)

Set-Up
---

- Install [NVM](https://github.com/creationix/nvm)
- Install Node 6
```
nvm install 6
nvm alias default 6
```
- Fork Positron to your Github account in the Github UI.
- Clone your repo locally (substitute your Github username).
```
git clone <EMAIL>:craigspaeth/positron.git && cd positron
```
- Install node modules
```
yarn install
```
- Copy `.env.example` to `.env` in the root of the project and edit all `REPLACE` values with sensitive configuration obtained from `positron-staging`. This should help.
```
heroku config --app=positron-staging | grep -E `cat .env.example | grep REPLACE | cut -f1 -d= | xargs | tr ' ' \|` | sed -e 's/:\ /=/g' | sed -e 's/ //g'
```
- Positron uses MongoDB as a database. To install MongoDB using homebrew do the following, if you would prefer to install manually check the documentation at [MongoDB](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)
```
brew install mongodb
```
- Start the MongoDB database
```
mongod
```
- Install and run elasticsearch
```
brew install elasticsearch
brew services start elasticsearch
```
- Start the server
```
make s
```
- Positron should now be running at [http://localhost:3005/](http://localhost:3005/)

{'fraction_non_alphanumeric': 0.1486784140969163, 'fraction_numerical': 0.016519823788546256, 'mean_word_length': 4.578624078624078, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 30, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5718522', 'n_tokens_mistral': 1635, 'n_tokens_neox': 1516, 'n_words': 392}