For The Get Requirements part I have implemented it with two different DB design:
- The first one is the same as the one you gave me you find it under resources/rates.sql
- In the second one which is under resources/rates_new.sql I have merged regions and ports tables to one table and I call it locations and I have added a type filed to specify if the location is a port or region or maybe something new in the future (let's say airport) here is the design of the new DB I noticed also that new DB design perform much better in some type of queries and the same in most queries I setup for the that a profiling decorator (you find it here).
Please export Doc/postman/ratetask.postman_collection.json file to your postman workspace to explore the api
if you are using mac you need to install postgres in your machine to be able to install dependencies in requirements.txt
brew install postgresql
Note: in some case I got compilation error while installing psycopg2
sudo pip install -r requirements.txt
docker build -t ratestask . # to be run only first time
docker run -p 0.0.0.0:5432:5432 --name ratestask ratestask
mv .env_copy .env
python app.py
pytest test*