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

Enhance emulation tests #26

Merged
merged 2 commits into from
Oct 29, 2021
Merged

Enhance emulation tests #26

merged 2 commits into from
Oct 29, 2021

Conversation

tfcollins
Copy link
Owner

Add more parts and CI testing for emulation modes

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 29, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 15.84 🙂 15.24 🙂 -0.60 👍
Method Length 59.11 ⭐ 58.65 ⭐ -0.46 👍
Working memory 7.84 🙂 7.70 🙂 -0.14 👍
Quality 64.54% 🙂 65.39% 🙂 0.85% 👍
Other metrics Before After Change
Lines 728 803 75
Changed files Quality Before Quality After Quality Change
pytest_libiio/plugin.py 54.59% 🙂 54.41% 🙂 -0.18% 👎
tests/conftest.py 92.46% ⭐ 92.07% ⭐ -0.39% 👎
tests/test_plugin.py 87.38% ⭐ 87.49% ⭐ 0.11% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pytest_libiio/plugin.py lookup_hw_from_map 68 ⛔ 180 😞 15 😞 19.93% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pytest_libiio/plugin.py _contexts 21 😞 173 😞 11 😞 40.16% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pytest_libiio/plugin.py _iio_emu 31 😞 150 😞 9 🙂 40.63% 😞 Refactor to reduce nesting. Try splitting into smaller methods
pytest_libiio/plugin.py handle_iio_emu 18 🙂 148 😞 12 😞 43.07% 😞 Try splitting into smaller methods. Extract out complex expressions
pytest_libiio/plugin.py find_contexts 9 🙂 127 😞 11 😞 54.84% 🙂 Try splitting into smaller methods. 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!

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.

1 participant