-
Notifications
You must be signed in to change notification settings - Fork 7
Enable Revisions
In addition to "write" permissions granted by the writers field, it is possible to allow users to add revisions to Notes in the form of References.
To do this, the conference administrator should create an Invitation to create a new Reference.
For example:
# First, get the Note that will be revised.
target_note = client.get_note(id = 'abcXYZ')
# Then get the Invitation that this Note responds to.
# We'll use this to specify this Reference Invitation's parameters
target_invitation = client.get_invitation(id = target_note.invitation)
# Now create the Reference Invitation from a dict, using the Invitation's .from_json() class function
revision_invitation = openreview.Invitation.from_json({
'id': 'ICLR.cc/2019/Conference/-/Paper123/Add_Revision',
'readers': ['everyone'],
'writers': ['ICLR.cc/2019/Conference'],
'invitees': ['ICLR.cc/2019/Conference/Paper123/Authors'],
'signatures': ['ICLR.cc/2019/Conference'],
'reply': {
'referent': target_note.id,
'forum': target_note.id,
'content': target_invitation.reply['content'],
'signatures': target_invitation.reply['signatures'],
'writers': target_invitation.reply['writers'],
'readers': target_invitation.reply['readers']
}
})Notice that we're setting the referent field in the Reference Invitation's reply field equal to the ID of the target note. The presence of the referent field tells the system that a Reference should be created that points to the Note with the given ID.
It is likely that a workflow engineer will want to create many Reference Invitations with different permissions (e.g. one for each paper). The function openreview.invitations.from_template() allows the workflow engineer to generate invitations from a template dictionary.
For example:
# First, get all Notes that will need an Invitation to submit a revision:
papers = client.get_notes(invitation = 'ICLR.cc/2019/Conference/-/Blind_Submission')
# Define a template. Template strings can be defined with the < > characters.
# Template strings will be replaced by their equivalent values in the provided Note object.
# For example: <forum> will be replaced by the value in Note.forum
add_revision_template = {
'id': 'ICLR.cc/2019/Conference/-/Paper<number>/Add_Revision',
'readers': ['everyone'],
'writers': ['ICLR.cc/2019/Conference'],
'invitees': 'ICLR.cc/2019/Conference/Paper<number>/Authors'],
'signatures': ['ICLR.cc/2019/Conference'],
'reply': {
'referent': '<forum>',
'forum': '<forum>',
'content': submission_inv.reply['content'],
'signatures': submission_inv.reply['signatures'],
'writers': submission_inv.reply['writers'],
'readers': submission_inv.reply['readers']
}
}
for paper in papers:
invitation = openreview.invitations.from_template(add_revision_template, paper)
client.post_invitation(invitation)