Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: aggregating high-level features #34

Closed
wants to merge 4 commits into from

Conversation

neomatrix369
Copy link
Owner

@neomatrix369 neomatrix369 commented Oct 16, 2020

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)

…g the new python package path to granular_features
@neomatrix369 neomatrix369 self-assigned this Oct 16, 2020
…-features

Refactor: aggregating high-level features (Sourcery refactored)
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 16, 2020

Sourcery Code Quality Report

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

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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.

@neomatrix369
Copy link
Owner Author

Closing PR as PR #35 overrides this one and fixes a number of reported issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve code quality based on report from @sourcery-ai (generate_features.py)
1 participant