-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
executable file
·35 lines (31 loc) · 1.11 KB
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
from time import sleep
from serial.serialutil import SerialException
from datetime import datetime
from devrace.git_trial import PullRequestTrial, _reset_trial
from devrace.contest import Contest, Player
from devrace.scoreboard import PeggyScoreboard, PrintingScoreboard
if __name__ == '__main__':
_reset_trial()
players = [
Player('christy', {'github_login': 'c-oreills'}),
Player('colin', {'github_login': 'colinhowe'}),
Player('gareth', {'github_login': 'gareth-lloyd'}),
Player('gehan', {'github_login': 'gehan'}),
Player('henrique', {'github_login': 'hjrnunes'}),
Player('james', {'github_login': 'jmslovatt'}),
]
trials = [
PullRequestTrial('conversocial', 'conversocial')
]
contest = Contest(players, trials)
try:
scoreboard = PeggyScoreboard()
except SerialException:
scoreboard = PrintingScoreboard()
while True:
contest.run_trials()
for player in players:
print player.name, ':', len(player.achievements)
scoreboard.update_scores(contest)
sleep(10)