Skip to content

Commit

Permalink
Merge pull request #147 from HackRU/tools_and_fixes
Browse files Browse the repository at this point in the history
Tools and Fixes
  • Loading branch information
sahej172002 authored Feb 10, 2021
2 parents 4fbfe41 + 20c72d0 commit 30e787c
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 21 deletions.
38 changes: 38 additions & 0 deletions docs/DayOfChecklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Day of checklist
these are step by step instructions of how to run judging day of for the most part.
this was developed for hackru fall 2020 and was ran remote, so there may be things that need
to be update for when the hackathon is no longer virtual. (like the slack channel script)

**this assumes you've gone through the deploy instructions with aws lightsail**

# The checklist
1. Login to lightsail, delete sledge db (rm data/sledge.db) and restart sledge (sudo systemctl restart sledge)
2. assign table numbers in devpost manage panel
3. run create channels script with the amount of submissions
- Num_tables = number of submissions in script
- Need a slack token (via bot token)
4. Announce table(channel) numbers assigned
5. download csv from devpost manage hackathon>metrics
6. load csv into sledge devpost csv import tab
7. Convert Tracks into tracks
8. Add judges
- Add a few extra no name judges just in case there are some day of don’t know about
9. Add categories
10. Expand categories(try to make sure there is an equal amount per track)
11. Click populate db
12. Click start judging
13. Tell judges to start judging
14. Under admin actions manually assign 2 judges to check out each prize to rank specifically based on that prize
15. Look at visualize ratings and visualize prizes to monitor progress
16. with 30 mins left start considering manually asking judges to compare two hacks on devpost if two hacks are close together in score
- You can use the visualize prizes page to decide who to assign to a prize. This will help you assign a judge that has already seen those hacks
- You can force the ranking assignments to the front of the queue with tools/bump.sh
17. **For f20 we are aiming to send results no later than 2:50 pm est**
18. You can use the following scripts to get data for winners
- tools/topsubmissions: 1st and 2nd place for each track
- tools/topprizes_rankings: 1st place for each prize
- If there is a tie, use the other method to break it
19. Once you have a clear, confident understanding of who won each prize, make a report of which projects won each prize.
20. Make sure no one wins multiple prizes
- Priority: track, superlatives, mlh prize
21. Send report to dayof/directors to announce and setup demos.
5 changes: 2 additions & 3 deletions src/client/apps/VisualizePrizesApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ function prizeTablesFromResponse(res: GetFullScoresResponseData): Array<PrizeTab
for (let i=0;i<res.prizes.length;i++) {
const prize = res.prizes[i];
const statuses: Array<Array<{status: string}>> = res.judges.map(j => []);

for (let eligibleSubmissionIndex of prize.eligibleSubmissions) {
for (let j=0;j<res.judges.length;j++) {
const statusObj = {
status: "JSSTATUS_NONE"
status: "JSSTATUS_NONE"
};

statuses[j].push(statusObj);
Expand All @@ -100,7 +99,7 @@ function prizeTablesFromResponse(res: GetFullScoresResponseData): Array<PrizeTab
for (let status of statuses) {
status.statusObj.status = ass.active ? "JSSTATUS_ACTIVE" : (
ass.noShow ? "JSSTATUS_NOSHOW" : "JSSTATUS_COMPLETE"
);
);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/apps/VisualizeRatingsApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class VisualizeRatingsApp extends Application<VisualizeRatingsAppState> {

loadVisualization() {
this.socket.sendRequest({
requestName: "REQUEST_GET_RATING_SCORES"
requestName: "REQUEST_GET_RATINGS_SCORES"
}).then((response: GetRatingScoresRequestResponseData) => {
this.setState({
lastUpdateTimestamp: Date.now(),
Expand Down
16 changes: 6 additions & 10 deletions src/server/GetRatingScoresRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,19 @@ export class GetRatingScoresRequest implements RequestHandler {
return requestName === "REQUEST_GET_RATINGS_SCORES";
}

simpleValidate(data: any) {
return true;
}

handleSync(data: any): object {
this.db.begin();
const submissions = this.db.prepare(
"SELECT id, name, location FROM Submission ORDER BY id;"
).all();
const judges = this.db.prepare(
"SELECT id, name, anchor FROM Judge ORDER BY id;"
).all();
const assignments = this.db.prepare(
"SELECT "+
"Assignment.judgeId AS judgeId, "+
"Assignment.status AS status, "+
"RatingAssignment.submissionId AS submissionId, "+
"RatingAssignment.rating AS rating "+
"FROM RatingAssignment "+
"LEFT JOIN Assignment ON RatingAssignment.assignmentId=Assignment.id;"
).all();
).all();
const assignments = this.db.prepare("select sum(Rating.answer) as rating, Assignment.judgeId as judgeId, RatingAssignment.submissionId as submissionId, Assignment.status as Status from RatingAssignment, Rating, Assignment where Rating.ratingAssignmentId = RatingAssignment.assignmentId and Rating.ratingAssignmentId = Assignment.id group by Assignment.judgeId, RatingAssignment.submissionId").all();
this.db.commit();

const submissionsIdIndex = createIdIndexMap(submissions);
Expand Down
5 changes: 5 additions & 0 deletions tools/bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
sqlite3 "$1" "$(cat << EOF
update Assignment set priority=priority+100 where type=1;
EOF
)"
6 changes: 6 additions & 0 deletions tools/rank_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
echo "incomple, priority, judgid, judge"
sqlite3 "$1" "$(cat << EOF
SELECT status, priority, judgeid, name from assignment left join judge on assignment.judgeid=judge.id where type=2;
EOF
)"
15 changes: 8 additions & 7 deletions tools/topprizes.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash
sqlite3 "$1" "$(cat << EOF
SELECT Prize.name, SUM(score), Submission.name
FROM Ranking
LEFT JOIN RankingAssignment ON RankingAssignment.id=rankingAssignmentId
LEFT JOIN Submission ON Submission.id=submissionId
LEFT JOIN Prize ON Prize.id=prizeId GROUP BY submissionId, prizeId
HAVING SUM(score)>0
ORDER BY prizeId, SUM(score)
SELECT Prize.name, score, SubmissionPrize.id, Submission.name
FROM Rating
LEFT JOIN RatingAssignment ON RatingAssignment.id=ratingAssignmentId
LEFT JOIN Submission ON Submission.id=RatingAssignment.submissionId
LEFT JOIN SubmissionPrize ON Submission.id=SubmissionPrize.submissionId
LEFT JOIN Prize ON Prize.id=prizeId GROUP BY RatingAssignment.submissionId, prizeId
HAVING score>0
ORDER BY prizeId, score
EOF
)"
12 changes: 12 additions & 0 deletions tools/topprizes_tiebreak.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
sqlite3 "$1" "$(cat << EOF
SELECT Prize.name, AVG(score), SubmissionPrize.submissionId, Submission.name
FROM Rating
LEFT JOIN RatingAssignment ON RatingAssignment.id=ratingAssignmentId
LEFT JOIN Submission ON Submission.id=RatingAssignment.submissionId
LEFT JOIN SubmissionPrize ON Submission.id=SubmissionPrize.submissionId
LEFT JOIN Prize ON Prize.id=prizeId GROUP BY RatingAssignment.submissionId, prizeId
HAVING score>0
ORDER BY prizeId, AVG(score)
EOF
)"

0 comments on commit 30e787c

Please sign in to comment.