From 337b42dc254b8b19a618bbee4ce9c53ec2fbca80 Mon Sep 17 00:00:00 2001 From: Harold Rubio <43583679+haroldrubio@users.noreply.github.com> Date: Fri, 27 Sep 2024 12:57:21 -0400 Subject: [PATCH] ARR: Add reviewers submitted to reviewers group (#2319) * Add reviewers submitted to reviewers group * Await edit * Use submission --------- Co-authored-by: carlosmondra --- openreview/arr/management/setup_reassignment_data.py | 3 +++ tests/test_arr_venue_v2.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/openreview/arr/management/setup_reassignment_data.py b/openreview/arr/management/setup_reassignment_data.py index 033c3d9a7..ea29a1bc0 100644 --- a/openreview/arr/management/setup_reassignment_data.py +++ b/openreview/arr/management/setup_reassignment_data.py @@ -212,12 +212,14 @@ def replace_edge(existing_edge=None, edge_inv=None, new_weight=None, submission_ try: previous_submission = client_v1.get_note(previous_id) previous_venue_id = previous_submission.invitation.split('/-/')[0] + previous_parent_reviewers = client_v1.get_group(f"{previous_venue_id}/Paper{previous_submission.number}/Reviewers") previous_reviewers = client_v1.get_group(f"{previous_venue_id}/Paper{previous_submission.number}/Reviewers/Submitted") previous_ae = client_v1.get_group(f"{previous_venue_id}/Paper{previous_submission.number}/Area_Chairs") # NOTE: May be problematic when we switch to Action_Editors current_client = client_v1 except: previous_submission = client.get_note(previous_id) previous_venue_id = previous_submission.domain + previous_parent_reviewers = client.get_group(f"{previous_venue_id}/Submission{previous_submission.number}/Reviewers") previous_reviewers = client.get_group(f"{previous_venue_id}/Submission{previous_submission.number}/Reviewers/Submitted") previous_ae = client.get_group(f"{previous_venue_id}/Submission{previous_submission.number}/Area_Chairs") # NOTE: May be problematic when we switch to Action_Editors current_client = client @@ -366,6 +368,7 @@ def replace_edge(existing_edge=None, edge_inv=None, new_weight=None, submission_ current_client.add_members_to_group(previous_ae, venue.get_area_chairs_id(number=submission.number)) if venue.get_reviewers_id(number=submission.number, submitted=True) not in previous_reviewers.members: current_client.add_members_to_group(previous_reviewers, venue.get_reviewers_id(number=submission.number, submitted=True)) + current_client.add_members_to_group(previous_parent_reviewers, venue.get_reviewers_id(number=submission.number, submitted=True)) # 3) Post track edges for role_id, track_to_members in track_to_ids.items(): diff --git a/tests/test_arr_venue_v2.py b/tests/test_arr_venue_v2.py index dc68771f0..16d4f7f84 100644 --- a/tests/test_arr_venue_v2.py +++ b/tests/test_arr_venue_v2.py @@ -2972,6 +2972,12 @@ def test_resubmission_and_track_matching_data(self, client, openreview_client, h ) helpers.await_queue_edit(openreview_client, 'aclweb.org/ACL/ARR/2023/August/-/Setup_Tracks_And_Reassignments-0-1', count=1) + # Check reviewers groups + assert 'aclweb.org/ACL/ARR/2023/August/Submission2/Reviewers/Submitted' in openreview_client.get_group('aclweb.org/ACL/ARR/2023/June/Submission2/Reviewers').members + assert 'aclweb.org/ACL/ARR/2023/August/Submission2/Reviewers/Submitted' in openreview_client.get_group('aclweb.org/ACL/ARR/2023/June/Submission2/Reviewers/Submitted').members + assert 'aclweb.org/ACL/ARR/2023/August/Submission3/Reviewers/Submitted' in openreview_client.get_group('aclweb.org/ACL/ARR/2023/June/Submission3/Reviewers').members + assert 'aclweb.org/ACL/ARR/2023/August/Submission3/Reviewers/Submitted' in openreview_client.get_group('aclweb.org/ACL/ARR/2023/June/Submission3/Reviewers/Submitted').members + # For 1, assert that the affinity scores on June reviewers/aes is 3 ac_scores = { g['id']['tail'] : g['values'][0]