-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add Fullname Support to User Profiles #2608
base: develop
Are you sure you want to change the base?
Add Fullname Support to User Profiles #2608
Conversation
mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
try to alter a test that now also the fullname is checked if one was added |
i am sorry, i didn't understand...can you please explain |
We have now changed the API and the model. The CI runs should cover the changes. The tests are all in your fork too We should have at least a test which covers adding a fullname on user creation |
@annapurna-gupta Eric has a good documentation about pytest https://pytest-with-eric.com/ |
Thanks for the pytest resources! I couldn’t work on the issue as my college practicals were going on. |
Hi @ReimarBauer , I’ve pushed PR, please review it...meanwhile, I’ll fix the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a look on the signature of add_user and improve it and add tests which use fullname
export QT_QPA_PLATFORM=offscreen
pytest -k test_url_combo
ERROR tests/_test_msui/test_mscolab.py::Test_Mscolab_connect_window::test_url_combo - TypeError: add_user() missing 1 required positional argument: 'fullname'
@ReimarBauer can you please review the changes. |
mslib/mscolab/migrations/versions/89cbaa26ae78_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments and also look into the tests output of the CI
Could you please guide me on how to fix the migration script issue? Once that is resolved, I will fix the CI results. |
Look into the content of the added file. We we will have only 1 version 10.0.0 release. Your new file is not needed. Move the changes to the existing mig script for version 10.0.0. |
okk |
@ReimarBauer could you please look at the changes and the workflow error. |
@ReimarBauer could you please take a look in this pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
mslib/mscolab/server.py
Outdated
processed_parts = [] | ||
for part in parts: | ||
if "-" in part: | ||
processed_part = part.lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why lowercase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so that it could not break "Jean--Luc" this kind of input further and process it as whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for the new function test_process_name
mslib/mscolab/migrations/versions/922e4d9c94e2_to_version_10_0_0.py
Outdated
Show resolved
Hide resolved
Hii @ReimarBauer, half of the test are still falling. |
Hi Debug this one first https://github.com/Open-MSS/MSS/actions/runs/13435389961/job/37536411745#step:9:1819 FAILED tests/_test_mscolab/test_server.py::Test_Server::test_check_login - assert False is True Those are failing because of timeout you can ignore for now. |
okk |
mslib/mscolab/server.py
Outdated
@@ -248,7 +249,16 @@ def check_login(emailid, password): | |||
return False | |||
|
|||
|
|||
def register_user(email, password, username): | |||
def process_fullname(fullname): | |||
fullname = " ".join(fullname.split()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason for this is to have only 1 blank used in a name?
maybe add a comment if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the reason of this is to handle multiple spaces between fullname, i will add commant.
@@ -60,10 +60,6 @@ def test_verify_pw(self): | |||
assert verify_pw("unknown", "unknown") is False | |||
assert verify_pw("user", "wrong") is False | |||
|
|||
def test_register_user(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, i was trying to fix an error that is why i removed it.. i will put it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my question about the removed test.
Hi @ReimarBauer, i have made the requested changes. |
Thx I look later today. |
btw what is your time zone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx
@matrss please do a final review :) |
MEZ |
Fixes #1282