Closed neomatrix369 closed 3 years ago
Merging this PR leaves code quality unchanged.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 0.80 ⭐ | 0.80 ⭐ | 0.00 |
Method Length | 49.20 ⭐ | 49.20 ⭐ | 0.00 |
Working memory | 7.50 🙂 | 7.50 🙂 | 0.00 |
Quality | 81.97% ⭐ | 81.97% ⭐ | 0.00% |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 346 | 351 | 5 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
nlp_profiler/core.py | 71.16% 🙂 | 71.16% 🙂 | 0.00% |
slow-tests/performance_tests/test_perf_grammar_check.py | 85.30% ⭐ | 85.30% ⭐ | 0.00% |
slow-tests/performance_tests/test_perf_spelling_check.py | 85.30% ⭐ | 85.30% ⭐ | 0.00% |
tests/high_level/test_grammar_check.py | 87.02% ⭐ | 87.02% ⭐ | 0.00% |
tests/high_level/test_sentiment_polarity.py | 79.63% ⭐ | 79.63% ⭐ | 0.00% |
tests/high_level/test_sentiment_subjectivity.py | 79.63% ⭐ | 79.63% ⭐ | 0.00% |
tests/high_level/test_spelling_check.py | 75.75% ⭐ | 75.75% ⭐ | 0.00% |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
nlp_profiler/core.py | apply_text_profiling | 4 ⭐ | 133 😞 | 16 ⛔ | 51.83% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
slow-tests/performance_tests/test_perf_grammar_check.py | test_given_a_text_column_when_profiler_is_applied_with_high_level_analysis_then_it_finishes_quick | 2 ⭐ | 122 😞 | 12 😞 | 60.51% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
slow-tests/performance_tests/test_perf_spelling_check.py | test_given_a_text_column_when_profiler_is_applied_with_high_level_analysis_then_it_finishes_quick | 2 ⭐ | 122 😞 | 12 😞 | 60.51% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
tests/high_level/test_spelling_check.py | test_given_a_text_when_spell_check_is_applied_then_spell_check_analysis_info_is_returned | 2 ⭐ | 68 🙂 | 11 😞 | 69.77% 🙂 | Extract out complex expressions |
tests/high_level/test_sentiment_polarity.py | test_given_a_text_when_sentiment_analysis_is_applied_then_sentiment_analysis_info_is_returned | 2 ⭐ | 59 ⭐ | 10 😞 | 73.06% 🙂 | Extract out complex expressions |
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!
Let us know what you think of it by mentioning @sourcery-ai in a comment.
Closing PR as PR #35 overrides this one and fixes a number of reported issues
Refactor: aggregating high-level features into a separate module of it's own
Inspired by PR #29, related to #28, and partially resolves it (reduces complexity)