openreview-py icon indicating copy to clipboard operation
openreview-py copied to clipboard

Feature/request name removal

Open melisabok opened this issue 3 years ago • 15 comments

  • Request a name removal posting a note using the invitation: Profile_Name_Removal
  • Support team evaluates the requests and accepts or rejects the request posting a reference with the invitation Profile_Name_Removal_Decision
  • Process function of Profile_Name_Removal_Decision does the following actions:
  1. Check if the name to delete is the profile id then rename it.
  2. Post a reference changing the authorid of all the publications using the invitation Author_Rename
  3. Change the signatures of all the notes when the signature is the name to delete
  4. Rename all the edges where the name to delete is either a head or a tail
  5. Replace the members for all the group when the name to delete is a member
  6. Remove the name to delete from the profile
  7. Remove the name to delete group
  8. Send a confirmation email to the user
  • Add Archive invitation so we can test some publications.

Fixes https://github.com/openreview/openreview-api-v1/issues/1349

melisabok avatar Jul 28 '22 16:07 melisabok

how about edge tail, should it also be replaced

xkopenreview avatar Jul 28 '22 16:07 xkopenreview

how about edge tail, should it also be replaced

Good point! I will add it

UPDATE: done

melisabok avatar Jul 28 '22 16:07 melisabok

i think the preferred id should be stored in the note too otherwise access to user's profile will be lost when the id is deleted

xkopenreview avatar Aug 01 '22 16:08 xkopenreview

What about the signatures of the note? it should always contain a valid profile id, right?

melisabok avatar Aug 01 '22 19:08 melisabok

some profiles has name mapped to multiple tilde ids should it be handled by the process function or have ui to create multiple notes when user request to delete such name

xkopenreview avatar Aug 01 '22 21:08 xkopenreview

some profiles has name mapped to multiple tilde ids should it be handled by the process function or have ui to create multiple notes when user request to delete such name

I thought about this. When someone wants to remove the name "Joe Doe" and there is more than one tilde id mapped to that name: Joe_Doe1, Joe_Doe2, etc.

What about supporting an array of requested usernames?

The concern about this is that the array may contain different names and the moderator needs to approve all of them. We can validate that all the tilde ids correspond to the same name.

melisabok avatar Aug 02 '22 01:08 melisabok

@xkopenreview I made the following changes:

  • Added new field "name" to the Profile Name Removal invitation.
  • Convert field "username" into "usernames" so you can remove all the usernames pointing to the same name.

melisabok avatar Aug 05 '22 21:08 melisabok

If I submit a request for name removal I don’t need to save my profile before the request is sent. If SuperUser then accepts the request before I save the changes to my profile, I get an error when trying to submit the changes: Error: Can not create profile, username is already associated with [preferred id]

nlbahy avatar Aug 15 '22 20:08 nlbahy

Testing on the test data works for me, but when I try to test with real data, accepting a name change request causes this process function error:

"error": { "name": "Error", "message": "AttributeError: 'Note' object has no attribute 'referent'", "status": 500, "stack": "Error: AttributeError: 'Note' object has no attribute 'referent'\n at PythonShell.parseError (/Users/nadia/Code/openreview-api/node_modules/python-shell/index.js:295:21)\n at terminateIfNeeded (/Users/nadia/Code/openreview-api/node_modules/python-shell/index.js:190:32)\n at ChildProcess. (/Users/nadia/Code/openreview-api/node_modules/python-shell/index.js:182:13)\n at ChildProcess.emit (node:events:526:28)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)\n ----- Python Traceback -----\n File "/var/folders/8z/z7dqcjjd1pb_8_9ktghhm2nm0000gn/T/pythonShellFile7577647843.py", line 165, in \n process(client, note, invitation)\n File "/var/folders/8z/z7dqcjjd1pb_8_9ktghhm2nm0000gn/T/pythonShellFile7577647843.py", line 14, in process\n request_note = client.get_note(note.referent)" }

nlbahy avatar Aug 15 '22 20:08 nlbahy

If I submit a request for name removal I don’t need to save my profile before the request is sent. If SuperUser then accepts the request before I save the changes to my profile, I get an error when trying to submit the changes: Error: Can not create profile, username is already associated with [preferred id]

What did you change in the profile that you didn't save?

Testing on the test data works for me, but when I try to test with real data, accepting a name change request causes this process function error:

Can you share the profile id that you are using to test? there must be something wrong when updating the author ids of publications.

melisabok avatar Aug 16 '22 13:08 melisabok

What did you change in the profile that you didn't save?

I submitted the name change request, I didn't change anything in the profile.

Can you share the profile id that you are using to test? there must be something wrong when updating the author ids of publications.

It happened with every profile ID I tried; I tried it on ~Nadia_L'Bahy1 for instance

nlbahy avatar Aug 16 '22 13:08 nlbahy

Codecov Report

Merging #1361 (ac76815) into master (5ca0a9b) will increase coverage by 0.25%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1361      +/-   ##
==========================================
+ Coverage   74.59%   74.85%   +0.25%     
==========================================
  Files          32       34       +2     
  Lines        9830     9865      +35     
  Branches     1801     1802       +1     
==========================================
+ Hits         7333     7384      +51     
+ Misses       2035     2015      -20     
- Partials      462      466       +4     
Impacted Files Coverage Δ
openreview/__init__.py 100.00% <100.00%> (ø)
openreview/api/client.py 62.11% <100.00%> (+0.03%) :arrow_up:
openreview/profile/__init__.py 100.00% <100.00%> (ø)
openreview/profile/management.py 100.00% <100.00%> (ø)
openreview/openreview.py 73.91% <0.00%> (+0.21%) :arrow_up:
openreview/tools.py 64.06% <0.00%> (+0.24%) :arrow_up:
openreview/journal/journal.py 55.86% <0.00%> (+2.38%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 17 '22 18:08 codecov[bot]

@melisabok do you think this fixes https://github.com/openreview/openreview-api-v1/issues/1349?

carlosmondra avatar Aug 18 '22 12:08 carlosmondra

@melisabok do you think this fixes https://github.com/openreview/openreview-api-v1/issues/1349?

Yes! I forgot to unlink it.

melisabok avatar Aug 18 '22 16:08 melisabok

@nlbahy @xkopenreview

"AttributeError: 'Note' object has no attribute 'referent'",

This error is being solved changing the configuration of development.json in the new API. Use another number for the database number:

    "jobQueue" : {
      "db": 1,
      "jobActive": 24
    },

for example: 10.

melisabok avatar Aug 18 '22 16:08 melisabok

One thing I just realized is that the mdate of the submissions are changing. Should we set the pdate in this pr when submissions are updated?

nlbahy avatar Sep 23 '22 19:09 nlbahy

I noticed that clicking the link "View all # publications" on the profile does not work after the name is changed

nlbahy avatar Sep 23 '22 19:09 nlbahy

One thing I just realized is that the mdate of the submissions are changing. Should we set the pdate in this pr when submissions are updated?

I don't think this PR should change the pdate but we should start using pdate in the request form during the post decision stage.

melisabok avatar Sep 23 '22 20:09 melisabok

I noticed that clicking the link "View all # publications" on the profile does not work after the name is changed

Could you share the profile id and which name you removed?

melisabok avatar Sep 26 '22 14:09 melisabok

I noticed that clicking the link "View all # publications" on the profile does not work after the name is changed

Could you share the profile id and which name you removed?

Sorry, I'm not able to reproduce the error. You can ignore my comment!

nlbahy avatar Sep 26 '22 19:09 nlbahy

@carlosmondra @xkopenreview I think this PR is ready to go!

melisabok avatar Sep 26 '22 21:09 melisabok