# client.post_invitation(review_inv) if review_inv.details and 'repliedNotes' in review_inv.details: official_reviews = [ openreview.Note.from_json(r) \ for r in review_inv.details['repliedNotes']] paper = openreview.Note.from_json(review_inv.details['replytoNote']) paper_number = paper.number for review in official_reviews: # review.readers = ['everyone'] review.writers = [conference_config.CONFERENCE_ID] review = client.post_note(review) reviewer_id = review.signatures[0].split('/')[4] review_revision_inv = invitations.enable_invitation( 'Review_Revision', target_paper=paper) review_revision_inv.id = review_revision_inv.id.replace('<paper_number>', "Paper" + str(paper_number)) review_revision_inv.id = review_revision_inv.id.replace('<reviewer_id>', reviewer_id) review_revision_inv.reply['referent'] = review.id review_revision_inv.reply['signatures'] = { 'description': 'How your identity will be displayed with the above content.', 'values-regex': conference_config.PAPER_ANONREVIEWERS_TEMPLATE_REGEX.replace('<number>',str(paper_number)) } review_revision_inv.invitees = review.signatures client.post_invitation(review_revision_inv) blind_notes = openreview.tools.iterget_notes(client, invitation=conference_config.BLIND_SUBMISSION_ID)
counter_new_invis_created = 0 for review_inv in official_review_invs: if review_inv.details and 'repliedNotes' in review_inv.details: official_reviews = [ openreview.Note.from_json(r) \ for r in review_inv.details['repliedNotes']] if (review_inv.details.get('replytoNote')): paper = openreview.Note.from_json( review_inv.details.get('replytoNote')) paper_number = paper.number for review in official_reviews: reviewer_id = review.signatures[0].split('/')[4] review_revision_inv = invitations.enable_invitation( 'Review_Revision', target_paper=review) review_revision_inv.id = review_revision_inv.id.replace( '<paper_number>', "Paper" + str(paper_number)) review_revision_inv.id = review_revision_inv.id.replace( '<reviewer_id>', reviewer_id) if review_revision_inv.id not in existing_review_revision_invis: review_revision_inv.reply['referent'] = review.id review_revision_inv.reply['signatures'] = { 'description': 'How your identity will be displayed with the above content.', 'values-regex': conference_config. PAPER_ANONREVIEWERS_TEMPLATE_REGEX.replace( '<number>', str(paper_number))
return anonreviewer_ids if __name__ == '__main__': ## Argument handling parser = argparse.ArgumentParser() parser.add_argument('--baseurl', help="base url") parser.add_argument('--username') parser.add_argument('--password') args = parser.parse_args() client = openreview.Client(baseurl=args.baseurl, username=args.username, password=args.password) blind_submissions = openreview.tools.iterget_notes( client, invitation=conference_config.BLIND_SUBMISSION_ID) for blind_note in blind_submissions: groups.create_and_post(client, blind_note, 'Paper/Reviewers/Submitted') groups.create_and_post(client, blind_note, 'Paper/Reviewers/Unsubmitted', members=getAnonReviewersByForum(blind_note)) client.post_invitation( invitations.enable_invitation('Official_Review', blind_note)) client.post_invitation( invitations.enable_invitation('Meta_Review', blind_note))
all_papers = list( openreview.tools.iterget_notes(client, invitation=iclr19.BLIND_SUBMISSION_ID)) counter = 0 for paper in all_papers: map_paper_to_anonrev_reviews = get_all_reviews(client, paper.number) all_submitted_reviewers = client.get_group( "ICLR.cc/2019/Conference/Paper{}/Reviewers/Submitted".format( paper.number)).members for anonrev, review_id in map_paper_to_anonrev_reviews.items(): ## Create invitation for this paper-anonreview-review combination new_invitaton = invitations.enable_invitation( "Review_Rating", paper) # Update the invi before posting it new_invitaton.reply['replyto'] = review_id new_invitaton.id = new_invitaton.id.replace( "{AnonReviewerNumber}", anonrev.split("/")[-1]) new_invitaton.invitees = [ reviewer for reviewer in all_submitted_reviewers if reviewer != anonrev ] new_invitaton.invitees.append( 'ICLR.cc/2019/Conference/Paper{}/Authors'.format(paper.number)) new_invitaton.invitees.append( 'ICLR.cc/2019/Conference/Paper{}/Area_Chairs'.format( paper.number))