systamental / cryptodatapy

CryptoDataPy is a python library that makes it easy to build high quality data pipelines for the analysis of cryptoassets
Apache License 2.0
11 stars 4 forks source link

pytest should not require API keys #3

Closed closedLoop closed 3 months ago

closedLoop commented 2 years ago

running python -m pytest yields three errors related to pulling in data from various APIs

======================== short test summary info ========================
ERROR tests/test_filter.py - TypeError: Set your api key. Alternativel...
ERROR tests/test_impute.py - TypeError: Set your api key. Alternativel...
ERROR tests/test_od.py - TypeError: Set your api key. Alternatively, y...
!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!

In general unit tests shouldn't rely on external services. It would be better if we saved down some example data as a CSV that is stored in the repo.

nicklatin commented 2 years ago

Got it. Any suggestions on how to do this? I've integrated the data wrangling into the data collection process so would probably need to separate the data response from the wrangling (store in df and wrangle into tidy data format)?

nicklatin commented 3 months ago

Added data dir to tests to address this issue.