okfn-brasil/serenata-de-amor

View on GitHub
research/setup

Summary

Maintainability
Test Coverage
#!/usr/bin/env python3

import os
import argparse

DATA_DIR = os.path.join('research', 'data')

parser = argparse.ArgumentParser(
    description='Setup serenata-de-amor using serenata-toolbox.')

parser.add_argument('--all', dest='all', action='store_true',
                    help='Force all datasets from serenata-toolbox \
                    to be downloaded')

args = parser.parse_args()

print('Downloading datasets (this might take several minutes \
    depending on your internet connection)')

from serenata_toolbox.datasets import fetch_latest_backup
os.makedirs(DATA_DIR, exist_ok=True)
fetch_latest_backup(DATA_DIR, force_all=args.all)