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: split the original generate_features.py module #29

Merged
merged 2 commits into from
Oct 16, 2020

Conversation

neomatrix369
Copy link
Owner

Refactor: split the original generate_features.py and extract the parallelisation aspect into a module of it's own

Related to issue #28, and partially resolves it (reduces complexity)

…allelisation aspect into a module of it's own
@neomatrix369
Copy link
Owner Author

neomatrix369 commented Oct 16, 2020

@sourcery-ai in the above report it would be helpful to find out what those recommended/suggested changes are, which areas in the code these changes can be brought about

The before and after changes report/comparison maybe a bit counter-intuitive if compared to the changes made in the code base

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 16, 2020

Sourcery Code Quality Report

This PR has an average code quality of 85.18%

Quality metrics Before After Change
Complexity 1.00 ⭐
Method Length 37.00 ⭐
Working memory 7.00 🙂
Quality % 85.18% %
Other metrics Before After Change
Lines 27
Changed files Quality Before Quality After Quality Change
nlp_profiler/generate_features/init.py 85.18% ⭐

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

File Function Complexity Length Working Memory Quality Recommendation
nlp_profiler/generate_features/init.py generate_features 2 ⭐ 62 🙂 11 😞 70.70% 🙂 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.

@codecov-io
Copy link

codecov-io commented Oct 16, 2020

Codecov Report

Merging #29 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #29   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        21    +1     
  Lines          358       360    +2     
  Branches        51        51           
=========================================
+ Hits           358       360    +2     
Impacted Files Coverage Δ
nlp_profiler/generate_features/__init__.py 100.00% <100.00%> (ø)
...erate_features/parallelisation_methods/__init__.py 100.00% <100.00%> (ø)

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 5ad0271...193f97a. Read the comment docs.

@neomatrix369
Copy link
Owner Author

neomatrix369 commented Oct 16, 2020

Merging, for now, will use the @sourcery-ai generated PRs as guidance to refractor further

@neomatrix369 neomatrix369 merged commit 4a3387a into master Oct 16, 2020
@neomatrix369 neomatrix369 added hacktoberfest-accepted Approved/merged. Part of the Hacktoberfest 2020 (https://hacktoberfest.digitalocean.com) hacktoberfest Classify topic. Part of the Hacktoberfest 2020 (https://hacktoberfest.digitalocean.com) labels Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality hacktoberfest Classify topic. Part of the Hacktoberfest 2020 (https://hacktoberfest.digitalocean.com) hacktoberfest-accepted Approved/merged. Part of the Hacktoberfest 2020 (https://hacktoberfest.digitalocean.com) refactor
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)
2 participants