tfukaza / harvest

Simple and intuitive Python framework for algorithmic trading. Easily create bots to live and paper trade stocks, crypto, and options!
https://tfukaza.github.io/harvest-website
MIT License
124 stars 26 forks source link

Typing #275

Closed shershah010 closed 2 years ago

shershah010 commented 2 years ago

Adding typing to most function Adds a yahoo streamer livetest

OK
Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
harvest/__init__.py                         0      0   100%
harvest/algo.py                           222    132    41%
harvest/api/__init__.py                     0      0   100%
harvest/api/_base.py                      260     82    68%
harvest/api/alpaca.py                     207     79    62%
harvest/api/dummy.py                      111     18    84%
harvest/api/kraken.py                     172     58    66%
harvest/api/paper.py                      238     40    83%
harvest/api/polygon.py                    162     47    71%
harvest/api/robinhood.py                  342    287    16%
harvest/api/webull.py                     340    291    14%
harvest/api/yahoo.py                      177     25    86%
harvest/cli.py                            156     65    58%
harvest/definitions.py                    274     36    87%
harvest/plugin/__init__.py                  0      0   100%
harvest/plugin/_base.py                    16      5    69%
harvest/plugin/dolt_options_plugin.py      13     13     0%
harvest/server.py                         109     46    58%
harvest/storage/__init__.py                 3      0   100%
harvest/storage/base_storage.py           149     35    77%
harvest/storage/csv_storage.py             30      0   100%
harvest/storage/database_storage.py        67      6    91%
harvest/storage/pickle_storage.py          36      1    97%
harvest/trader/__init__.py                  2      0   100%
harvest/trader/tester.py                  231     38    84%
harvest/trader/trader.py                  291     65    78%
harvest/utils.py                          229     45    80%
harvest/wizard.py                          78     15    81%
-----------------------------------------------------------
TOTAL                                    3915   1429    63%
codecov[bot] commented 2 years ago

Codecov Report

Merging #275 (66f1dc7) into main (a994b32) will increase coverage by 0.10%. The diff coverage is 70.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   53.17%   53.28%   +0.10%     
==========================================
  Files          25       25              
  Lines        3904     3915      +11     
==========================================
+ Hits         2076     2086      +10     
- Misses       1828     1829       +1     
Flag Coverage Δ
unittests 53.28% <70.31%> (+0.10%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
harvest/api/alpaca.py 3.38% <0.00%> (-0.02%) :arrow_down:
harvest/api/kraken.py 2.32% <0.00%> (ø)
harvest/plugin/dolt_options_plugin.py 0.00% <0.00%> (ø)
harvest/utils.py 80.34% <50.00%> (ø)
harvest/definitions.py 86.86% <86.27%> (+0.09%) :arrow_up:
harvest/api/_base.py 68.84% <100.00%> (ø)
harvest/api/dummy.py 83.78% <100.00%> (ø)
harvest/api/paper.py 83.19% <100.00%> (+0.07%) :arrow_up:
harvest/api/polygon.py 19.13% <100.00%> (ø)
harvest/api/yahoo.py 85.87% <100.00%> (+0.24%) :arrow_up:
... and 10 more

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 a994b32...66f1dc7. Read the comment docs.