hackalog / easydata

A flexible template for doing reproducible data science in Python.
MIT License
105 stars 22 forks source link

Fetch files to user dir bug #210

Open olekssy opened 3 years ago

olekssy commented 3 years ago

Cannot fetch files from data sources to user-defined download directory. The attribute download_dir of src.datasets.DataSource class in NOT passed to fetch method as a kword argument.

Way to reproduce issue:

from src.data import DataSource
from src import paths

ds_name = 'covid-19-epidemiology-raw'
url = 'https://storage.googleapis.com/covid19-open-data/v2/epidemiology.csv'
download_dir = paths["data_path"]

dsrc = DataSource(ds_name, download_dir=tickers_download_dir)
dsrc.add_url(url=url)
dsrc.fetch()
>>>file downloaded to data/raw
hackalog commented 3 years ago

Sorry for letting this linger! I'm just pack from Parental leave, so I'll have a look (and whip up a testcase) imminently