diva: added all previous commits, added username and password change #1

Merged
Midorica merged 3 commits from Dniel97/artemis:diva_card_procedure into develop 2023-02-22 23:27:12 +00:00
Contributor

Changes

  • Changed update_profile() function to allow a single Dict instead of multiple values
  • Added passwd* Columns to profile table and added corresponding update/rollback sql scripts
  • Added handle_card_procedure_request(), handle_change_name_request () and handle_change_passwd_request() functions to DivaBase

Important

Not sure about the update to update_profile() because in order to change the values from the retuned LegacyRow it first needs to be converted to a Dict. I just was annoyed to pass 26 arguments to that function if I just needed to change one value lol. Let me know if I sould switch that back.

## Changes - Changed `update_profile()` function to allow a single Dict instead of multiple values - Added `passwd*` Columns to profile table and added corresponding update/rollback sql scripts - Added `handle_card_procedure_request()`, `handle_change_name_request ()` and `handle_change_passwd_request()` functions to DivaBase ## Important Not sure about the update to `update_profile()` because in order to change the values from the retuned `LegacyRow` it first needs to be converted to a Dict. I just was annoyed to pass 26 arguments to that function if I just needed to change one value lol. Let me know if I sould switch that back.
Dniel97 added 1 commit 2023-02-18 20:17:00 +00:00
c99bfda015
diva: added all previous commits, added username and password change
- Changed `update_profile()` function to allow a single Dict instead of multiple values
- Added `passwd*` Columns to profile table and added corresponding update/rollback sql scripts
- Added `handle_card_procedure_request()`, `handle_change_name_request ()` and `handle_change_passwd_request()` functions to DivaBase
Collaborator

Hello Dniel

After doing quite a bit of troubleshooting with the new master branch, I was finally able to test out the PR request

So far everything looks good after doing a few sessions in the game and not even a single error was found.

Hay1tsme will be doing a review tomorrow for it

Thank you

Hello Dniel After doing quite a bit of troubleshooting with the new master branch, I was finally able to test out the PR request So far everything looks good after doing a few sessions in the game and not even a single error was found. Hay1tsme will be doing a review tomorrow for it Thank you
Collaborator

Hello again,

I just finished the last tests i forgot about and you almost got it all good by the look of it

Only the handle_change_name_request did not apply the new username, the card_procedure_request and change_passwd_request appears to have both worked.

Edit: we found out it was caused by the limit of chars that didn't match with the game (10 instead of 8)

You might want to check for that last issue, maybe Hay have an idea for the update_profile

Thank you

Hello again, I just finished the last tests i forgot about and you almost got it all good by the look of it Only the handle_change_name_request did not apply the new username, the card_procedure_request and change_passwd_request appears to have both worked. Edit: we found out it was caused by the limit of chars that didn't match with the game (10 instead of 8) You might want to check for that last issue, maybe Hay have an idea for the update_profile Thank you
Dniel97 added 1 commit 2023-02-19 15:09:30 +00:00
Owner

Why not just create a new function like update_name() that only updates the name. If the name change JUST changes the name field, there's no point in pulling down the entire profile just to write back 99% the same values.

Recommend you revert the changes to update_profile() and just create a seperate name change function.

Why not just create a new function like `update_name()` that only updates the name. If the name change JUST changes the name field, there's no point in pulling down the entire profile just to write back 99% the same values. Recommend you revert the changes to `update_profile()` and just create a seperate name change function.
Author
Contributor

Why not just create a new function like update_name() that only updates the name. If the name change JUST changes the name field, there's no point in pulling down the entire profile just to write back 99% the same values.

Recommend you revert the changes to update_profile() and just create a seperate name change function.

This would not solve the problem, because that would require a function for the player_name, passwd, my_qst_id, my_qst_sts... if you dont want to write back 99% of the values as already done here df4efa1fda/titles/diva/base.py (L498).

So I cannot recommend reverting back to the old "25 arguments function". So either create a function for the every change (update_name(), update_passwd(), ...), maybe use sqlalchemy ORM model which might require "some" rewrites (profile.player_name = new_play_name) or rewrite the function to only update the profile columns/values which are not None (if this is even possible?).

> Why not just create a new function like `update_name()` that only updates the name. If the name change JUST changes the name field, there's no point in pulling down the entire profile just to write back 99% the same values. > > Recommend you revert the changes to `update_profile()` and just create a seperate name change function. This would not solve the problem, because that would require a function for the player_name, passwd, my_qst_id, my_qst_sts... if you dont want to write back 99% of the values as already done here https://gitea.tendokyu.moe/Hay1tsme/artemis/src/commit/df4efa1fda20f0c2a64dbbbf188f57cdb09153ac/titles/diva/base.py#L498. So I cannot recommend reverting back to the old "25 arguments function". So either create a function for the every change `(update_name(), update_passwd(), ...)`, maybe use sqlalchemy ORM model which might require "some" rewrites (`profile.player_name = new_play_name`) or rewrite the function to only update the profile columns/values which are not `None` (if this is even possible?).
Owner

Hm, you're right. We might be able to use **kwargs to our advantage here...

Hm, you're right. We might be able to use `**kwargs` to our advantage here...
Dniel97 added 1 commit 2023-02-19 21:57:03 +00:00
Collaborator

Hello Dniel,

Since the last issue has been fixed in your commit a7821fade8, the merge will now be done.

Thanks for your contribution!

Hello Dniel, Since the last issue has been fixed in your commit a7821fade8, the merge will now be done. Thanks for your contribution!
Midorica merged commit 026fcc5182 into develop 2023-02-22 23:27:12 +00:00
Dniel97 deleted branch diva_card_procedure 2023-04-10 16:59:58 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hay1tsme/artemis#1
No description provided.