Skip to content

Commit

Permalink
Fix/arr issues (#2173)
Browse files Browse the repository at this point in the history
* use invitations to send messages

* fix start_date instead of date

* add sender

* add checklist count

* email SACs when comments are posted

* fix ARR Pc console

* make field optional so tests can pass

* fix test

* configure edge browser links in the PC console webfield

* keep using enum for custom max papers so they are editable from the edge browser
  • Loading branch information
melisabok authored Jun 3, 2024
1 parent efb4967 commit 5ab41a6
Show file tree
Hide file tree
Showing 16 changed files with 189 additions and 115 deletions.
17 changes: 1 addition & 16 deletions openreview/arr/arr.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,22 +476,7 @@ def send_decision_notifications(self, decision_options, messages):
return self.venue.send_decision_notifications(decision_options, messages)

def setup_committee_matching(self, committee_id=None, compute_affinity_scores=False, compute_conflicts=False, compute_conflicts_n_years=None, alternate_matching_group=None, submission_track=None):
matching_value = self.venue.setup_committee_matching(committee_id, compute_affinity_scores, compute_conflicts, compute_conflicts_n_years, alternate_matching_group, submission_track)
cmp_inv = self.client.get_invitation(self.get_custom_max_papers_id(committee_id))
cmp_inv.edit['weight']['param']['optional'] = True
if 'enum' in cmp_inv.edit['weight']['param']:
del cmp_inv.edit['weight']['param']['enum']
cmp_inv.edit['weight']['param']['minimum'] = 0
cmp_inv.edit['weight']['param']['default'] = 0

self.client.post_invitation_edit(
invitations=self.get_meta_invitation_id(),
readers=[self.venue_id],
writers=[self.venue_id],
signatures=[self.venue_id],
invitation=cmp_inv
)
return matching_value
return self.venue.setup_committee_matching(committee_id, compute_affinity_scores, compute_conflicts, compute_conflicts_n_years, alternate_matching_group, submission_track)

def set_assignments(self, assignment_title, committee_id, enable_reviewer_reassignment=False, overwrite=False):
return self.venue.set_assignments(assignment_title, committee_id, enable_reviewer_reassignment, overwrite)
Expand Down
31 changes: 14 additions & 17 deletions openreview/arr/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
],
'content': comment_v2,
'multi_reply': True,
'notify_readers': False,
'email_sacs': False
'notify_readers': True,
'email_sacs': True
},
start_date=self.configuration_note.content.get('commentary_start_date'),
exp_date=self.configuration_note.content.get('commentary_end_date')
Expand All @@ -791,6 +791,7 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
},
due_date=self.configuration_note.content.get('reviewer_checklist_due_date'),
exp_date=self.configuration_note.content.get('reviewer_checklist_exp_date'),
#start_date=self.venue.submission_stage.exp_date.strftime('%Y/%m/%d %H:%M'), Discuss with Harold
process='process/checklist_process.py',
preprocess='process/checklist_preprocess.py',
extend=ARRWorkflow._extend_reviewer_checklist
Expand All @@ -814,6 +815,7 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
},
due_date=self.configuration_note.content.get('ae_checklist_due_date'),
exp_date=self.configuration_note.content.get('ae_checklist_exp_date'),
#start_date=self.venue.submission_stage.exp_date.strftime('%Y/%m/%d %H:%M'), Discuss with Harold
process='process/checklist_process.py',
preprocess='process/checklist_preprocess.py',
extend=ARRWorkflow._extend_ae_checklist
Expand All @@ -833,6 +835,7 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
'email_sacs': False
},
exp_date=self.configuration_note.content.get('form_expiration_date'),
#start_date=self.venue.submission_stage.exp_date.strftime('%Y/%m/%d %H:%M'), Discuss with Harold
process='process/verification_process.py',
extend=ARRWorkflow._extend_desk_reject_verification
),
Expand Down Expand Up @@ -870,7 +873,9 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
'Assigned Submitted Reviewers'
],
'additional_readers':['Program Chairs'],
'email_program_chairs_about_official_comments': 'No, do not email PCs for each official comment made in the venue'
'email_program_chairs_about_official_comments': 'No, do not email PCs for each official comment made in the venue',
'email_senior_area_chairs_about_official_comments': 'Yes, email SACs for each official comment made in the venue'

},
'forum': request_form_id,
'invitation': '{}/-/Request{}/Comment_Stage'.format(support_user, request_form.number),
Expand Down Expand Up @@ -1006,20 +1011,6 @@ def __init__(self, client_v2, venue, configuration_note, request_form_id, suppor
m = matching.Matching(venue, self.client_v2.get_group(role), None, None)
if not openreview.tools.get_invitation(self.client_v2, venue.get_custom_max_papers_id(role)):
m._create_edge_invitation(venue.get_custom_max_papers_id(m.match_group.id))
cmp_inv = self.client_v2.get_invitation(venue.get_custom_max_papers_id(m.match_group.id))
cmp_inv.edit['weight']['param']['optional'] = True
if 'enum' in cmp_inv.edit['weight']['param']:
del cmp_inv.edit['weight']['param']['enum']
cmp_inv.edit['weight']['param']['minimum'] = 0
cmp_inv.edit['weight']['param']['default'] = 0

self.client_v2.post_invitation_edit(
invitations=venue.get_meta_invitation_id(),
readers=[venue.id],
writers=[venue.id],
signatures=[venue.id],
invitation=cmp_inv
)

if not openreview.tools.get_invitation(self.client_v2, f"{role}/-/Status"): # Hold "Requested" or "Reassigned", head=submission ID
m._create_edge_invitation(f"{role}/-/Status")
Expand Down Expand Up @@ -1434,6 +1425,8 @@ def flag_submission(
domain = client.get_group(edit.domain)
venue_id = domain.id
meta_invitation_id = domain.content['meta_invitation_id']['value']
contact = domain.content['contact']['value']
sender = domain.get_content_value('message_sender')
short_name = domain.get_content_value('subtitle')
forum = client.get_note(id=edit.note.forum, details='replies')

Expand Down Expand Up @@ -1538,6 +1531,10 @@ def check_field_not_violated(note, field):
To view the submission, click here: https://openreview.net/forum?id={}'''.format(forum.number, forum.id)
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
replyTo=contact,
sender=sender,
recipients=[domain.content['ethics_chairs_id']['value']],
ignoreRecipients=[edit.tauthor],
subject=subject,
Expand Down
60 changes: 0 additions & 60 deletions openreview/arr/management/setup_proposed_assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,11 @@ def process(client, invitation):
print('invitation is not yet active and no child invitations created', cdate)
return

from openreview.venue import matching
import random
import string

domain = client.get_group(invitation.domain)
venue_id = domain.id
request_form_id = domain.content['request_form_id']['value']
meta_invitation_id = domain.content['meta_invitation_id']['value']
reviewer_id = domain.content['reviewers_id']['value']
ac_id = domain.content['area_chairs_id']['value']
sac_id = domain.content['senior_area_chairs_id']['value']
pc_id = domain.content['program_chairs_id']['value']
sac_name = domain.content['senior_area_chairs_name']['value']

client_v1 = openreview.Client(
baseurl=openreview.tools.get_base_urls(client)[0],
token=client.token
)

request_form = client_v1.get_note(request_form_id)
# Update webfields
label_to_share = invitation.content['reviewer_assignments_title']['value']

Expand Down Expand Up @@ -84,49 +69,4 @@ def process(client, invitation):
id = ac_id,
web='\n'.join(dst_lines)
)
)

web = client.get_group(pc_id).web
web_lines = web.split('\n')
dst_lines = []
for line in web_lines:
if 'const manualReviewerAssignmentUrl' in line:
browse_line = line.split(' = ')[1].split('&')[-2]
for inv in group_invs:
if f"/-/{inv}" not in browse_line:
browse_line += ';${domain.content.reviewers_id?.value}' + f"/-/{inv},head:ignore"
if '/-/Status' not in web:
browse_line += ';${domain.content.reviewers_id?.value}' + f"/-/Status"
if '/-/Research_Area' not in web:
browse_line += ';${domain.content.reviewers_id?.value}' + f"/-/Research_Area"

after_assignment = line.split(' = ')[1]
param_list = after_assignment.split('&')
param_list[-2] = browse_line
line = line.replace(after_assignment, '&'.join(param_list))
dst_lines.append(line)
elif 'const manualAreaChairAssignmentUrl' in line:
browse_line = line.split(' = ')[1].split('&')[-2]
for inv in group_invs:
if f"/-/{inv}" not in browse_line:
browse_line += ';${domain.content.area_chairs_id?.value}' + f"/-/{inv},head:ignore"
if '/-/Status' not in web:
browse_line += ';${domain.content.area_chairs_id?.value}' + f"/-/Status"
if '/-/Research_Area' not in web:
browse_line += ';${domain.content.area_chairs_id?.value}' + f"/-/Research_Area"
after_assignment = line.split(' = ')[1]
param_list = after_assignment.split('&')
param_list[-2] = browse_line
line = line.replace(after_assignment, '&'.join(param_list))
dst_lines.append(line)
else:
dst_lines.append(line)
client.post_group_edit(invitation=meta_invitation_id,
readers = [venue_id],
writers = [venue_id],
signatures = [venue_id],
group = openreview.api.Group(
id = pc_id,
web='\n'.join(dst_lines)
)
)
20 changes: 20 additions & 0 deletions openreview/arr/process/review_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def process(client, edit, invitation):
meta_invitation_id = domain.content['meta_invitation_id']['value']
short_name = domain.get_content_value('subtitle')
contact = domain.get_content_value('contact')
sender = domain.get_content_value('message_sender')
authors_name = domain.get_content_value('authors_name')
submission_name = domain.get_content_value('submission_name')
reviewers_name = domain.get_content_value('reviewers_name')
Expand Down Expand Up @@ -77,6 +78,10 @@ def create_group(group_id, members=[]):

if domain.get_content_value('review_email_pcs'):
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
replyTo=contact,
sender=sender,
recipients=[domain.get_content_value('program_chairs_id')],
ignoreRecipients=ignore_groups,
subject=f'''[{short_name}] A {review_name} has been received on Paper number: {submission.number}, Paper title: "{submission.content['title']['value']}"''',
Expand All @@ -87,8 +92,11 @@ def create_group(group_id, members=[]):
)

client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
recipients=review.signatures,
replyTo=contact,
sender=sender,
subject=f'''[{short_name}] Your {review_name} has been received on your assigned Paper number: {submission.number}, Paper title: "{submission.content['title']['value']}"''',
message=f''''We have received a review on a submission to {short_name}.
Expand All @@ -101,6 +109,9 @@ def create_group(group_id, members=[]):

if area_chairs_name and ('everyone' in review.readers or paper_area_chairs_id in review.readers):
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
sender=sender,
recipients=[paper_area_chairs_id],
ignoreRecipients=ignore_groups,
replyTo=contact,
Expand All @@ -118,6 +129,9 @@ def create_group(group_id, members=[]):
create_group(paper_reviewers_submitted_id, [review.signatures[0]])
if 'everyone' in review.readers or paper_reviewers_id in review.readers:
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
sender=sender,
recipients=[paper_reviewers_id],
ignoreRecipients=ignore_groups,
replyTo=contact,
Expand All @@ -133,6 +147,9 @@ def create_group(group_id, members=[]):
)
elif paper_reviewers_submitted_id in review.readers:
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
sender=sender,
recipients=[paper_reviewers_submitted_id],
ignoreRecipients=ignore_groups,
replyTo=contact,
Expand All @@ -150,6 +167,9 @@ def create_group(group_id, members=[]):
paper_authors_id = f'{paper_group_id}/{authors_name}'
if 'everyone' in review.readers or paper_authors_id in review.readers:
client.post_message(
invitation=meta_invitation_id,
signature=venue_id,
sender=sender,
recipients=[paper_authors_id],
ignoreRecipients=ignore_groups,
replyTo=contact,
Expand Down
75 changes: 69 additions & 6 deletions openreview/arr/webfield/programChairsWebfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,61 @@
// loaded properly
const automaticAssignment = domain.content.automatic_reviewer_assignment?.value
const assignmentUrls = {}
const areaChairsId = domain.content.area_chairs_id?.value
const reviewersId = domain.content.reviewers_id?.value

const manualReviewerAssignmentUrl = `/edges/browse?traverse=${domain.content.reviewers_assignment_id?.value}&edit=${domain.content.reviewers_assignment_id?.value};${domain.content.reviewers_custom_max_papers_id?.value},tail:ignore&browse=${domain.content.reviewers_affinity_score_id?.value};${domain.content.reviewers_conflict_id?.value}&version=2`
const browseInvitations = [
domain.content.reviewers_affinity_score_id?.value,
domain.content.reviewers_conflict_id?.value,
`${reviewersId}/-/Research_Area`,
`${reviewersId}/-/Status`,
].join(';')

const headBrowseInvitations = [
`${reviewersId}/-/Registered_Load`,
`${reviewersId}/-/Emergency_Load`,
`${reviewersId}/-/Emergency_Area`,
`${reviewersId}/-/Reviewing_Resubmissions`,
`${reviewersId}/-/Author_In_Current_Cycle`,
`${reviewersId}/-/Seniority`,
].map(invitationId => `${invitationId},head:ignore`).join(';')

const allBrowseInvitations = [
browseInvitations,
headBrowseInvitations,
].join(';')

const manualReviewerAssignmentUrl = `/edges/browse?traverse=${domain.content.reviewers_assignment_id?.value}&edit=${domain.content.reviewers_assignment_id?.value};${domain.content.reviewers_custom_max_papers_id?.value},head:ignore&browse=${allBrowseInvitations}&version=2`
assignmentUrls[domain.content.reviewers_name?.value] = {
manualAssignmentUrl: manualReviewerAssignmentUrl,
automaticAssignment: automaticAssignment
}

const areaChairName = domain.content.area_chairs_name?.value
if (areaChairName) {
const manualAreaChairAssignmentUrl = `/edges/browse?traverse=${domain.content.area_chairs_assignment_id?.value}&edit=${domain.content.area_chairs_assignment_id?.value};${domain.content.area_chairs_custom_max_papers_id?.value},tail:ignore&browse=${domain.content.area_chairs_affinity_score_id?.value};${domain.content.area_chairs_conflict_id?.value}&version=2`

const browseInvitations = [
domain.content.area_chairs_affinity_score_id?.value,
domain.content.area_chairs_conflict_id?.value,
`${areaChairsId}/-/Research_Area`,
`${areaChairsId}/-/Status`,
].join(';')

const headBrowseInvitations = [
`${areaChairsId}/-/Registered_Load`,
`${areaChairsId}/-/Emergency_Load`,
`${areaChairsId}/-/Emergency_Area`,
`${areaChairsId}/-/Reviewing_Resubmissions`,
`${areaChairsId}/-/Author_In_Current_Cycle`,
`${areaChairsId}/-/Seniority`,
].map(invitationId => `${invitationId},head:ignore`).join(';')

const allBrowseInvitations = [
browseInvitations,
headBrowseInvitations,
].join(';')

const manualAreaChairAssignmentUrl = `/edges/browse?traverse=${domain.content.area_chairs_assignment_id?.value}&edit=${domain.content.area_chairs_assignment_id?.value};${domain.content.area_chairs_custom_max_papers_id?.value},head:ignore&browse=${allBrowseInvitations}&version=2`
assignmentUrls[areaChairName] = {
manualAssignmentUrl: manualAreaChairAssignmentUrl,
automaticAssignment: automaticAssignment
Expand All @@ -27,9 +72,9 @@ return {
instructions: `This page provides information and status updates for the ${domain.content.subtitle?.value}. It will be regularly updated as the conference progresses, so please check back frequently.`
},
venueId: domain.id,
areaChairsId: domain.content.area_chairs_id?.value,
areaChairsId: areaChairsId,
seniorAreaChairsId: domain.content.senior_area_chairs_id?.value,
reviewersId: domain.content.reviewers_id?.value,
reviewersId: reviewersId,
programChairsId: domain.content.program_chairs_id?.value,
authorsId: domain.content.authors_id?.value,
paperReviewsCompleteThreshold: 3,
Expand Down Expand Up @@ -80,6 +125,24 @@ return {
'author_identity_guess': [5]
}
}
]
],
propertiesAllowed: {
reviewerChecklistCount: `
const invitationToCheck="Reviewer_Checklist";
const checklistReplies = row.note?.details?.replies.filter(reply => {
const hasReply = reply.invitations.some(invitation => invitation.includes(invitationToCheck));
return hasReply;
})
return checklistReplies?.length??0;
`,
actionEditorChecklistCount: `
const invitationToCheck="Action_Editor_Checklist";
const checklistReplies = row.note?.details?.replies.filter(reply => {
const hasReply = reply.invitations.some(invitation => invitation.includes(invitationToCheck));
return hasReply;
})
return checklistReplies?.length??0;
`
}
}
}
}
2 changes: 2 additions & 0 deletions openreview/conference/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ def get_comment_stage(request_forum):
readers.append(openreview.stages.CommentStage.Readers.EVERYONE)

email_pcs = request_forum.content.get('email_program_chairs_about_official_comments', '') == 'Yes, email PCs for each official comment made in the venue'
email_sacs = request_forum.content.get('email_senior_area_chairs_about_official_comments', '') == 'Yes, email SACs for each official comment made in the venue'

enable_chat = request_forum.content.get('enable_chat_between_committee_members', '') == 'Yes, enable chat between committee members'

Expand All @@ -937,6 +938,7 @@ def get_comment_stage(request_forum):
anonymous=anonymous,
reader_selection=True,
email_pcs=email_pcs,
email_sacs=email_sacs,
check_mandatory_readers=True,
readers=readers,
invitees=invitees,
Expand Down
2 changes: 2 additions & 0 deletions openreview/stages/venue_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ def __init__(self,
anonymous=False,
reader_selection=False,
email_pcs=False,
email_sacs = False,
only_accepted=False,
check_mandatory_readers=False,
readers=[],
Expand All @@ -972,6 +973,7 @@ def __init__(self,
self.anonymous = anonymous
self.reader_selection = reader_selection
self.email_pcs = email_pcs
self.email_sacs = email_sacs
self.only_accepted=only_accepted
self.check_mandatory_readers=check_mandatory_readers
self.readers = readers
Expand Down
Loading

0 comments on commit 5ab41a6

Please sign in to comment.