Skip to content

add basic corrupt image handling#407

Merged
davanstrien merged 9 commits intomainfrom
corrupt-image-handling
Jan 27, 2022
Merged

add basic corrupt image handling#407
davanstrien merged 9 commits intomainfrom
corrupt-image-handling

Conversation

@davanstrien
Copy link
Owner

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 27, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.78%.

Quality metrics Before After Change
Complexity 1.81 ⭐ 2.30 ⭐ 0.49 👎
Method Length 49.62 ⭐ 50.98 ⭐ 1.36 👎
Working memory 7.44 🙂 7.55 🙂 0.11 👎
Quality 76.87% 76.09% -0.78% 👎
Other metrics Before After Change
Lines 624 726 102
Changed files Quality Before Quality After Quality Change
src/flyswot/inference.py 75.71% ⭐ 74.61% 🙂 -1.10% 👎
tests/test_inference.py 78.42% ⭐ 77.84% ⭐ -0.58% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/flyswot/inference.py predict_directory 1 ⭐ 163 😞 20 ⛔ 48.32% 😞 Try splitting into smaller methods. Extract out complex expressions
src/flyswot/inference.py predict_files 14 🙂 117 🙂 13 😞 48.33% 😞 Extract out complex expressions
tests/test_inference.py test_predict_directory_local_mult 4 ⭐ 181 😞 9 🙂 58.02% 🙂 Try splitting into smaller methods
src/flyswot/inference.py OnnxInferenceSession.predict_image 4 ⭐ 126 😞 12 😞 58.03% 🙂 Try splitting into smaller methods. Extract out complex expressions
tests/test_inference.py test_predict_directory 4 ⭐ 179 😞 8 🙂 60.41% 🙂 Try splitting into smaller methods

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!

@davanstrien davanstrien merged commit 5fde7c1 into main Jan 27, 2022
@davanstrien davanstrien deleted the corrupt-image-handling branch January 27, 2022 15:31
@davanstrien davanstrien added enhancement New feature or request testing Testing labels Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant