OWS Territories

Service for serving and comparing different standards for countries.
====================================================================

## Getting Started

### Installation

The installation is very straightforward, but make sure you are using at least
python 3.4. If you use a Mac, you can install it using `brew`. If you use
Windows, just ask for a remote VM that has it installed for you.

```bash
$ cd ows-territories
$ pyvenv env
$ source env/bin/activate
(env) $ pip install --upgrade pip
(env) $ pip install -r requirements.txt
(env) $ pip install -r requirements-dev.txt
```

### Environment Variables
```bash
# set SENTRY_DSN only when testing that code sends message to Sentry; otherwise leave unset
# contact systems for dev Sentry DSN
export SENTRY_DSN=<url>

### Running

When all dependencies have been installed, you can run the flask application
on your local instance by running:

```bash
(env) $ python dev.py
```

You can optionally set a PORT environment variable to run on a port other than
5001:

```bash
(env) $ PORT=5002 python dev.py
```

### Implementation of loggly

Add below line in file where you need to log message.

```python
from flask import g
```

Implementation of loggly to log messages.

```python
g.log.info('User has hit the homepage')
```

### Testing

```bash
py.test tests/ --cov ows-territories --cov-report term-missing
flake8 ows-territories/ tests/
```

