Skip to content

Commit

Permalink
Feat/add submission license field (#1848)
Browse files Browse the repository at this point in the history
* Add submission_license to Venue class

* Add submission_license to request form

* Add license to submission form content

* Fix license default value

* Remove license from submission content

* Add more license options

* Add license to submission invitation

* Add license to Note class

* Add test

* Fix comment

* Add license to remove_fields in venue_request revision invitation

* Update license description

* Fix order of license field in request form

* Add license field if not None

---------

Co-authored-by: xkopenreview <[email protected]>
Co-authored-by: Melisa Bok <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent 62edc8a commit ce61d1a
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 32 deletions.
9 changes: 7 additions & 2 deletions openreview/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,8 @@ def __init__(self,
replyto=None,
nonreaders=None,
domain=None,
details = None):
details = None,
license=None):

self.id = id
self.number = number
Expand All @@ -2233,6 +2234,7 @@ def __init__(self,
self.details = details
self.invitations = invitations
self.domain = domain
self.license = license

def __repr__(self):
content = ','.join([("%s = %r" % (attr, value)) for attr, value in vars(self).items()])
Expand Down Expand Up @@ -2279,6 +2281,8 @@ def to_json(self):
body['writers'] = self.writers
if self.readers:
body['readers'] = self.readers
if self.license:
body['license'] = self.license
return body

@classmethod
Expand Down Expand Up @@ -2311,7 +2315,8 @@ def from_json(Note,n):
signatures=n.get('signatures'),
writers=n.get('writers'),
details=n.get('details'),
domain=n.get('domain')
domain=n.get('domain'),
license=n.get('license')
)
return note

Expand Down
1 change: 1 addition & 0 deletions openreview/conference/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def get_conference(client, request_form_id, support_user='OpenReview.net/Support
venue.area_chair_roles = note.content.get('area_chair_roles', ['Area_Chairs'])
venue.reviewer_roles = note.content.get('reviewer_roles', ['Reviewers'])
venue.allow_gurobi_solver = venue_content.get('allow_gurobi_solver', {}).get('value', False)
venue.submission_license = note.content.get('submission_license', 'CC BY 4.0')
set_homepage_options(note, venue)
venue.reviewer_identity_readers = get_identity_readers(note, 'reviewer_identity')
venue.area_chair_identity_readers = get_identity_readers(note, 'area_chair_identity')
Expand Down
2 changes: 1 addition & 1 deletion openreview/stages/venue_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_content(self, api_version='1', conference=None, venue_id=None):
'hidden': True
}
}
}
}

return content

Expand Down
5 changes: 5 additions & 0 deletions openreview/venue/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def set_meta_invitation(self):
def set_submission_invitation(self):
venue_id = self.venue_id
submission_stage = self.venue.submission_stage
submission_license = self.venue.submission_license

content = submission_stage.get_content(api_version='2', conference=self.venue, venue_id=self.venue.get_submission_venue_id())

Expand Down Expand Up @@ -166,6 +167,10 @@ def set_submission_invitation(self):
process=self.get_process_content('process/submission_process.py')
)

if submission_license:
submission_invitation.edit['license'] = submission_license
submission_invitation.edit['note']['license'] = submission_license

submission_invitation = self.save_invitation(submission_invitation, replacement=False)

def set_post_submission_invitation(self):
Expand Down
1 change: 1 addition & 0 deletions openreview/venue/venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __init__(self, client, venue_id, support_user):
self.decision_heading_map = {}
self.use_publication_chairs = False
self.allow_gurobi_solver = False
self.submission_license = None

def get_id(self):
return self.venue_id
Expand Down
62 changes: 34 additions & 28 deletions openreview/venue_request/venue_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, venue_request):

def setup_venue_revision(self):

remove_fields = ['Area Chairs (Metareviewers)', 'senior_area_chairs', 'Author and Reviewer Anonymity', 'Open Reviewing Policy', 'reviewer_identity', 'area_chair_identity', 'senior_area_chair_identity', 'submission_readers', 'api_version', 'secondary_area_chairs', 'force_profiles_only']
remove_fields = ['Area Chairs (Metareviewers)', 'senior_area_chairs', 'Author and Reviewer Anonymity', 'Open Reviewing Policy', 'reviewer_identity', 'area_chair_identity', 'senior_area_chair_identity', 'submission_readers', 'api_version', 'secondary_area_chairs', 'force_profiles_only', 'submission_license']
revision_content = {key: self.venue_request.request_content[key] for key in self.venue_request.request_content if key not in remove_fields}
revision_content['Additional Submission Options'] = {
'order': 18,
Expand Down Expand Up @@ -1203,13 +1203,19 @@ def setup_request_form(self):
'value-regex': '.*',
'order': 16
},
'submission_license': {
'value-radio': ['CC BY 4.0', 'CC BY-SA 4.0', 'CC BY-NC 4.0', 'CC BY-ND 4.0', 'CC BY-NC-SA 4.0', 'CC BY-NC-ND 4.0', 'CC0 1.0'],
'description': 'Which license would you like to use for each submission? If you are unsure, we recommend "CC BY 4.0". If your license is not listed, please let us know and we can add it. Please refer to https://openreview.net/legal/terms for more information.',
'default': 'CC BY 4.0',
'order': 17
},
'submission_reviewer_assignment': {
'description': 'How do you want to assign reviewers to submissions?. Automatic assignment will assign reviewers to submissions based on their expertise and/or bids. Manual assignment will allow you to assign reviewers to submissions manually.',
'value-radio': [
'Automatic',
'Manual'
],
'order': 17,
'order': 18,
'required': True
},
'Author and Reviewer Anonymity': {
Expand All @@ -1219,7 +1225,7 @@ def setup_request_form(self):
'Single-blind (Reviewers are anonymous)',
'No anonymity'
],
'order': 18,
'order': 19,
'required': True
},
'reviewer_identity': {
Expand All @@ -1234,7 +1240,7 @@ def setup_request_form(self):
'Assigned Reviewers'
],
'default': ['Program Chairs'],
'order': 19,
'order': 20,
'required': False
},
'area_chair_identity': {
Expand All @@ -1249,7 +1255,7 @@ def setup_request_form(self):
'Assigned Reviewers'
],
'default': ['Program Chairs', 'Assigned Senior Area Chair', 'Assigned Area Chair'],
'order': 20,
'order': 21,
'required': False,
},
'senior_area_chair_identity': {
Expand All @@ -1264,7 +1270,7 @@ def setup_request_form(self):
'Assigned Reviewers'
],
'default': ['Program Chairs', 'Assigned Senior Area Chair'],
'order': 21,
'order': 22,
'required': False,
},
'Open Reviewing Policy': {
Expand All @@ -1274,7 +1280,7 @@ def setup_request_form(self):
'Submissions should be public, but reviews should be private.',
'Submissions and reviews should both be public.'
],
'order': 22,
'order': 23,
'required': False,
'hidden': True
},
Expand All @@ -1284,7 +1290,7 @@ def setup_request_form(self):
'Yes, require all authors to have an OpenReview profile',
'No, allow submissions with email addresses'
],
'order': 23,
'order': 24,
'default': ['No, allow submissions with email addresses']
},
'submission_readers': {
Expand All @@ -1296,31 +1302,31 @@ def setup_request_form(self):
'Program chairs and paper authors only',
'Everyone (submissions are public)'
],
'order': 24,
'order': 25,
'default': ['Program chairs and paper authors only'],
'required': True
},
'withdraw_submission_expiration': {
'value-regex': r'^[0-9]{4}\/([1-9]|0[1-9]|1[0-2])\/([1-9]|0[1-9]|[1-2][0-9]|3[0-1])(\s+)?((2[0-3]|[01][0-9]|[0-9]):[0-5][0-9])?(\s+)?$',
'description': 'By when authors can withdraw their submission? Please specify the expiration date in GMT using the following format: YYYY/MM/DD HH:MM(e.g. 2019/01/31 23:59)',
'required': False,
'order': 25
'order': 26
},
'withdrawn_submissions_visibility': {
'description': 'Would you like to make withdrawn submissions public?',
'value-radio': [
'Yes, withdrawn submissions should be made public.',
'No, withdrawn submissions should not be made public.'],
'default': 'No, withdrawn submissions should not be made public.',
'order': 26
'order': 27
},
'withdrawn_submissions_author_anonymity': {
'description': 'Do you want the author indentities revealed for withdrawn papers? Note: Author identities can only be anonymized for Double blind submissions.',
'value-radio': [
'Yes, author identities of withdrawn submissions should be revealed.',
'No, author identities of withdrawn submissions should not be revealed.'],
'default': 'No, author identities of withdrawn submissions should not be revealed.',
'order': 27
'order': 28
},
'email_pcs_for_withdrawn_submissions': {
'description': 'Do you want email notifications to PCs when a submission is withdrawn?',
Expand All @@ -1329,23 +1335,23 @@ def setup_request_form(self):
'No, do not email PCs.'
],
'default': 'No, do not email PCs.',
'order': 28
'order': 29
},
'desk_rejected_submissions_visibility': {
'description': 'Would you like to make desk rejected submissions public?',
'value-radio': [
'Yes, desk rejected submissions should be made public.',
'No, desk rejected submissions should not be made public.'],
'default': 'No, desk rejected submissions should not be made public.',
'order': 29
'order': 30
},
'desk_rejected_submissions_author_anonymity': {
'description': 'Do you want the author indentities revealed for desk rejected submissions? Note: Author identities can only be anonymized for Double blind submissions.',
'value-radio': [
'Yes, author identities of desk rejected submissions should be revealed.',
'No, author identities of desk rejected submissions should not be revealed.'],
'default': 'No, author identities of desk rejected submissions should not be revealed.',
'order': 30
'order': 31
},
'email_pcs_for_desk_rejected_submissions': {
'description': 'Do you want email notifications to PCs when a submission is desk-rejected?',
Expand All @@ -1354,12 +1360,12 @@ def setup_request_form(self):
'No, do not email PCs.'
],
'default': 'No, do not email PCs.',
'order': 31
'order': 32
},
'Expected Submissions': {
'value-regex': '[0-9]*',
'description': 'How many submissions are expected in this venue? Please provide a number.',
'order': 32,
'order': 33,
'required': True
},
'email_pcs_for_new_submissions': {
Expand All @@ -1369,71 +1375,71 @@ def setup_request_form(self):
'No, do not email PCs.'
],
'default': 'No, do not email PCs.',
'order': 33
'order': 34
},
'Other Important Information': {
'value-regex': '[\\S\\s]{1,5000}',
'description': 'Please use this space to clarify any questions for which you could not use any of the provided options, and to clarify any other information that you think we may need.',
'order': 34
'order': 35
},
'How did you hear about us?': {
'value-regex': '.*',
'description': 'Please briefly describe how you heard about OpenReview.',
'order': 35
'order': 36
},
'submission_name': {
'value-regex': '\S*',
'description': 'Enter what you would like to have displayed in the submission button for your venue. Use underscores to represent spaces',
'default': 'Submission',
'order': 36,
'order': 37,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'reviewer_roles': {
'values-regex': '.*',
'default': ['Reviewers'],
'order': 37,
'order': 38,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'area_chair_roles': {
'values-regex': '.*',
'default': ['Area_Chairs'],
'order': 38,
'order': 39,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'senior_area_chair_roles': {
'values-regex': '.*',
'default': ['Senior_Area_Chairs'],
'order': 39,
'order': 40,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'use_recruitment_template': {
'value-radio': ['Yes', 'No'],
'default': 'No',
'order': 40,
'order': 41,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'api_version': {
'description': 'Which API version would you like to use? All new venues should use the latest API version, unless previously discussed. If you are unsure, please select the latest version.',
'value-radio': ['1', '2'],
'default': '2',
'order': 41
'order': 42
},
'include_expertise_selection': {
'value-radio': ['Yes', 'No'],
'default': 'No',
'order': 42,
'order': 43,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
},
'submission_deadline_author_reorder': {
'value-radio': ['Yes', 'No'],
'default': 'No',
'order': 43,
'order': 44,
'required': False,
'hidden': True # Change this value on exception request from the PCs.
}
Expand Down
7 changes: 6 additions & 1 deletion tests/test_iclr_conference_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def test_create_conference(self, client, openreview_client, helpers, profile_man
'How did you hear about us?': 'ML conferences',
'Expected Submissions': '100',
'use_recruitment_template': 'Yes',
'api_version': '2'
'api_version': '2',
'submission_license': 'CC BY-SA 4.0'
}))

helpers.await_queue()
Expand Down Expand Up @@ -204,6 +205,9 @@ def test_submissions(self, client, openreview_client, helpers, test_client):
assert ['ICLR.cc/2024/Conference', '~SomeFirstName_User1', '[email protected]', '[email protected]', '~SAC_ICLROne1'] == submissions[0].readers
assert ['~SomeFirstName_User1', '[email protected]', '[email protected]', '~SAC_ICLROne1'] == submissions[0].content['authorids']['value']

# Check that submission license is same as request form
assert submissions[0].license == 'CC BY-SA 4.0'

authors_group = openreview_client.get_group(id='ICLR.cc/2024/Conference/Authors')

for i in range(1,12):
Expand Down Expand Up @@ -255,6 +259,7 @@ def test_post_submission(self, client, openreview_client, helpers):

submissions = pc_client_v2.get_notes(invitation='ICLR.cc/2024/Conference/-/Submission', sort='number:asc')
assert len(submissions) == 11
assert submissions[0].license == 'CC BY-SA 4.0'
assert submissions[0].readers == ['everyone']
assert '_bibtex' in submissions[0].content
assert 'author={Anonymous}' in submissions[0].content['_bibtex']['value']

0 comments on commit ce61d1a

Please sign in to comment.