-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/recruitment-email-templates (#1336)
* don't send email if user is posting comment and add missing the * increase version
- Loading branch information
1 parent
571d01e
commit 901f46d
Showing
4 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ def process_update(client, note, invitation, existing_note): | |
|
||
note = client.get_note(note.id) | ||
|
||
if note.ddate: | ||
if note.ddate or 'message' in note.content: | ||
return | ||
|
||
user = urllib.parse.unquote(note.content['user']) | ||
|
@@ -49,7 +49,7 @@ def process_update(client, note, invitation, existing_note): | |
The {SHORT_PHRASE} program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add [email protected] to your email contacts to ensure that you receive all communications. | ||
If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.''' | ||
If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.''' | ||
|
||
client.post_message(subject, [user], message, parentGroup=REVIEWERS_ACCEPTED_ID) | ||
return | ||
|
@@ -61,7 +61,7 @@ def process_update(client, note, invitation, existing_note): | |
subject = f'[{SHORT_PHRASE}] {REVIEWER_NAME} Invitation declined' | ||
message = f'''You have declined the invitation to become a {REVIEWER_NAME} for {SHORT_PHRASE}. | ||
If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.''' | ||
If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.''' | ||
|
||
client.post_message(subject, [user], message, parentGroup=REVIEWERS_DECLINED_ID) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,7 +163,7 @@ def test_recruit_senior_area_chairs(self, client, selenium, request_page, helper | |
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '''<p>Thank you for accepting the invitation to be a Senior Area Chair for NeurIPS 2021.</p> | ||
<p>The NeurIPS 2021 program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add <a href=\"mailto:[email protected]\">[email protected]</a> to your email contacts to ensure that you receive all communications.</p> | ||
<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p> | ||
<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p> | ||
''' | ||
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Invitation to serve as Senior Area Chair') | ||
|
@@ -269,7 +269,7 @@ def test_recruit_area_chairs(self, client, selenium, request_page, helpers): | |
assert messages[0]['content']['text'] == '''<p>Thank you for accepting the invitation to be a Area Chair for NeurIPS 2021.<br> | ||
You have selected a reduced load of 3 submissions to review.</p> | ||
<p>The NeurIPS 2021 program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add <a href=\"mailto:[email protected]\">[email protected]</a> to your email contacts to ensure that you receive all communications.</p> | ||
<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p> | ||
<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p> | ||
''' | ||
|
||
|
||
|
@@ -501,7 +501,7 @@ def test_recruit_reviewers(self, client, selenium, request_page, helpers): | |
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation declined') | ||
assert messages | ||
assert len(messages) | ||
assert messages[0]['content']['text'] == '<p>You have declined the invitation to become a Reviewer for NeurIPS 2021.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.</p>\n' | ||
assert messages[0]['content']['text'] == '<p>You have declined the invitation to become a Reviewer for NeurIPS 2021.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.</p>\n' | ||
|
||
notes = client.get_notes(invitation='NeurIPS.cc/2021/Conference/Reviewers/-/Recruitment', content={'user': '[email protected]'}) | ||
assert notes | ||
|
@@ -532,7 +532,7 @@ def test_recruit_reviewers(self, client, selenium, request_page, helpers): | |
assert messages[0]['content']['text'] == '''<p>Thank you for accepting the invitation to be a Reviewer for NeurIPS 2021.<br> | ||
You have selected a reduced load of 4 submissions to review.</p> | ||
<p>The NeurIPS 2021 program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add <a href=\"mailto:[email protected]\">[email protected]</a> to your email contacts to ensure that you receive all communications.</p> | ||
<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p> | ||
<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p> | ||
''' | ||
|
||
## Check reviewers console load | ||
|
@@ -579,7 +579,7 @@ def test_recruit_reviewers(self, client, selenium, request_page, helpers): | |
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation declined') | ||
assert messages | ||
assert len(messages) | ||
assert messages[0]['content']['text'] =='<p>You have declined the invitation to become a Reviewer for NeurIPS 2021.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.</p>\n' | ||
assert messages[0]['content']['text'] =='<p>You have declined the invitation to become a Reviewer for NeurIPS 2021.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.</p>\n' | ||
|
||
client.add_members_to_group('NeurIPS.cc/2021/Conference/Reviewers', ['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]']) | ||
|
||
|
@@ -1458,7 +1458,7 @@ def test_reassignment_stage(self, conference, helpers, client, selenium, request | |
# Confirmation email to the reviewer | ||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation accepted for paper 5') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Amazon,<br>\nThank you for accepting the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>The NeurIPS 2021 program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add <a href=\"mailto:[email protected]\">[email protected]</a> to your email contacts to ensure that you receive all communications.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Amazon,<br>\nThank you for accepting the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>The NeurIPS 2021 program chairs will be contacting you with more information regarding next steps soon. In the meantime, please add <a href=\"mailto:[email protected]\">[email protected]</a> to your email contacts to ensure that you receive all communications.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
# Confirmation email to the ac | ||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer External Reviewer Amazon accepted to review paper 5') | ||
|
@@ -1494,7 +1494,7 @@ def test_reassignment_stage(self, conference, helpers, client, selenium, request | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation declined for paper 5') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Amazon,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Amazon,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
response_note=client.get_notes(invitation='NeurIPS.cc/2021/Conference/Reviewers/-/Proposed_Assignment_Recruitment', content={ 'submission_id': submission.id, 'user': '~External_Reviewer_Amazon1', 'response': 'No'})[0] | ||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer External Reviewer Amazon declined to review paper 5') | ||
|
@@ -1616,7 +1616,7 @@ def test_reassignment_stage(self, conference, helpers, client, selenium, request | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation declined for paper 5') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Adobe,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer Adobe,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
assert client.get_groups('NeurIPS.cc/2021/Conference/Paper5/External_Reviewers/Invited', member='~External_Reviewer_Adobe1') | ||
assert client.get_groups('NeurIPS.cc/2021/Conference/External_Reviewers/Invited', member='~External_Reviewer_Adobe1') | ||
|
@@ -1679,7 +1679,7 @@ def test_reassignment_stage(self, conference, helpers, client, selenium, request | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation accepted for paper 5, assignment pending') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi <a href=\"mailto:[email protected]\">[email protected]</a>,<br>\nThank you for accepting the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>Please signup in OpenReview using the email address <a href=\"mailto:[email protected]\">[email protected]</a> and complete your profile.<br>\nConfirmation of the assignment is pending until your profile is active and no conflicts of interest are detected.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi <a href=\"mailto:[email protected]\">[email protected]</a>,<br>\nThank you for accepting the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>Please signup in OpenReview using the email address <a href=\"mailto:[email protected]\">[email protected]</a> and complete your profile.<br>\nConfirmation of the assignment is pending until your profile is active and no conflicts of interest are detected.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer [email protected] accepted to review paper 5, assignment pending') | ||
assert messages and len(messages) == 1 | ||
|
@@ -1767,7 +1767,7 @@ def test_reassignment_stage(self, conference, helpers, client, selenium, request | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation declined for paper 5') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi <a href=\"mailto:[email protected]\">[email protected]</a>,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi <a href=\"mailto:[email protected]\">[email protected]</a>,<br>\nYou have declined the invitation to review the paper number: 5, title: Paper title 5.</p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Accept" button.</p>\n<p>OpenReview Team</p>\n' | ||
## Invite external reviewer with wrong tilde id | ||
with pytest.raises(openreview.OpenReviewException) as openReviewError: | ||
posted_edge=ac_client.post_edge(openreview.Edge( | ||
|
@@ -2207,7 +2207,7 @@ def test_emergency_reviewer_stage(self, conference, helpers, client, request_pag | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation accepted for paper 4') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer MIT,<br>\nThank you for accepting the invitation to review the paper number: 4, title: Paper title 4.</p>\n<p>Please go to the NeurIPS 2021 Reviewers Console and check your pending tasks: <a href=\"https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers\">https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers</a></p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi External Reviewer MIT,<br>\nThank you for accepting the invitation to review the paper number: 4, title: Paper title 4.</p>\n<p>Please go to the NeurIPS 2021 Reviewers Console and check your pending tasks: <a href=\"https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers\">https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers</a></p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] You have been assigned as a Reviewer for paper number 4') | ||
assert messages and len(messages) == 1 | ||
|
@@ -2300,7 +2300,7 @@ def test_emergency_reviewer_stage(self, conference, helpers, client, request_pag | |
|
||
messages = client.get_messages(to='[email protected]', subject='[NeurIPS 2021] Reviewer Invitation accepted for paper 4') | ||
assert messages and len(messages) == 1 | ||
assert messages[0]['content']['text'] == '<p>Hi Reviewer Amazon,<br>\nThank you for accepting the invitation to review the paper number: 4, title: Paper title 4.</p>\n<p>Please go to the NeurIPS 2021 Reviewers Console and check your pending tasks: <a href=\"https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers\">https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers</a></p>\n<p>If you would like to change your decision, please follow link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
assert messages[0]['content']['text'] == '<p>Hi Reviewer Amazon,<br>\nThank you for accepting the invitation to review the paper number: 4, title: Paper title 4.</p>\n<p>Please go to the NeurIPS 2021 Reviewers Console and check your pending tasks: <a href=\"https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers\">https://openreview.net/group?id=NeurIPS.cc/2021/Conference/Reviewers</a></p>\n<p>If you would like to change your decision, please follow the link in the previous invitation email and click on the "Decline" button.</p>\n<p>OpenReview Team</p>\n' | ||
|
||
assert client.get_groups('NeurIPS.cc/2021/Conference/Emergency_Reviewers/Invited', member='~Reviewer_Amazon1') | ||
assert client.get_groups('NeurIPS.cc/2021/Conference/Emergency_Reviewers', member='~Reviewer_Amazon1') | ||
|