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

Fix tests and some reformatting #138

Merged
merged 4 commits into from
Apr 22, 2022
Merged

Fix tests and some reformatting #138

merged 4 commits into from
Apr 22, 2022

Conversation

sumit4613
Copy link
Member

Hey, I just made a Pull Request!

Description

Motivation and Context

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit tests (no major decrease in code coverage %).
  • All tests pass.
  • Docstring coverage is 100% via interrogate drf_user (I mean, we should set a good example 😄).
  • Updates to documentation:
    • Document any relevant additions/changes in README.md.
    • Manually update both the README.md and docs/index.rst for any new changes.
    • Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note


@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 22, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.07 ⭐ 2.06 ⭐ -0.01 👍
Method Length 50.51 ⭐ 50.79 ⭐ 0.28 👎
Working memory 6.36 🙂 6.36 🙂 0.00
Quality 79.68% 79.55% -0.13% 👎
Other metrics Before After Change
Lines 1100 1119 19
Changed files Quality Before Quality After Quality Change
drf_user/views.py 61.89% 🙂 61.89% 🙂 0.00%
tests/settings.py 73.32% 🙂 71.28% 🙂 -2.04% 👎
tests/test_views.py 87.69% ⭐ 87.69% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
drf_user/views.py OTPLoginView.post 15 🙂 245 ⛔ 10 😞 41.48% 😞 Try splitting into smaller methods. Extract out complex expressions
drf_user/views.py OTPView.post 11 🙂 142 😞 13 😞 47.97% 😞 Try splitting into smaller methods. Extract out complex expressions
drf_user/views.py LoginView.post 0 ⭐ 93 🙂 13 😞 64.78% 🙂 Extract out complex expressions
tests/test_views.py TestOTPLoginView.setUp 0 ⭐ 138 😞 7 🙂 70.85% 🙂 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!

@sumit4613 sumit4613 self-assigned this Apr 22, 2022
@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #138 (bd767ef) into master (a8cbc5e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #138   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files          20       20           
  Lines         656      657    +1     
=======================================
+ Hits          628      629    +1     
  Misses         28       28           
Impacted Files Coverage Δ
drf_user/views.py 97.87% <100.00%> (+0.01%) ⬆️

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 932f219...bd767ef. Read the comment docs.

@sumit4613 sumit4613 merged commit 1b27bb4 into master Apr 22, 2022
@sumit4613 sumit4613 deleted the sumit/add-tests branch April 22, 2022 17:03
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

1 participant