ows-assets
======================
ows-assets microservice handles asset management. Functionality includes:
* validation
* asset upload
* asset metadata

## 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
$ pyvenv env
(env) $ . env/bin/activate
(env) $ pip install -r requirements.txt
(env) $ pip install -r requirements-dev.txt
```

###Configuration###

Copy .env.shadow to .env and add the appropriate environement variables for your environment.

`cp .env.shadow .env`

Set the configurations as-

```bash
export AR_DB_URL=mysql+pymysql://user:password@host:port/database
export DD_DB_URL=mysql+pymysql://user:password@host:port/database
export RDS_DB_URL=mysql+pymysql://user:password@host:port/database
export Environment=
```

Then, set your environment:
```bash
source .env
```

###Running###

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

`(env) $ python dev.py`

By using the development server, you will have access to specific features that are not necessarily available in production, such as the exception tracer.

###Testing###

To run the tests, all you have to do is to run:

```bash
(env) $ py.test tests/ --cov assets --cov-report term-missing
(env) $ flake8 assets/ tests/
```
