dli-invest / fin_news_nlp

Financial nlp project to scan news sites for information built using spacy, fastapi, scrapy, cookercutter and various news sources.
Apache License 2.0
9 stars 4 forks source link

Feature/search for dividends #25

Closed FriendlyUser closed 2 years ago

FriendlyUser commented 2 years ago

Closes #24

codecov[bot] commented 2 years ago

Codecov Report

Merging #25 (f0ca4ce) into main (f650e32) will increase coverage by 0.07%. The diff coverage is 100.00%.

:exclamation: Current head f0ca4ce differs from pull request most recent head 1245b2d. Consider uploading reports for the commit 1245b2d to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   75.25%   75.32%   +0.07%     
==========================================
  Files          10       10              
  Lines         295      308      +13     
==========================================
+ Hits          222      232      +10     
- Misses         73       76       +3     
Flag Coverage Δ
ga_ci 75.32% <100.00%> (+0.07%) :arrow_up:

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

Impacted Files Coverage Δ
nlp_articles/app/nlp.py 100.00% <100.00%> (ø)
nlp_articles/app/tests/test_nlp.py 88.46% <100.00%> (-11.54%) :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 402e1e6...1245b2d. Read the comment docs.

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.46%.

Quality metrics Before After Change
Complexity 12.07 🙂 11.60 🙂 -0.47 👍
Method Length 78.96 🙂 82.75 🙂 3.79 👎
Working memory 12.14 😞 11.87 😞 -0.27 👍
Quality 52.19% 🙂 53.65% 🙂 1.46% 👍
Other metrics Before After Change
Lines 528 629 101
Changed files Quality Before Quality After Quality Change
nlp_articles/app/nlp.py 10.78% ⛔ 10.32% ⛔ -0.46% 👎
nlp_articles/app/tests/test_nlp.py 75.78% ⭐ 80.44% ⭐ 4.66% 👍
scrappers/spiders/yahoo_cad_tickers_news.py 64.09% 🙂 64.96% 🙂 0.87% 👍
scrappers/spiders/yahoo_usd_tickers_news.py 63.74% 🙂 63.73% 🙂 -0.01% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
nlp_articles/app/nlp.py init_nlp 39 ⛔ 538 ⛔ 20 ⛔ 10.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
scrappers/spiders/yahoo_cad_tickers_news.py YahooCadStockSpider.handle_article 4 ⭐ 206 ⛔ 14 😞 47.37% 😞 Try splitting into smaller methods. Extract out complex expressions
scrappers/spiders/yahoo_usd_tickers_news.py YahooUSDStockSpider.handle_article 4 ⭐ 206 ⛔ 14 😞 47.37% 😞 Try splitting into smaller methods. Extract out complex expressions
scrappers/spiders/yahoo_usd_tickers_news.py YahooUSDStockSpider.parse 9 🙂 153 😞 10 😞 53.82% 🙂 Try splitting into smaller methods. Extract out complex expressions
scrappers/spiders/yahoo_cad_tickers_news.py YahooCadStockSpider.parse 9 🙂 151 😞 10 😞 54.03% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!