Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test using different characters in role names #2367

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def process(client, edit, invitation):
message =f'''Hi {{{{fullname}}}},
The {committee_name} {preferred_name} that you invited to review paper {submission.number} has accepted the invitation.

Confirmation of the assignment is pending until the invited reviewer creates a profile in OpenReview and no conflicts of interest are detected.
Confirmation of the assignment is pending until the invited {committee_name.lower()} creates a profile in OpenReview and no conflicts of interest are detected.

OpenReview Team'''

Expand Down
2 changes: 1 addition & 1 deletion openreview/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ def pretty_id(group_id):
transformed_token=re.sub('\..+', '', token).replace('-', '').replace('_', ' ')
letters_only=re.sub('\d|\W', '', transformed_token)

if letters_only != transformed_token.lower():
if not (letters_only == letters_only.lower() and letters_only != letters_only.upper()):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar change as in openreview/openreview-web#2115

transformed_tokens.append(transformed_token)


Expand Down
1 change: 1 addition & 0 deletions openreview/venue/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ def set_meta_review_invitation(self):
if self.venue.use_senior_area_chairs:
# Build SAC acronym
sac_acronym = ''.join([s[0].upper() for s in self.venue.senior_area_chairs_name.split('_')])
sac_acronym = sac_acronym if sac_acronym.isascii() else 'SAC'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think sometimes acronym may not be meaningful


meta_review_sac_edit_invitation_id = self.venue.get_invitation_id(meta_review_stage.name + f'_{sac_acronym}_Revision')
invitation = Invitation(id=meta_review_sac_edit_invitation_id,
Expand Down
3 changes: 2 additions & 1 deletion openreview/venue/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,8 @@ def setup_invite_assignment(self, hash_seed, assignment_title=None, due_date=Non
'hash_seed': { 'value': hash_seed, 'readers': [ venue.venue_id ]},
'email_template': { 'value': email_template if email_template else ''},
'is_reviewer': { 'value': True if (self.match_group.id.split('/')[-1] in venue.reviewer_roles) else False },
'is_ethics_reviewer': { 'value': True if self.match_group.id == venue.get_ethics_reviewers_id() else False }
'is_ethics_reviewer': { 'value': True if self.match_group.id == venue.get_ethics_reviewers_id() else False },
'reviewer_name': { 'value': venue.get_reviewers_name(pretty=False) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save in content so venue.py can use it in ln1423

}

# set invite assignment invitation
Expand Down
2 changes: 1 addition & 1 deletion openreview/venue/process/comment_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def process(client, edit, invitation):
recipients=[paper_senior_area_chairs_id],
ignoreRecipients = ignore_groups,
subject=f'''[{short_name}] {pretty_signature} commented on a paper in your area. Paper Number: {submission.number}, Paper Title: "{submission.content['title']['value']}"''',
message=f'''{pretty_signature} commented on a paper for which you are serving as Senior Area Chair.{content}''',
message=f'''{pretty_signature} commented on a paper for which you are serving as {senior_area_chairs_name}.{content}''',
replyTo=contact,
signature=venue_id,
sender=sender
Expand Down
8 changes: 4 additions & 4 deletions openreview/venue/process/custom_stage_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def process(client, edit, invitation):
ignoreRecipients = ignore_groups,
replyTo=contact,
subject=f'''[{short_name}] {before_invitation} {invitation_name} has been received on your assigned Paper Number: {submission.number}, Paper Title: "{submission.content['title']['value']}"''',
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as Senior Area Chair.
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as {openreview.tools.pretty_id(senior_area_chairs_name)}.

{content}
''' if not email_template else email_template
Expand All @@ -104,7 +104,7 @@ def process(client, edit, invitation):
ignoreRecipients = ignore_groups,
replyTo=contact,
subject=f'''[{short_name}] {before_invitation} {invitation_name} has been received on your assigned Paper Number: {submission.number}, Paper Title: "{submission.content['title']['value']}"''',
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are an official area chair.
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are an {openreview.tools.pretty_id(area_chairs_name)}.

{content}
''' if not email_template else email_template
Expand All @@ -124,7 +124,7 @@ def process(client, edit, invitation):
ignoreRecipients=ignore_groups,
replyTo=contact,
subject=f'''[{short_name}] {before_invitation} {invitation_name} has been received on your assigned Paper Number: {submission.number}, Paper Title: "{submission.content['title']['value']}"''',
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as reviewer.
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as {openreview.tools.pretty_id(reviewers_name)}.

{content}
''' if not email_template else email_template
Expand All @@ -138,7 +138,7 @@ def process(client, edit, invitation):
ignoreRecipients=ignore_groups,
replyTo=contact,
subject=f'''[{short_name}] {before_invitation} {invitation_name} has been received on your assigned Paper Number: {submission.number}, Paper Title: "{submission.content['title']['value']}"''',
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as reviewer.
message=f'''We have received {before_invitation.lower()} {invitation_name} on a submission to {short_name} for which you are serving as {openreview.tools.pretty_id(reviewers_name)}.

{content}
''' if not email_template else email_template
Expand Down
2 changes: 1 addition & 1 deletion openreview/venue/process/paper_recruitment_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def process(client, edit, invitation):
message =f'''Hi {{{{fullname}}}},
The {committee_name} {preferred_name} that you invited to review paper {submission.number} has accepted the invitation.

Confirmation of the assignment is pending until the invited reviewer creates a profile in OpenReview and no conflicts of interest are detected.
Confirmation of the assignment is pending until the invited {committee_name.lower()} creates a profile in OpenReview and no conflicts of interest are detected.

OpenReview Team'''

Expand Down
4 changes: 2 additions & 2 deletions openreview/venue/process/proposed_assignment_pre_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ async function process(client, edge, invitation) {
const committeeName = invitation.content.committee_name?.value;
const { groups } = await client.getGroups({ id: invitation.domain });
const domain = groups[0];
const quota = domain.content?.['submission_assignment_max_' + committeeName.toLowerCase()]?.value
const quota = domain.content?.['submission_assignment_max_reviewers']?.value

const customMaxPapersId = domain.content[committeeName.toLowerCase() + '_custom_max_papers_id']?.value;
const customMaxPapersId = domain.content['reviewers_custom_max_papers_id']?.value;

if (edge.ddate) {
return
Expand Down
4 changes: 2 additions & 2 deletions openreview/venue/venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ def mark_as_conflict(venue_group, edge, submission, user_profile):
response = client.post_message(subject, [edge.tail], message, invitation=venue_group.content['meta_invitation_id']['value'], signature=venue_group.id, replyTo=venue_group.content['contact']['value'], sender=venue_group.content['message_sender']['value'])

## Send email to inviter
subject=f"[{venue_group.content['subtitle']['value']}] Conflict detected between reviewer {user_profile.get_preferred_name(pretty=True)} and paper {submission.number}"
subject=f"[{venue_group.content['subtitle']['value']}] Conflict detected between {venue_group.content['reviewers_name']['value'].lower()} {user_profile.get_preferred_name(pretty=True)} and paper {submission.number}"
message =f'''Hi {{{{fullname}}}},
A conflict was detected between {user_profile.get_preferred_name(pretty=True)} and the paper {submission.number} and the assignment can not be done.

Expand All @@ -1420,7 +1420,7 @@ def mark_as_accepted(venue_group, edge, submission, user_profile, invite_assignm
committee_invited_id = invite_assignment_invitation.content.get('committee_invited_id', {}).get('value')
paper_reviewer_invited_id = invite_assignment_invitation.content.get('paper_reviewer_invited_id', {}).get('value')
reviewers_id = invite_assignment_invitation.content.get('match_group', {}).get('value')
reviewer_name = 'Reviewer' ## add this to the invitation?
reviewer_name = invite_assignment_invitation.content.get('reviewer_name', {}).get('value')

assignment_edges = client.get_edges(invitation=assignment_invitation_id, head=submission.id, tail=edge.tail, label=assigment_label)

Expand Down
Loading