Skip to content

Commit

Permalink
Feature/journal feature request (#1861)
Browse files Browse the repository at this point in the history
* make reviewer responsability optional

* additional fields for official recommendation and decision invitations

* make replies visible to all the action editors

* edge not editable by EIC

* assignment edges shouldn't be editable by authors of the submission

* fix description

* create anongroups for action editors

* fix tests

* fix another test

* filter submissions by certification

* additional fields for submission and review invitation

* fix prefix instead of value

---------

Co-authored-by: celestemartinez <[email protected]>
  • Loading branch information
melisabok and celestemartinez authored Oct 16, 2023
1 parent a96fa05 commit 79c73dc
Show file tree
Hide file tree
Showing 12 changed files with 449 additions and 151 deletions.
3 changes: 2 additions & 1 deletion openreview/journal/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ def setup_submission_groups(self, note):
writers=[venue_id],
signatures=[venue_id],
signatories=[venue_id, action_editors_group_id],
members=[]
members=[],
anonids=True
))

reviewers_group=openreview.tools.get_group(self.client, reviewers_group_id)
Expand Down
76 changes: 60 additions & 16 deletions openreview/journal/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ def set_reviewer_responsibility_invitation(self):
)
self.save_invitation(invitation)

if self.journal.should_skip_reviewer_responsibility_acknowledgement():
return

forum_note_id = self.journal.get_acknowledgement_responsibility_form()
if not forum_note_id:
forum_edit = self.client.post_note_edit(invitation=self.journal.get_form_id(),
Expand Down Expand Up @@ -1011,6 +1014,11 @@ def set_submission_invitation(self):
'order': 6
}

if self.journal.get_submission_additional_fields():
for key, value in self.journal.get_submission_additional_fields().items():
invitation.edit['note']['content'][key] = value

print(invitation.edit['note']['content'])
self.save_invitation(invitation)

def set_ae_assignment(self, assignment_delay):
Expand Down Expand Up @@ -1869,7 +1877,7 @@ def set_reviewer_assignment(self, assignment_delay):
'writers': [venue_id, self.journal.get_action_editors_id(number='${{2/head}/number}')],
'signatures': {
'param': {
'regex': venue_id + '|' + editor_in_chief_id + '|' + self.journal.get_action_editors_id(number='.*')
'regex': venue_id + '|' + editor_in_chief_id + '|' + self.journal.get_action_editors_id(number='.*', anon=True)
}
},
'head': {
Expand Down Expand Up @@ -2205,7 +2213,7 @@ def set_review_approval_invitation(self):
'param': {
'items': [
{ 'value': editors_in_chief_id, 'optional': True },
{ 'value': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}'), 'optional': True }
{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True }
]
}
},
Expand Down Expand Up @@ -3455,7 +3463,7 @@ def set_review_invitation(self):
'param': {
'items': [
{ 'prefix': self.journal.get_reviewers_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True },
{ 'value': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}'), 'optional': True }
{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True }
]
}
},
Expand Down Expand Up @@ -3556,6 +3564,10 @@ def set_review_invitation(self):
}
}

if self.journal.get_review_additional_fields():
for key, value in self.journal.get_review_additional_fields().items():
invitation['edit']['note']['content'][key] = value

self.save_super_invitation(self.journal.get_review_id(), invitation_content, edit_content, invitation)

invitation = {
Expand Down Expand Up @@ -3683,7 +3695,7 @@ def set_official_recommendation_invitation(self):
'param': {
'items': [
{ 'prefix': self.journal.get_reviewers_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True },
{ 'value': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}'), 'optional': True }
{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True }
]
}
},
Expand Down Expand Up @@ -3781,7 +3793,11 @@ def set_official_recommendation_invitation(self):
'input': 'checkbox'
}
}
}
}

if self.journal.get_official_recommendation_additional_fields():
for key, value in self.journal.get_official_recommendation_additional_fields().items():
invitation['edit']['note']['content'][key] = value

self.save_super_invitation(self.journal.get_reviewer_recommendation_id(), invitation_content, edit_content, invitation)

Expand Down Expand Up @@ -3974,14 +3990,18 @@ def set_solicit_review_approval_invitation(self):
'preprocess': self.preprocess_script,
'dateprocesses': [self.ae_reminder_process],
'edit': {
'signatures': [ self.journal.get_action_editors_id(number='${4/content/noteNumber/value}') ],
'signatures': {
'param': {
'items': [{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True) }]
}
},
'readers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}') ],
'nonreaders': [ self.journal.get_authors_id(number='${4/content/noteNumber/value}') ],
'writers': [ venue_id ],
'note': {
'forum': '${4/content/noteId/value}',
'replyto': '${4/content/replytoId/value}',
'signatures': [ self.journal.get_action_editors_id(number='${5/content/noteNumber/value}') ],
'signatures': ['${3/signatures}'],
'readers': [ editors_in_chief_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}'), '${5/content/soliciter/value}' ],
'nonreaders': [ self.journal.get_authors_id(number='${5/content/noteNumber/value}') ],
'writers': [ venue_id ],
Expand Down Expand Up @@ -4372,7 +4392,7 @@ def set_comment_invitation(self):
'param': {
'items': [
{ 'value': editors_in_chief_id, 'optional': True },
{ 'value': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}'), 'optional': True },
{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True },
{ 'prefix': self.journal.get_reviewers_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True },
{ 'value': self.journal.get_authors_id(number='${7/content/noteNumber/value}'), 'optional': True } ]
}
Expand Down Expand Up @@ -4452,7 +4472,7 @@ def set_comment_invitation(self):
'param': {
'items': [
{ 'value': editors_in_chief_id, 'optional': True },
{ 'value': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}'), 'optional': True },
{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True), 'optional': True },
]
}
},
Expand Down Expand Up @@ -4632,7 +4652,11 @@ def set_decision_invitation(self):
'maxReplies': 1,
'minReplies': 1,
'edit': {
'signatures': [self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'signatures': {
'param': {
'items': [{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True) }]
}
},
'readers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'nonreaders': [ self.journal.get_authors_id(number='${4/content/noteNumber/value}') ],
'writers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
Expand All @@ -4652,7 +4676,7 @@ def set_decision_invitation(self):
'deletable': True
}
},
'signatures': [self.journal.get_action_editors_id(number='${5/content/noteNumber/value}')],
'signatures': ['${3/signatures}'],
'readers': [ editors_in_chief_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}') ],
'nonreaders': [ self.journal.get_authors_id(number='${5/content/noteNumber/value}') ],
'writers': [ venue_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}')],
Expand Down Expand Up @@ -4745,6 +4769,10 @@ def set_decision_invitation(self):
}
}

if self.journal.get_decision_additional_fields():
for key, value in self.journal.get_decision_additional_fields().items():
invitation['edit']['note']['content'][key] = value

self.save_super_invitation(self.journal.get_ae_decision_id(), invitation_content, edit_content, invitation)

def set_note_decision_invitation(self, note, duedate):
Expand Down Expand Up @@ -4978,7 +5006,11 @@ def set_review_rating_invitation(self):
'signatures': [editors_in_chief_id],
'maxReplies': 1,
'edit': {
'signatures': [self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'signatures': {
'param': {
'items': [{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True) }]
}
},
'readers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'nonreaders': [ self.journal.get_authors_id(number='${4/content/noteNumber/value}') ],
'writers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
Expand All @@ -4991,7 +5023,7 @@ def set_review_rating_invitation(self):
},
'forum': '${4/content/noteId/value}',
'replyto': '${4/content/replytoId/value}',
'signatures': [self.journal.get_action_editors_id(number='${5/content/noteNumber/value}')],
'signatures': ['${3/signatures}'],
'readers': [ editors_in_chief_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}') ],
'nonreaders': [ self.journal.get_authors_id(number='${5/content/noteNumber/value}') ],
'writers': [ venue_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}')],
Expand Down Expand Up @@ -5308,6 +5340,10 @@ def set_camera_ready_revision_invitation(self):
'process': self.process_script
}

if self.journal.get_submission_additional_fields():
for key, value in self.journal.get_submission_additional_fields().items():
invitation['edit']['note']['content'][key] = value

self.save_super_invitation(self.journal.get_camera_ready_revision_id(), invitation_content, edit_content, invitation)

def set_note_camera_ready_revision_invitation(self, note, duedate):
Expand Down Expand Up @@ -5363,11 +5399,15 @@ def set_camera_ready_verification_invitation(self):
'writers': [venue_id],
'signatures': [venue_id],
'edit': {
'signatures': [self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'signatures': {
'param': {
'items': [{ 'prefix': self.journal.get_action_editors_id(number='${7/content/noteNumber/value}', anon=True) }]
}
},
'readers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'writers': [ venue_id, self.journal.get_action_editors_id(number='${4/content/noteNumber/value}')],
'note': {
'signatures': [self.journal.get_action_editors_id(number='${5/content/noteNumber/value}')],
'signatures': ['${3/signatures}'],
'forum': '${4/content/noteId/value}',
'replyto': '${4/content/noteId/value}',
'readers': [ editors_in_chief_id, self.journal.get_action_editors_id(number='${5/content/noteNumber/value}'), self.journal.get_authors_id(number='${5/content/noteNumber/value}') ],
Expand Down Expand Up @@ -5611,7 +5651,11 @@ def set_eic_revision_invitation(self):
"input": "select"
}
}
}
}

if self.journal.get_submission_additional_fields():
for key, value in self.journal.get_submission_additional_fields().items():
invitation['edit']['note']['content'][key] = value

self.save_super_invitation(self.journal.get_eic_revision_id(), invitation_content, edit_content, invitation)

Expand Down
30 changes: 23 additions & 7 deletions openreview/journal/journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def get_publication_chairs_id(self):
def get_action_editors_archived_id(self):
return f'{self.get_action_editors_id()}/Archived'

def get_action_editors_id(self, number=None):
return self.__get_group_id(self.action_editors_name, number)
def get_action_editors_id(self, number=None, anon=False):
return self.__get_group_id('Action_Editor_' if anon else self.action_editors_name, number)

def get_reviewers_id(self, number=None, anon=False):
return self.__get_group_id('Reviewer_' if anon else self.reviewers_name, number)
Expand Down Expand Up @@ -424,6 +424,9 @@ def are_authors_anonymous(self):

def should_skip_ac_recommendation(self):
return self.settings.get('skip_ac_recommendation', False)

def should_skip_reviewer_responsibility_acknowledgement(self):
return self.settings.get('skip_reviewer_responsibility_acknowledgement', False)

def get_certifications(self):
return self.settings.get('certifications', [])
Expand Down Expand Up @@ -462,7 +465,19 @@ def get_reviewers_max_papers(self):
return self.settings.get('reviewers_max_papers', 6)

def get_ae_max_papers(self):
return self.settings.get('action_editors_max_papers', 12)
return self.settings.get('action_editors_max_papers', 12)

def get_submission_additional_fields(self):
return self.settings.get('submission_additional_fields', {})

def get_review_additional_fields(self):
return self.settings.get('review_additional_fields', {})

def get_official_recommendation_additional_fields(self):
return self.settings.get('official_recommendation_additional_fields', {})

def get_decision_additional_fields(self):
return self.settings.get('decision_additional_fields', {})

def should_release_authors(self):
return self.is_submission_public() and self.are_authors_anonymous()
Expand All @@ -474,22 +489,22 @@ def get_author_submission_readers(self, number):
def get_under_review_submission_readers(self, number):
if self.is_submission_public():
return ['everyone']
return [self.venue_id, self.get_action_editors_id(number), self.get_reviewers_id(number), self.get_authors_id(number)]
return [self.venue_id, self.get_action_editors_id(), self.get_reviewers_id(number), self.get_authors_id(number)]

def get_release_review_readers(self, number):
if self.is_submission_public():
return ['everyone']
return [self.get_editors_in_chief_id(), self.get_action_editors_id(number), self.get_reviewers_id(number), self.get_authors_id(number)]
return [self.get_editors_in_chief_id(), self.get_action_editors_id(), self.get_reviewers_id(number), self.get_authors_id(number)]

def get_release_decision_readers(self, number):
if self.is_submission_public():
return ['everyone']
return [self.get_editors_in_chief_id(), self.get_action_editors_id(number), self.get_reviewers_id(number), self.get_authors_id(number)]
return [self.get_editors_in_chief_id(), self.get_action_editors_id(), self.get_reviewers_id(number), self.get_authors_id(number)]

def get_release_authors_readers(self, number):
if self.is_submission_public():
return ['everyone']
return [self.get_editors_in_chief_id(), self.get_action_editors_id(number), self.get_authors_id(number)]
return [self.get_editors_in_chief_id(), self.get_action_editors_id(), self.get_authors_id(number)]

def get_official_comment_readers(self, number):
readers = []
Expand All @@ -498,6 +513,7 @@ def get_official_comment_readers(self, number):

return readers + [
self.get_editors_in_chief_id(),
self.get_action_editors_id(),
self.get_action_editors_id(number),
self.get_reviewers_id(number),
self.get_reviewers_id(number, anon=True) + '.*',
Expand Down
5 changes: 5 additions & 0 deletions openreview/journal/process/ae_assignment_pre_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ def process(client, edge, invitation):

submission = client.get_note(edge.head)

## authors should not be able to edit assignments
authors_group_id = journal.get_authors_id(number=submission.number)
if client.get_groups(id=authors_group_id, member=edge.tauthor):
raise openreview.OpenReviewException(f'Authors can not edit assignments for this submission: {submission.number}')

venue_id = submission.content.get('venueid', {}).get('value')
if not journal.is_active_submission(submission):
raise openreview.OpenReviewException(f'Can not edit assignments for this submission: {venue_id}')
Expand Down
5 changes: 5 additions & 0 deletions openreview/journal/process/reviewer_assignment_pre_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ def process(client, edge, invitation):

submission = client.get_note(edge.head)

## authors should not be able to edit assignments
authors_group_id = journal.get_authors_id(number=submission.number)
if client.get_groups(id=authors_group_id, member=edge.tauthor):
raise openreview.OpenReviewException(f'Authors can not edit assignments for this submission: {submission.number}')

venue_id = submission.content.get('venueid', {}).get('value')
if venue_id not in [journal.under_review_venue_id]:
raise openreview.OpenReviewException(f'Can not edit assignments for this submission: {venue_id}')
Expand Down
2 changes: 1 addition & 1 deletion openreview/journal/process/reviewer_assignment_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def process_update(client, edge, invitation, existing_edge):
client.post_edge(submission_edge)

## Enable reviewer responsibility task
if len(tail_assignment_edges) == 1 and not edge.ddate and not client.get_groups(member=edge.tail, id=journal.get_solicit_reviewers_id(number=note.number)):
if not journal.should_skip_reviewer_responsibility_acknowledgement() and len(tail_assignment_edges) == 1 and not edge.ddate and not client.get_groups(member=edge.tail, id=journal.get_solicit_reviewers_id(number=note.number)):
print('Enable reviewer responsibility task for', edge.tail)
responsiblity_invitation_edit = journal.invitation_builder.set_single_reviewer_responsibility_invitation(edge.tail, journal.get_due_date(weeks = 1))

Expand Down
2 changes: 1 addition & 1 deletion openreview/journal/process/submission_decision_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def process(client, edit, invitation):
## Update submission and set the decision submitted status
client.post_note_edit(
invitation = journal.get_meta_invitation_id(),
readers = [journal.venue_id, journal.get_action_editors_id(submission.number), journal.get_reviewers_id(submission.number), journal.get_authors_id(submission.number)],
readers = journal.get_under_review_submission_readers(submission.number),
writers = [journal.venue_id],
signatures = [journal.venue_id],
note = openreview.api.Note(
Expand Down
Loading

0 comments on commit 79c73dc

Please sign in to comment.