<commit_before>writelatex-git-bridge
=====================

Required
--------
  * `maven` (for building)
  * `jdk-8` (for compiling and running)

Installation
------------

Install dependencies:

```
sudo apt-get update
sudo apt-get install -y maven
sudo apt-get install -y openjdk-8-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javac
```

Create a config file according to the format below.

Run `mvn package` to build, test, and package it into a jar at `target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar`.

Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.

Runtime Configuration
---------------------

The configuration file is in `.json` format.

    {
        "port" (int): the port number,
        "rootGitDirectory" (string): the directory in which to store
                                     git repos and the db/atts,
        "apiBaseUrl" (string): base url for the snapshot api,<commit_msg>Update README about running tests<commit_after>writelatex-git-bridge
=====================

Required
--------
  * `maven` (for building, running tests and packaging)
  * `jdk-8` (for compiling and running)

Commands
--------

To be run from the base directory:

**Build jar**:
`mvn package`

**Run tests**:
`mvn test`

**Clean**:
`mvn clean`

Installation
------------

Install dependencies:

```
sudo apt-get update
sudo apt-get install -y maven
sudo apt-get install -y openjdk-8-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javac
```

Create a config file according to the format below.

Run `mvn package` to build, test, and package it into a jar at `target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar`.

Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.

Runtime Configuration
---------------------

The configuration file is in `.json` format.

    {
        "port" (int): the port number,
        "rootGitDirectory" (string): the directory in which to store
                                     git repos and the db/atts,
        "apiBaseUrl" (string): base url for the snapshot api,
{'fraction_non_alphanumeric': 0.15880571181306793, 'fraction_numerical': 0.00865426222414539, 'mean_word_length': 2.7901639344262295, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2026848', 'n_tokens_mistral': 767, 'n_tokens_neox': 729, 'n_words': 232}