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

Update user registration #17

Merged
merged 9 commits into from
Mar 31, 2024
Merged

Update user registration #17

merged 9 commits into from
Mar 31, 2024

Conversation

davidotte
Copy link
Collaborator

This PR introduces the following things:

  • Simplify registration/login process by allowing retries
  • Ask users some additional questions during registration.

Allowing retries

Update registration and login functions such that they return if the login/registration was successfull and the response of the server. If the attempt was not successfull, print the response of the server (e.g. 'Weak Password') and restart the registration/login process.

Asking additional questions

After the registration process that we had before is finished, ask the user a few more questions, which are optional. We can fine-tune the exact wording. The information entered is then sent to the server in a second request. The user is already added to the database after the first request (which we already had before). I thought this was simplest way to do it, if we send everything in one request, all the answers to the questions will have to be entered again if there was a problem at the beginning, e.g. with the password.

If you have further ideas/thoughts on this please let me know :)

Copy link
Collaborator

@SamuelGabriel SamuelGabriel left a comment

Choose a reason for hiding this comment

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

Very cool functionality added and I do like the _choice_with_retries, the main thing that I would think should be improved is to have a separate loop for the email address validity, the password following our rules and the passwords matching

tabpfn_client/prompt_agent.py Show resolved Hide resolved
tabpfn_client/prompt_agent.py Show resolved Hide resolved
tabpfn_client/prompt_agent.py Outdated Show resolved Hide resolved
tabpfn_client/prompt_agent.py Outdated Show resolved Hide resolved
tabpfn_client/prompt_agent.py Show resolved Hide resolved
tabpfn_client/prompt_agent.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@SamuelGabriel SamuelGabriel left a comment

Choose a reason for hiding this comment

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

Can I ask for one more tiny thing: now that we have None as an option in the DB, could you please set empty inputs to None. Right now we would still save empty strings in the DB, if I read the code right.

Otherwise: This looks great! Thanks a lot!

I used approve as I don't think there is another review necessary after fixing the None thing above.

@davidotte
Copy link
Collaborator Author

davidotte commented Mar 23, 2024

Perfect, thanks. :)
This is already done implicitly because only the strings that are not empty are sent to the server and in the schema the variables have default None. In the test db it works with the other values being null.

@SamuelGabriel
Copy link
Collaborator

ah great! this is ready to be merged without a second review

@davidotte davidotte merged commit 7487032 into main Mar 31, 2024
1 check passed
@davidotte davidotte deleted the update_user_registration branch March 31, 2024 09:31
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.

2 participants