diff --git a/openreview/api/client.py b/openreview/api/client.py index f5cdb4610..06b3dcf1e 100644 --- a/openreview/api/client.py +++ b/openreview/api/client.py @@ -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 @@ -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()]) @@ -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 @@ -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 diff --git a/openreview/conference/helpers.py b/openreview/conference/helpers.py index 53b5fed32..f4c2db55f 100644 --- a/openreview/conference/helpers.py +++ b/openreview/conference/helpers.py @@ -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') diff --git a/openreview/stages/venue_stages.py b/openreview/stages/venue_stages.py index 42e7c538b..0d8ed980f 100644 --- a/openreview/stages/venue_stages.py +++ b/openreview/stages/venue_stages.py @@ -313,7 +313,7 @@ def get_content(self, api_version='1', conference=None, venue_id=None): 'hidden': True } } - } + } return content diff --git a/openreview/venue/invitation.py b/openreview/venue/invitation.py index 2c8c1af5f..dfe09f930 100644 --- a/openreview/venue/invitation.py +++ b/openreview/venue/invitation.py @@ -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()) @@ -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): diff --git a/openreview/venue/venue.py b/openreview/venue/venue.py index 61967f58e..a8ca20c2d 100644 --- a/openreview/venue/venue.py +++ b/openreview/venue/venue.py @@ -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 diff --git a/openreview/venue_request/venue_request.py b/openreview/venue_request/venue_request.py index 5e619a462..ce3fdd42e 100644 --- a/openreview/venue_request/venue_request.py +++ b/openreview/venue_request/venue_request.py @@ -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, @@ -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': { @@ -1219,7 +1225,7 @@ def setup_request_form(self): 'Single-blind (Reviewers are anonymous)', 'No anonymity' ], - 'order': 18, + 'order': 19, 'required': True }, 'reviewer_identity': { @@ -1234,7 +1240,7 @@ def setup_request_form(self): 'Assigned Reviewers' ], 'default': ['Program Chairs'], - 'order': 19, + 'order': 20, 'required': False }, 'area_chair_identity': { @@ -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': { @@ -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': { @@ -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 }, @@ -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': { @@ -1296,7 +1302,7 @@ 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 }, @@ -1304,7 +1310,7 @@ def setup_request_form(self): '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?', @@ -1312,7 +1318,7 @@ def setup_request_form(self): '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.', @@ -1320,7 +1326,7 @@ def setup_request_form(self): '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?', @@ -1329,7 +1335,7 @@ 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?', @@ -1337,7 +1343,7 @@ def setup_request_form(self): '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.', @@ -1345,7 +1351,7 @@ def setup_request_form(self): '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?', @@ -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': { @@ -1369,51 +1375,51 @@ 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. }, @@ -1421,19 +1427,19 @@ def setup_request_form(self): '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. } diff --git a/tests/test_iclr_conference_v2.py b/tests/test_iclr_conference_v2.py index bc7de4d92..7e1b5e0a7 100644 --- a/tests/test_iclr_conference_v2.py +++ b/tests/test_iclr_conference_v2.py @@ -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() @@ -204,6 +205,9 @@ def test_submissions(self, client, openreview_client, helpers, test_client): assert ['ICLR.cc/2024/Conference', '~SomeFirstName_User1', 'peter@mail.com', 'andrew@amazon.com', '~SAC_ICLROne1'] == submissions[0].readers assert ['~SomeFirstName_User1', 'peter@mail.com', 'andrew@amazon.com', '~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): @@ -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'] \ No newline at end of file