def get_decision_stage(client, request_forum): decision_start_date = request_forum.content.get('decision_start_date', '').strip() if decision_start_date: try: decision_start_date = datetime.datetime.strptime( decision_start_date, '%Y/%m/%d %H:%M') except ValueError: decision_start_date = datetime.datetime.strptime( decision_start_date, '%Y/%m/%d') else: decision_start_date = None decision_due_date = request_forum.content.get('decision_deadline', '').strip() if decision_due_date: try: decision_due_date = datetime.datetime.strptime( decision_due_date, '%Y/%m/%d %H:%M') except ValueError: decision_due_date = datetime.datetime.strptime( decision_due_date, '%Y/%m/%d') else: decision_due_date = None decision_options = request_forum.content.get('decision_options', '').strip() if decision_options: decision_options = [ s.translate(str.maketrans('', '', '"\'')).strip() for s in decision_options.split(',') ] return openreview.DecisionStage( options=decision_options, start_date=decision_start_date, due_date=decision_due_date, public=request_forum.content.get('make_decisions_public', '').startswith('Yes'), release_to_authors=request_forum.content.get( 'release_decisions_to_authors', '').startswith('Yes'), release_to_reviewers=request_forum.content.get( 'release_decisions_to_reviewers', '').startswith('Yes'), email_authors=request_forum.content.get('notify_authors', '').startswith('Yes')) else: return openreview.DecisionStage( start_date=decision_start_date, due_date=decision_due_date, public=request_forum.content.get('make_decisions_public', '').startswith('Yes'), release_to_authors=request_forum.content.get( 'release_decisions_to_authors', '').startswith('Yes'), release_to_reviewers=request_forum.content.get( 'release_decisions_to_reviewers', '').startswith('Yes'), email_authors=request_forum.content.get('notify_authors', '').startswith('Yes'))
def test_decisions(self, conference, helpers, test_client, client): conference.set_decision_stage(openreview.DecisionStage()) submissions = conference.get_submissions() assert len(submissions) == 5 client.post_note( openreview.Note( invitation='MICCAI.org/2021/Challenges/Paper5/-/Decision', forum=submissions[0].id, replyto=submissions[0].id, readers=[ 'MICCAI.org/2021/Challenges/Program_Chairs', 'MICCAI.org/2021/Challenges/Paper5/Area_Chairs' ], nonreaders=['MICCAI.org/2021/Challenges/Paper5/Authors'], writers=['MICCAI.org/2021/Challenges/Program_Chairs'], signatures=['MICCAI.org/2021/Challenges/Program_Chairs'], content={ 'title': 'Paper Decision', 'decision': 'Reject' })) client.post_note( openreview.Note( invitation='MICCAI.org/2021/Challenges/Paper4/-/Decision', forum=submissions[1].id, replyto=submissions[1].id, readers=[ 'MICCAI.org/2021/Challenges/Program_Chairs', 'MICCAI.org/2021/Challenges/Paper4/Area_Chairs' ], nonreaders=['MICCAI.org/2021/Challenges/Paper4/Authors'], writers=['MICCAI.org/2021/Challenges/Program_Chairs'], signatures=['MICCAI.org/2021/Challenges/Program_Chairs'], content={ 'title': 'Paper Decision', 'decision': 'Accept (Oral)' })) client.post_note( openreview.Note( invitation='MICCAI.org/2021/Challenges/Paper3/-/Decision', forum=submissions[2].id, replyto=submissions[2].id, readers=[ 'MICCAI.org/2021/Challenges/Program_Chairs', 'MICCAI.org/2021/Challenges/Paper3/Area_Chairs' ], nonreaders=['MICCAI.org/2021/Challenges/Paper3/Authors'], writers=['MICCAI.org/2021/Challenges/Program_Chairs'], signatures=['MICCAI.org/2021/Challenges/Program_Chairs'], content={ 'title': 'Paper Decision', 'decision': 'Accept (Poster)' }))
def test_post_decisions(self, client, selenium, request_page): builder = openreview.conference.ConferenceBuilder(client) assert builder, 'builder is None' builder.set_conference_id('NIPS.cc/2018/Workshop/MLITS') builder.has_area_chairs(True) conference = builder.get_result() conference.set_decision_stage(openreview.DecisionStage(public=True)) submissions = conference.get_submissions() assert len(submissions) == 1 note = openreview.Note( invitation='NIPS.cc/2018/Workshop/MLITS/Paper1/-/Decision', forum=submissions[0].id, replyto=submissions[0].id, readers=['everyone'], writers=['NIPS.cc/2018/Workshop/MLITS/Program_Chairs'], signatures=['NIPS.cc/2018/Workshop/MLITS/Program_Chairs'], content={ 'title': 'Paper Decision', 'decision': 'Accept (Oral)' }) note = client.post_note(note) conference.set_homepage_decisions(release_accepted_notes={ 'conference_title': 'NIPS Workshop MLITS', 'conference_year': '2018' }) submissions = conference.get_submissions() assert len(submissions) == 1 valid_bibtex = '''@inproceedings{ user2018new, title={New paper title}, author={Test User and Peter Test and Andrew Mc}, booktitle={NIPS Workshop MLITS}, year={2018}, url={https://openreview.net/forum?id=''' valid_bibtex = valid_bibtex + submissions[0].forum + '''} }''' assert submissions[0].content['_bibtex'] == valid_bibtex
## Stage: reviews - Reveal reviews and update tags for the desk-reject question tag_due_date = datetime.datetime(2019, 11, 30, 14, 59) for note in blind_notes: tag_invi = client.post_invitation( get_tag_invitation(conference, note, tag_due_date)) for review in map_paper_to_review.get(str(note.number), []): review.readers = ['everyone'] review.nonreaders = [] try: client.post_note(review) print('Posted correctly for paper: ', str(note.number)) except: print('Error posting review: ', review.id) ## Area chair decisions with open('meta_review_process.js', 'r') as f: process_str = f.read() conference.set_meta_review_stage(openreview.MetaReviewStage( due_date=datetime.datetime(2019, 12, 6, 14, 59), additional_fields=meta_review_fields), process=process_str) ## Program Chairs decisions conference.set_decision_stage( openreview.DecisionStage( due_date=datetime.datetime(2019, 12, 12, 14, 59))) ## Camera ready revisions conference.open_revise_submissions()