Skip to content

Commit

Permalink
update withraw exp date from request form (#1899)
Browse files Browse the repository at this point in the history
  • Loading branch information
celestemartinez authored Nov 1, 2023
1 parent 73015be commit b97ae4e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions openreview/conference/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,15 @@ def get_submission_stage(request_forum, venue):

second_deadline_remove_fields = request_forum.content.get('second_deadline_remove_options', [])

withdraw_submission_exp_date = request_forum.content.get('withdraw_submission_expiration', '').strip()
if withdraw_submission_exp_date:
try:
withdraw_submission_exp_date = datetime.datetime.strptime(withdraw_submission_exp_date, '%Y/%m/%d %H:%M')
except ValueError:
withdraw_submission_exp_date = datetime.datetime.strptime(withdraw_submission_exp_date, '%Y/%m/%d')
else:
withdraw_submission_exp_date = None

return openreview.stages.SubmissionStage(name = name,
double_blind=double_blind,
start_date=submission_start_date,
Expand All @@ -426,6 +435,7 @@ def get_submission_stage(request_forum, venue):
hide_fields=hide_fields,
subject_areas=subject_areas,
create_groups=create_groups,
withdraw_submission_exp_date=withdraw_submission_exp_date,
author_names_revealed=author_names_revealed,
papers_released=papers_released,
readers=readers,
Expand Down
10 changes: 8 additions & 2 deletions tests/test_icml_conference.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ def test_post_submission(self, client, openreview_client, helpers):
## close the submissions
now = datetime.datetime.utcnow()
due_date = now - datetime.timedelta(days=1)
exp_date = now + datetime.timedelta(days=10)
pc_client.post_note(openreview.Note(
content={
'title': 'Thirty-ninth International Conference on Machine Learning',
Expand Down Expand Up @@ -805,8 +806,8 @@ def test_post_submission(self, client, openreview_client, helpers):
}
}
}
}

},
'withdraw_submission_expiration': exp_date.strftime('%Y/%m/%d')
},
forum=request_form.forum,
invitation='openreview.net/Support/-/Request{}/Revision'.format(request_form.number),
Expand All @@ -824,7 +825,12 @@ def test_post_submission(self, client, openreview_client, helpers):
assert submission_invitation.expdate < openreview.tools.datetime_millis(now)

assert len(pc_client_v2.get_all_invitations(invitation='ICML.cc/2023/Conference/-/Withdrawal')) == 101
withdrawal_inv = pc_client_v2.get_invitation('ICML.cc/2023/Conference/Submission1/-/Withdrawal')
assert withdrawal_inv.expdate == openreview.tools.datetime_millis(exp_date.replace(hour=0, minute=0, second=0, microsecond=0))
assert len(pc_client_v2.get_all_invitations(invitation='ICML.cc/2023/Conference/-/Desk_Rejection')) == 101
desk_reject_inv = pc_client_v2.get_invitation('ICML.cc/2023/Conference/Submission1/-/Desk_Rejection')
desk_reject_due_date = due_date + datetime.timedelta(days=90)
assert desk_reject_inv.expdate == openreview.tools.datetime_millis(desk_reject_due_date.replace(hour=0, minute=0, second=0, microsecond=0))
assert pc_client_v2.get_invitation('ICML.cc/2023/Conference/-/PC_Revision')

## make submissions visible to ACs only
Expand Down

0 comments on commit b97ae4e

Please sign in to comment.