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

WIP: Implement google authentication. #113

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sumit4613
Copy link
Member

Hey, I just made a Pull Request!

Description

This PR implements google authentication.

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


@lgtm-com
Copy link

lgtm-com bot commented Sep 19, 2021

This pull request introduces 2 alerts when merging 68b4254 into 75d06fd - view on LGTM.com

new alerts:

  • 2 for Module-level cyclic import

sumit4613 and others added 2 commits September 19, 2021 13:44
* 'Refactored by Sourcery'

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Sourcery AI <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 19, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.57 ⭐ 3.54 ⭐ -0.03 👍
Method Length 46.08 ⭐ 47.09 ⭐ 1.01 👎
Working memory 6.47 🙂 6.43 🙂 -0.04 👍
Quality 78.99% 78.88% -0.11% 👎
Other metrics Before After Change
Lines 1981 2068 87
Changed files Quality Before Quality After Quality Change
drf_user/init.py 51.66% 🙂 51.66% 🙂 0.00%
drf_user/admin.py 90.58% ⭐ 90.58% ⭐ 0.00%
drf_user/apps.py 99.67% ⭐ 99.67% ⭐ 0.00%
drf_user/auth.py 77.83% ⭐ 77.83% ⭐ 0.00%
drf_user/managers.py 75.39% ⭐ 74.10% 🙂 -1.29% 👎
drf_user/models.py 97.11% ⭐ 97.11% ⭐ 0.00%
drf_user/serializers.py 84.70% ⭐ 85.06% ⭐ 0.36% 👍
drf_user/urls.py 81.62% ⭐ 80.38% ⭐ -1.24% 👎
drf_user/utils.py 70.48% 🙂 71.70% 🙂 1.22% 👍
drf_user/variables.py 98.83% ⭐ 96.18% ⭐ -2.65% 👎
drf_user/views.py 61.72% 🙂 62.89% 🙂 1.17% 👍
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/init.py update_user_settings 36 ⛔ 126 😞 9 🙂 41.26% 😞 Refactor to reduce nesting. Try splitting into smaller methods
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/utils.py generate_otp 4 ⭐ 109 🙂 12 😞 60.18% 🙂 Extract out complex expressions
drf_user/views.py LoginView.post 0 ⭐ 93 🙂 13 😞 64.78% 🙂 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!

@codecov
Copy link

codecov bot commented Sep 19, 2021

Codecov Report

Merging #113 (e9eeb9f) into master (75d06fd) will decrease coverage by 4.70%.
The diff coverage is 67.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   95.68%   90.98%   -4.71%     
==========================================
  Files          20       22       +2     
  Lines         649      721      +72     
==========================================
+ Hits          621      656      +35     
- Misses         28       65      +37     
Impacted Files Coverage Δ
drf_user/__init__.py 77.41% <ø> (ø)
drf_user/admin.py 90.00% <ø> (ø)
drf_user/apps.py 100.00% <ø> (ø)
drf_user/models.py 100.00% <ø> (ø)
drf_user/urls.py 100.00% <ø> (ø)
drf_user/google_auth.py 43.47% <43.47%> (ø)
drf_user/views.py 88.72% <48.64%> (-9.14%) ⬇️
drf_user/utils.py 92.85% <75.00%> (-3.78%) ⬇️
drf_user/managers.py 96.55% <80.00%> (-3.45%) ⬇️
drf_user/auth.py 74.07% <100.00%> (+3.24%) ⬆️
... and 5 more

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 75d06fd...e9eeb9f. Read the comment docs.

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