Skip to content

Commit

Permalink
add replysignatures as invitation signature (#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
celestemartinez authored Jun 27, 2024
1 parent 2458d85 commit 390a47d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions openreview/venue/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2682,6 +2682,7 @@ def set_custom_stage_invitation(self):
custom_stage_source = custom_stage.get_source_submissions()
custom_stage_reply_type = custom_stage.get_reply_type()
note_writers = None
all_signatures = custom_stage.get_signatures(self.venue, '${7/content/noteNumber/value}')

if custom_stage_reply_type == 'reply':
paper_invitation_id = self.venue.get_invitation_id(name=custom_stage.name, number='${2/content/noteNumber/value}')
Expand Down Expand Up @@ -2732,9 +2733,10 @@ def set_custom_stage_invitation(self):
reply_to = None
edit_readers = [venue_id, '${2/signatures}']
note_readers = None
invitees = ['${3/content/replytoSignatures/value}']
invitees = [venue_id, '${3/content/replytoSignatures/value}']
noninvitees = []
note_nonreaders = []
all_signatures = ['${7/content/replytoSignatures/value}']

invitation_content = {
'source': { 'value': custom_stage_source },
Expand Down Expand Up @@ -2800,7 +2802,7 @@ def set_custom_stage_invitation(self):
'edit': {
'signatures': {
'param': {
'items': [ { 'prefix': s, 'optional': True } if '.*' in s else { 'value': s, 'optional': True } for s in custom_stage.get_signatures(self.venue, '${7/content/noteNumber/value}')]
'items': [ { 'prefix': s, 'optional': True } if '.*' in s else { 'value': s, 'optional': True } for s in all_signatures]
}
},
'readers': edit_readers,
Expand Down
12 changes: 9 additions & 3 deletions tests/test_venue_request_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,8 +1884,15 @@ def test_review_revision(self, client, helpers, venue, openreview_client):
anon_group_id = anon_groups[0].id

invitation = openreview_client.get_invitation('V2.cc/2030/Conference/Submission1/Official_Review1/-/Review_Revision')
assert invitation and anon_group_id in invitation.invitees
assert invitation and invitation.invitees == ['V2.cc/2030/Conference', anon_group_id]
assert 'readers' in invitation.edit['note']['content']['final_review_rating']
assert invitation.edit['signatures']['param']['items'][0] == {
'value': anon_group_id,
'optional': True
}

helpers.create_user('tom_venue@mail.com', 'ProgramChair', 'Venue')
pc_client = openreview.api.OpenReviewClient(username='tom_venue@mail.com', password=helpers.strong_password)

review = reviewer_client.get_notes(invitation='V2.cc/2030/Conference/Submission1/-/Official_Review', sort='number:asc')[0]
assert review.readers == ['V2.cc/2030/Conference/Program_Chairs',
Expand All @@ -1898,7 +1905,7 @@ def test_review_revision(self, client, helpers, venue, openreview_client):
assert invitation.edit['note']['forum'] == review.forum
assert invitation.edit['note']['id'] == review.id

review_revision = reviewer_client.post_note_edit(
review_revision = pc_client.post_note_edit(
invitation='V2.cc/2030/Conference/Submission1/Official_Review1/-/Review_Revision',
signatures=[anon_group_id],
note=Note(
Expand Down Expand Up @@ -2562,7 +2569,6 @@ def test_venue_decision_stage(self, client, test_client, selenium, request_page,
assert submissions and len(submissions) == 3
submission = submissions[0]

helpers.create_user('tom_venue@mail.com', 'ProgramChair', 'Venue')
pc_client = openreview.api.OpenReviewClient(username='tom_venue@mail.com', password=helpers.strong_password)

# Assert that PC does not have access to the Decision invitation
Expand Down

0 comments on commit 390a47d

Please sign in to comment.