Skip to content

Conversation

@orronai
Copy link
Collaborator

@orronai orronai commented Sep 14, 2021

  • Added tests
  • Added template and css style
  • Added the background form

orronai and others added 30 commits September 9, 2021 21:51
- Added a html template of the signup page
- Added a href button to the signup page from the login page
- Added the form of the signup to the backend and db
- Added confirmation email system
- Added some tests
- Added a unique salt into confirmation link for each user
- Added a test
- Added few _('...') instead of some english phrases
- Moved out the auth logic into models/users
- Added MAIL_DEFAULT_SENDER variable to the config
- Changed the retrieve_salt method
…ed an error message to the UnhashedPasswordError
- Added tests
- Added a ref link from user's page
- Added the form background
- Added the template and the css style
@sourcery-ai
Copy link

sourcery-ai bot commented Sep 14, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.76 ⭐ 1.68 ⭐ -0.08 👍
Method Length 33.20 ⭐ 33.85 ⭐ 0.65 👎
Working memory 6.35 🙂 6.36 🙂 0.01 👎
Quality 82.68% 82.55% -0.13% 👎
Other metrics Before After Change
Lines 1688 1888 200
Changed files Quality Before Quality After Quality Change
lms/lmsdb/models.py 84.38% ⭐ 84.61% ⭐ 0.23% 👍
lms/lmsweb/init.py 56.91% 🙂 54.82% 🙂 -2.09% 👎
lms/lmsweb/views.py 74.64% 🙂 74.25% 🙂 -0.39% 👎
lms/lmsweb/tools/registration.py 86.90% ⭐ 86.82% ⭐ -0.08% 👎
lms/models/errors.py 95.58% ⭐ 94.91% ⭐ -0.67% 👎
tests/conftest.py 91.19% ⭐ 90.90% ⭐ -0.29% 👎
tests/test_flask_limiter.py 83.28% ⭐ 83.58% ⭐ 0.30% 👍
tests/test_login.py 88.75% ⭐ 87.61% ⭐ -1.14% 👎
tests/test_users.py 88.27% ⭐ 87.52% ⭐ -0.75% 👎
tests/samples/config_copy.py 96.18% ⭐ 96.18% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
lms/lmsweb/views.py comment 13 🙂 202 😞 8 🙂 50.15% 🙂 Try splitting into smaller methods
lms/lmsweb/views.py login 5 ⭐ 124 😞 12 😞 57.29% 🙂 Try splitting into smaller methods. Extract out complex expressions
lms/lmsdb/models.py Solution._base_next_unchecked 0 ⭐ 95 🙂 20 ⛔ 57.42% 🙂 Extract out complex expressions
lms/lmsweb/views.py view 7 ⭐ 134 😞 10 😞 57.80% 🙂 Try splitting into smaller methods. Extract out complex expressions
lms/lmsdb/models.py User.notes 1 ⭐ 92 🙂 18 ⛔ 58.26% 🙂 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!

@yammesicka yammesicka closed this Sep 14, 2021
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.

3 participants