burakyilmaz321 / tefas-crawler

A Python library for crawling public data from Tefas.
MIT License
75 stars 21 forks source link

fix the bug occurs when response is empty #8

Closed burakyilmaz321 closed 3 years ago

burakyilmaz321 commented 3 years ago

Some days, or some funds has no data. In that case, tefas returns an empty list. Handle this case by explicitly passing the columns argument of pandas.DataFrame.

Add a unit test for this case

codecov[bot] commented 3 years ago

Codecov Report

Merging #8 (e5be278) into main (b97bc32) will decrease coverage by 11.30%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main       #8       +/-   ##
===========================================
- Coverage   94.78%   83.47%   -11.31%     
===========================================
  Files           3        3               
  Lines         115      115               
===========================================
- Hits          109       96       -13     
- Misses          6       19       +13     
Impacted Files Coverage Δ
tefas/crawler.py 86.04% <100.00%> (-4.66%) :arrow_down:
tefas/schema.py 82.25% <0.00%> (-17.75%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b97bc32...e5be278. Read the comment docs.