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

Add Fullname Support to User Profiles #2608

Open
wants to merge 62 commits into
base: develop
Choose a base branch
from

Conversation

annapurna-gupta
Copy link
Contributor

Fixes #1282

@ReimarBauer
Copy link
Member

try to alter a test that now also the fullname is checked if one was added

@annapurna-gupta
Copy link
Contributor Author

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

@ReimarBauer
Copy link
Member

ReimarBauer commented Jan 26, 2025

image

Where we currenly have Change Avatar, there should be an "Edit"
The Edit should be used to change the Avatar and the Full Name. Changing the e-mail is currently not allowed by user action.

@annapurna-gupta
Copy link
Contributor Author

image

Where we currenly have Change Avatar, there should be an "Edit" The Edit should be used to change the Avatar and the Full Name. Changing the e-mail is currently not allowed by user action.

Screenshot 2025-01-26 172121
Whenever I try to add a user, an error is displayed.

@annapurna-gupta
Copy link
Contributor Author

image

Where we currenly have Change Avatar, there should be an "Edit" The Edit should be used to change the Avatar and the Full Name. Changing the e-mail is currently not allowed by user action.

Is it possible to create a new issue for this change? I would be happy to work on it.

@ReimarBauer
Copy link
Member

image
Where we currenly have Change Avatar, there should be an "Edit" The Edit should be used to change the Avatar and the Full Name. Changing the e-mail is currently not allowed by user action.

Is it possible to create a new issue for this change? I would be happy to work on it.
yes, after the half feature is added, currently someone will ask where is the fullname...

@ReimarBauer
Copy link
Member

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
https://github.com/annapurna-gupta/MSS/tree/feature/add-fullname-nickname/tests

We should have at least a test which covers adding a fullname on user creation
e.g. https://github.com/annapurna-gupta/MSS/blob/feature/add-fullname-nickname/tests/_test_msui/test_mscolab.py#L178

@ReimarBauer
Copy link
Member

@annapurna-gupta Eric has a good documentation about pytest https://pytest-with-eric.com/
There some more sources on the net https://realpython.com/pytest-python-testing/
on pyvideo you do find many https://pyvideo.org/tag/pytest/

@annapurna-gupta
Copy link
Contributor Author

@annapurna-gupta Eric has a good documentation about pytest https://pytest-with-eric.com/
There some more sources on the net https://realpython.com/pytest-python-testing/
on pyvideo you do find many https://pyvideo.org/tag/pytest/

Thanks for the pytest resources! I couldn’t work on the issue as my college practicals were going on.

@annapurna-gupta
Copy link
Contributor Author

annapurna-gupta commented Feb 3, 2025

Hi @ReimarBauer , I’ve pushed PR, please review it...meanwhile, I’ll fix the tests.

Copy link
Member

@ReimarBauer ReimarBauer left a 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'

@annapurna-gupta
Copy link
Contributor Author

@ReimarBauer can you please review the changes.

Copy link
Member

@ReimarBauer ReimarBauer left a 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

@annapurna-gupta
Copy link
Contributor Author

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.

@ReimarBauer
Copy link
Member

ReimarBauer commented Feb 7, 2025

Look into the content of the added file. We we will have only 1 version 10.0.0 release.
So we want only 1 migration file.

Your new file is not needed.

Move the changes to the existing mig script for version 10.0.0.

@annapurna-gupta
Copy link
Contributor Author

Look into the content of the added file. We we will have only 1 version 10.0.0 release. So we want only 1 migration file.

Your new file is not needed.

Move the changes to the existing mig script for version 10.0.0.

okk

@annapurna-gupta
Copy link
Contributor Author

@ReimarBauer could you please look at the changes and the workflow error.

@annapurna-gupta
Copy link
Contributor Author

annapurna-gupta commented Feb 13, 2025

@ReimarBauer could you please take a look in this pr.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

processed_parts = []
for part in parts:
if "-" in part:
processed_part = part.lower()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why lowercase?

Copy link
Contributor Author

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.

Copy link
Member

@ReimarBauer ReimarBauer left a 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

@annapurna-gupta
Copy link
Contributor Author

Hii @ReimarBauer, half of the test are still falling.

@ReimarBauer
Copy link
Member

ReimarBauer commented Feb 20, 2025

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.
Those related to your change, need changes or your Implantation does.

@annapurna-gupta
Copy link
Contributor Author

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

okk

@@ -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())
Copy link
Member

@ReimarBauer ReimarBauer Feb 21, 2025

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.

Copy link
Contributor Author

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Contributor Author

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.

Copy link
Member

@ReimarBauer ReimarBauer left a 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.

@annapurna-gupta
Copy link
Contributor Author

Hi @ReimarBauer, i have made the requested changes.

@ReimarBauer
Copy link
Member

Thx I look later today.

@annapurna-gupta
Copy link
Contributor Author

Thx I look later today.

btw what is your time zone.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

@ReimarBauer
Copy link
Member

@matrss please do a final review :)

@ReimarBauer
Copy link
Member

Thx I look later today.

btw what is your time zone.

MEZ

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.

user profile options
3 participants