<commit_before>[![Build Status](https://api.travis-ci.org/MapContrib/MapContrib.svg?branch=develop)](http://travis-ci.org/MapContrib/MapContrib)

# ![MapContrib](logo.png)

> Thematic OpenStreetMap contribution

![MapContrib](screenshot.png)

## Informations

* [Blog](https://blog.mapcontrib.xyz)
* [Documentation](http://wiki.openstreetmap.org/wiki/MapContrib)


## Contribution

Informations about contributing are available in the [CONTRIBUTING.md](CONTRIBUTING.md) file.


## Installation

    $ git clone https://github.com/MapContrib/MapContrib.git
    $ cd MapContrib
    $ yarn install
    $ yarn run build
    $ yarn test

It will install all the dependancies and test the code.


## OpenStreetMap tokens

In order to let the users log in, you have to register a new app on [osm.org](https://openstreetmap.org). When done, you will have two tokens to put in a new `config/local.yml` file (manual copy of `config/default.yml`).


## Launch the server

By default the application will be available at [http://localhost:8080](http://localhost:8080).

### Docker Compose

#### Launch

To launch the Node.js based server.

    $ docker-compose up

MongoDB is rather slow to create the database files the first time... The Node.js container will surely break.
Just wait a few seconds and rerun the up command.

#### Initial data

Then, you will have to initialize the database, in antoher terminal simply run:

    $ docker-compose run node npm run init

### Manual

#### Configuration

You can create your own configuration file by picking some sections from the `config/default.yml` file.

For example, MapContrib uses MongoDB to store data. By default, it will try to connect to a localhost running MongoDB.
If you want to use a MongoDB server on another host/port/whatever, create a `config/local.yml` file by picking the mongodb section of the `config/default.yml` file and adapt the configuration.

#### Initial data

To initialize the database the first time, run:

    $ npm run init

#### Launch
<commit_msg>Add --rm to the docker-compose run command<commit_after>[![Build Status](https://api.travis-ci.org/MapContrib/MapContrib.svg?branch=develop)](http://travis-ci.org/MapContrib/MapContrib)

# ![MapContrib](logo.png)

> Thematic OpenStreetMap contribution

![MapContrib](screenshot.png)

## Informations

* [Blog](https://blog.mapcontrib.xyz)
* [Documentation](http://wiki.openstreetmap.org/wiki/MapContrib)


## Contribution

Informations about contributing are available in the [CONTRIBUTING.md](CONTRIBUTING.md) file.


## Installation

    $ git clone https://github.com/MapContrib/MapContrib.git
    $ cd MapContrib
    $ yarn install
    $ yarn run build
    $ yarn test

It will install all the dependancies and test the code.


## OpenStreetMap tokens

In order to let the users log in, you have to register a new app on [osm.org](https://openstreetmap.org). When done, you will have two tokens to put in a new `config/local.yml` file (manual copy of `config/default.yml`).


## Launch the server

By default the application will be available at [http://localhost:8080](http://localhost:8080).

### Docker Compose

#### Launch

To launch the Node.js based server.

    $ docker-compose up

MongoDB is rather slow to create the database files the first time... The Node.js container will surely break.
Just wait a few seconds and rerun the up command.

#### Initial data

Then, you will have to initialize the database, in antoher terminal simply run:

    $ docker-compose run --rm node npm run init

### Manual

#### Configuration

You can create your own configuration file by picking some sections from the `config/default.yml` file.

For example, MapContrib uses MongoDB to store data. By default, it will try to connect to a localhost running MongoDB.
If you want to use a MongoDB server on another host/port/whatever, create a `config/local.yml` file by picking the mongodb section of the `config/default.yml` file and adapt the configuration.

#### Initial data

To initialize the database the first time, run:

    $ npm run init

#### Launch

{'fraction_non_alphanumeric': 0.0978900883218842, 'fraction_numerical': 0.003925417075564278, 'mean_word_length': 4.089887640449438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, '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': '545707', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1152, 'n_words': 469}