okfn-brasil / serenata-toolbox

📦 pip module containing code shared across Serenata de Amor's projects | ** Este repositório não recebe atualizações frequentes **
MIT License
154 stars 69 forks source link

Fix datasets availability #187

Closed cuducos closed 6 years ago

cuducos commented 6 years ago

This PR changes the datasets from Amazon S3 to Digital Ocean Spaces.

Following that change, a it added a bit of clean up:

In spite of that it is flexible: when the envvar points to Digital Ocean Spaces, it works. If this envvar is not set it works with Amazon S3 right away.

anaschwendler commented 6 years ago

What I did to test this PR:

  1. Clone the project

  2. Change to @cuducos branch:

  3. Run the python console, and tried to download one dataset

  4. Try to see the content of the download and it returned an error:

    ➜  /tmp cat 2016-12-06-reimbursements.xz 
    <?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchKey</Code><BucketName>serenata-de-amor-data</BucketName><RequestId>tx00000000000000002668d-005ab50a22-1632fc-nyc3a</RequestId><HostId>1632fc-nyc3a-nyc</HostId></Error>% 
cuducos commented 6 years ago

Many thanks for the review, @anaschwendler : )

Three minor changes:

Would you mind testing and reviewing it after these changes?

anaschwendler commented 6 years ago

Ok! Now it is working! 🎉

Good one @cuducos \o\