Skip to content

gfw-api/gfw-analysis-gee

Repository files navigation

GFW GEE Analysis

Build Status Test Coverage

Dependencies

Dependencies on other Microservices:

Getting started

Requirements

You need to install Docker in your machine if you haven't already Docker

Development

Follow the next steps to set up the development environment in your machine.

  1. Clone the repo and go to the folder
git clone https://github.com/gfw-api/gfw-analysis-gee
cd gfw-analysis-gee
  1. Run the gfwanalysis.sh shell script in development mode.
./gfwanalysis.sh develop

If this is the first time you run it, it may take a few minutes.

Tests

Run the tests via docker with:

./gfwanalysis.sh test

Or natively via:

pip install -r requirements.txt 
pip install -r requirements_dev.txt 
pytest --cov=gfwanalysis gfwanalysis/tests/

Testing requires a local Redis instance running with a REDIS_URL environment variable.

Code structure

The API has been packed in a Python module (gfwanalysis). It creates and exposes a WSGI application. The core functionality has been divided in three different layers or submodules (Routes, Services and Models).

There are also some generic submodules that manage the request validations, HTTP errors and the background tasks manager.