Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions tests/test_icml_conference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3351,6 +3351,147 @@ def test_review_rating(self, client, openreview_client, helpers):
invitation = openreview_client.get_invitation('ICML.cc/2023/Conference/Submission6/Official_Review1/-/Rating')
assert invitation.ddate == None

def test_review_revision_multiple_forms(self, client, openreview_client, helpers):
pc_client = openreview.Client(username='pc@icml.cc', password=helpers.strong_password)
request_form = pc_client.get_notes(invitation='openreview.net/Support/-/Request_Form')[0]
venue = openreview.get_conference(client, request_form.id, support_user='openreview.net/Support')

now = datetime.datetime.now()
due_date = now + datetime.timedelta(days=3)

# Create revision for position paper reviews
venue.custom_stage = openreview.stages.CustomStage(
name='Position_Paper_Review_Revision',
reply_to='Official_Review',
child_invitations_name='Review_Revision',
source={'venueid': venue.get_submission_venue_id(), 'content': {'position_paper_track': 'Yes'}},
reply_type=openreview.stages.CustomStage.ReplyType.REVISION,
due_date=due_date,
exp_date=due_date + datetime.timedelta(days=1),
invitees=[openreview.stages.CustomStage.Participants.REVIEWERS_ASSIGNED],
content={
'final_rating': {
'order': 1,
'description': 'Position Paper Review final rating',
'value': {
'param': {
'type': 'integer',
'input': 'radio',
'enum': [
{'value': 10, 'description': '10: Top 5% of accepted papers, seminal paper'},
{'value': 9, 'description': '9: Top 15% of accepted papers, strong accept'},
{'value': 8, 'description': '8: Top 50% of accepted papers, clear accept'},
{'value': 7, 'description': '7: Good paper, accept'},
{'value': 6, 'description': '6: Marginally above acceptance threshold'},
{'value': 5, 'description': '5: Marginally below acceptance threshold'},
{'value': 4, 'description': '4: Ok but not good enough - rejection'},
{'value': 3, 'description': '3: Clear rejection'},
{'value': 2, 'description': '2: Strong rejection'},
{'value': 1, 'description': '1: Trivial or wrong'},
]
}
}
}
}
)
venue.create_custom_stage()
helpers.await_queue_edit(openreview_client, 'ICML.cc/2023/Conference/-/Position_Paper_Review_Revision-0-1', count=1)

position_review_revision_invs = openreview_client.get_invitations(invitation='ICML.cc/2023/Conference/-/Position_Paper_Review_Revision')
assert len(position_review_revision_invs) == 2

# Create revision for non-position paper reviews
venue.custom_stage = openreview.stages.CustomStage(
name='Official_Review_Revision',
reply_to='Official_Review',
child_invitations_name='Review_Revision',
source={'venueid': venue.get_submission_venue_id(), 'content': {'position_paper_track': 'No'}},
reply_type=openreview.stages.CustomStage.ReplyType.REVISION,
due_date=due_date,
exp_date=due_date + datetime.timedelta(days=1),
invitees=[openreview.stages.CustomStage.Participants.REVIEWERS_ASSIGNED],
content={
'final_rating': {
'order': 1,
'description': 'Official Review final rating',
'value': {
'param': {
'type': 'string',
'input': 'radio',
'enum': [
'1: Strong rejection',
'2: Marginally below acceptance threshold',
'3: Top 15% of accepted papers, strong accept',
]
}
}
}
}
)
venue.create_custom_stage()
helpers.await_queue_edit(openreview_client, 'ICML.cc/2023/Conference/-/Official_Review_Revision-0-1', count=1)

official_review_revision_invs = openreview_client.get_invitations(invitation='ICML.cc/2023/Conference/-/Official_Review_Revision')
assert len(official_review_revision_invs) == 3

official_review_revision_sub1_inv = openreview_client.get_invitation('ICML.cc/2023/Conference/Submission1/Official_Review1/-/Review_Revision')
assert official_review_revision_sub1_inv.edit['note']['content']['final_rating']['value']['param']['type'] == 'string'
assert len(official_review_revision_sub1_inv.edit['note']['content']['final_rating']['value']['param']['enum']) == 3

# Check that review revision inv for position paper was not overwritten
position_review_revision_sub2_inv = openreview_client.get_invitation('ICML.cc/2023/Conference/Submission2/Official_Review1/-/Review_Revision')
assert position_review_revision_sub2_inv.edit['note']['content']['final_rating']['value']['param']['type'] == 'integer'
assert len(position_review_revision_sub2_inv.edit['note']['content']['final_rating']['value']['param']['enum']) == 10

# Confirm the 5 reviews are cleanly split (no overlaps)
position_review_inv_ids = {inv.id for inv in position_review_revision_invs}
official_review_inv_ids = {inv.id for inv in official_review_revision_invs}

assert 'ICML.cc/2023/Conference/Submission2/Official_Review1/-/Review_Revision' not in official_review_inv_ids
assert 'ICML.cc/2023/Conference/Submission6/Official_Review1/-/Review_Revision' not in official_review_inv_ids
assert 'ICML.cc/2023/Conference/Submission1/Official_Review1/-/Review_Revision' not in position_review_inv_ids
assert 'ICML.cc/2023/Conference/Submission1/Official_Review2/-/Review_Revision' not in position_review_inv_ids
assert 'ICML.cc/2023/Conference/Submission3/Official_Review1/-/Review_Revision' not in position_review_inv_ids

# Post an Official_Review revision
reviewer_client = openreview.api.OpenReviewClient(username='reviewer1@icml.cc', password=helpers.strong_password)
sub1_anon_groups = reviewer_client.get_groups(prefix='ICML.cc/2023/Conference/Submission1/Reviewer_', signatory='~Reviewer_ICMLOne1')
sub1_anon_group_id = sub1_anon_groups[0].id

Comment thread
enrubio marked this conversation as resolved.
Outdated
official_review = openreview_client.get_notes(invitation='ICML.cc/2023/Conference/Submission1/-/Official_Review', sort='number:asc')[0] # reviewer1's review

official_revision_edit = reviewer_client.post_note_edit(
invitation='ICML.cc/2023/Conference/Submission1/Official_Review1/-/Review_Revision',
signatures=[sub1_anon_group_id],
note=openreview.api.Note(
id=official_review.id,
content={'final_rating': {'value': '3: Top 15% of accepted papers, strong accept'}}
)
)
helpers.await_queue_edit(openreview_client, edit_id=official_revision_edit['id'])

updated_official_review = openreview_client.get_note(official_review.id)
assert updated_official_review.content['final_rating']['value'] == '3: Top 15% of accepted papers, strong accept'

# Post a Position_Paper_Review revision
sub2_anon_groups = reviewer_client.get_groups(prefix='ICML.cc/2023/Conference/Submission2/Reviewer_', signatory='~Reviewer_ICMLOne1')
sub2_anon_group_id = sub2_anon_groups[0].id

Comment thread
enrubio marked this conversation as resolved.
Outdated
position_review = openreview_client.get_notes(invitation='ICML.cc/2023/Conference/Submission2/-/Official_Review', sort='number:asc')[0] # reviewer1's review

position_revision_edit = reviewer_client.post_note_edit(
invitation='ICML.cc/2023/Conference/Submission2/Official_Review1/-/Review_Revision',
signatures=[sub2_anon_group_id],
note=openreview.api.Note(
id=position_review.id,
content={'final_rating': {'value': 7}}
)
)
helpers.await_queue_edit(openreview_client, edit_id=position_revision_edit['id'])

updated_position_review = openreview_client.get_note(position_review.id)
assert updated_position_review.content['final_rating']['value'] == 7

def test_delete_assignments(self, openreview_client, helpers):

ac_client = openreview.api.OpenReviewClient(username='ac2@icml.cc', password=helpers.strong_password)
Expand Down Expand Up @@ -4476,6 +4617,9 @@ def test_rebuttal_stage(self, client, openreview_client, helpers):
]
edits = openreview_client.get_note_edits(note_id=reviews[0].id)
for edit in edits:
# Review revision edits don't contain edit.note.readers
if edit.invitation.endswith('/-/Review_Revision'):
continue
assert edit.readers == edit.note.readers
assert '${2/note/readers}' not in edit.readers

Expand Down