Skip to content

Commit

Permalink
ARR: Add reviewers submitted to reviewers group (#2319)
Browse files Browse the repository at this point in the history
* Add reviewers submitted to reviewers group

* Await edit

* Use submission

---------

Co-authored-by: carlosmondra <[email protected]>
  • Loading branch information
haroldrubio and carlosmondra authored Sep 27, 2024
1 parent 968db1f commit 337b42d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openreview/arr/management/setup_reassignment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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():
Expand Down
6 changes: 6 additions & 0 deletions tests/test_arr_venue_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 337b42d

Please sign in to comment.