Skip to content

Commit

Permalink
Merge pull request #119 from iesl/fix/builder-api-in-tests
Browse files Browse the repository at this point in the history
update builder API
  • Loading branch information
melisabok authored Aug 5, 2019
2 parents 9e4ebf0 + bc1e84e commit f952325
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ nbconvert==5.5.0
nbformat==4.4.0
nbsphinx==0.4.2
numpy==1.16.3
openreview-py==0.9.18
openreview-py==0.9.24
ortools==7.0.6546
packaging==19.0
pandocfilters==1.4.2
Expand Down
22 changes: 9 additions & 13 deletions tests/helpers/conference_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def __init__ (self, conf_name, year):
# To see UI for this: http://openreview.localhost/assignments?venue=FakeConferenceForTesting.cc/2019/Conference

class ConferenceConfig:


def __init__ (self, client, suffix_num, params):

random.seed(10) # want a reproducible sequence of random numbers
Expand All @@ -38,15 +36,14 @@ def __init__ (self, client, suffix_num, params):
self.config_note = None
self.build_conference()


def build_conference (self):
builder = openreview.conference.ConferenceBuilder(self.client)
builder.set_conference_id(self.conf_ids.CONF_ID)
builder.set_conference_name('Conference for Integration Testing')
builder.set_conference_short_name('Integration Test')
self.conference = builder.get_result()
self.conference.open_submissions(due_date = datetime.datetime(2019, 3, 25, 23, 59),
remove_fields=['authors', 'abstract', 'pdf', 'keywords', 'TL;DR'])
self.conference.set_submission_stage(openreview.SubmissionStage(due_date = datetime.datetime(2019, 3, 25, 23, 59),
remove_fields=['authors', 'abstract', 'pdf', 'keywords', 'TL;DR']))
self.conf_ids.SUBMISSION_ID = self.conference.get_submission_id()
self.conference.has_area_chairs(True)
self.conference.set_program_chairs(emails=[])
Expand All @@ -64,14 +61,13 @@ def customize_invitations (self):
# replace the default score_names that builder gave with the ones I want
config_inv = self.client.get_invitation(id=self.get_assignment_configuration_id())
if config_inv:
content = config_inv.reply['content']
del content['scores_names']
content["scores_names"] = {
"values-dropdown": self.params.scores_config[Params.SCORE_NAMES_LIST],
"required": True,
"description": "List of scores names",
"order": 3
}
config_inv.reply['content']['scores_names'] = {
'values-dropdown': self.params.scores_config[Params.SCORE_NAMES_LIST],
'required': True,
'description': 'List of scores names',
'order': 3
}

self.client.post_invitation(config_inv)

def gen_scores (self):
Expand Down

0 comments on commit f952325

Please sign in to comment.