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

remove example dir by smith (Sourcery refactored) #17

Closed
wants to merge 1 commit into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Nov 9, 2021

Pull Request #16 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the fixed_test_smith branch, then run:

git fetch origin sourcery/fixed_test_smith
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from ZhiboRao November 9, 2021 11:47
Comment on lines -37 to +40
if np.random.random() > thro:
return imgs
else:
if np.random.random() <= thro:
rotote_k = np.random.randint(low=0, high=3)
imgs = list(map(lambda img: np.rot90(img, rotote_k), imgs))
return imgs
return imgs
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function DataAugmentation.random_rotate refactored with the following changes:

Comment on lines -58 to +56
imgs = []
imgs.append(img)
imgs = [img]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function debug_main refactored with the following changes:

Source/JackFramework/ImgHandler/debug.py Show resolved Hide resolved
@sourcery-ai sourcery-ai bot closed this Nov 9, 2021
@sourcery-ai sourcery-ai bot deleted the sourcery/fixed_test_smith branch November 9, 2021 11:47
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Nov 9, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.48 ⭐ 0.39 ⭐ -0.09 👍
Method Length 36.67 ⭐ 35.50 ⭐ -1.17 👍
Working memory 6.26 🙂 6.22 🙂 -0.04 👍
Quality 82.64% 83.35% 0.71% 👍
Other metrics Before After Change
Lines 78 73 -5
Changed files Quality Before Quality After Quality Change
Source/JackFramework/ImgHandler/data_augmentation.py 82.40% ⭐ 82.93% ⭐ 0.53% 👍
Source/JackFramework/ImgHandler/debug.py 83.39% ⭐ 84.82% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation

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!

Help us improve this quality report!

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

Successfully merging this pull request may close these issues.

None yet

0 participants