From 873fd2af72f72c91fd0db5ff4d8c3ff0f589bd04 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Nov 2020 13:41:27 +0000 Subject: [PATCH 1/5] judging visualzation improvements --- src/client/apps/VisualizePrizesApp.ts | 10 ++++++---- src/client/apps/VisualizeRatingsApp.ts | 2 +- src/client/components/VisualizePrizesPage.tsx | 3 ++- src/server/GetRatingScoresRequest.ts | 17 +++++++---------- tools/topprizes.sh | 15 ++++++++------- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/client/apps/VisualizePrizesApp.ts b/src/client/apps/VisualizePrizesApp.ts index 7afd4321..9205de02 100644 --- a/src/client/apps/VisualizePrizesApp.ts +++ b/src/client/apps/VisualizePrizesApp.ts @@ -69,12 +69,13 @@ function prizeTablesFromResponse(res: GetFullScoresResponseData): Array = []; for (let i=0;i> = res.judges.map(j => []); - + const statuses: Array> = res.judges.map(j => []); + console.log(statuses); for (let eligibleSubmissionIndex of prize.eligibleSubmissions) { for (let j=0;j { loadVisualization() { this.socket.sendRequest({ - requestName: "REQUEST_GET_RATING_SCORES" + requestName: "REQUEST_GET_RATINGS_SCORES" }).then((response: GetRatingScoresRequestResponseData) => { this.setState({ lastUpdateTimestamp: Date.now(), diff --git a/src/client/components/VisualizePrizesPage.tsx b/src/client/components/VisualizePrizesPage.tsx index 88335a26..49bf8e7b 100644 --- a/src/client/components/VisualizePrizesPage.tsx +++ b/src/client/components/VisualizePrizesPage.tsx @@ -28,7 +28,7 @@ export const VisualizePrizesPage = (props: VisualizePrizesPageProps) => ( key={li} style={{background: colorFromStatus(pt.statuses[ji][li])}} > - {' '} + {(() => { console.log(pt.statuses[ji][li]); return pt.statuses[ji][li].score; })()} ))} @@ -69,4 +69,5 @@ export interface PrizeTable { export interface JudgeSubmissionStatus { status: string; + score: string; }; diff --git a/src/server/GetRatingScoresRequest.ts b/src/server/GetRatingScoresRequest.ts index 35d5c27c..4c8c1a33 100644 --- a/src/server/GetRatingScoresRequest.ts +++ b/src/server/GetRatingScoresRequest.ts @@ -14,6 +14,10 @@ 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( @@ -21,16 +25,9 @@ export class GetRatingScoresRequest implements RequestHandler { ).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 Assignment.judgeId AS judgeId, Assignment.status AS status, RatingAssignment.submissionId as submissionId, sum(Rating.answer) as rating from RatingAssignment, Rating left join Assignment ON RatingAssignment.assignmentId=Assignment.id where RatingAssignment.assignmentId=Rating.answer group by RatingAssignment.assignmentId").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); diff --git a/tools/topprizes.sh b/tools/topprizes.sh index 2daa1733..9ddab972 100755 --- a/tools/topprizes.sh +++ b/tools/topprizes.sh @@ -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 )" From 47da1e65e501e6f326dce2500de2832b0ac6c383 Mon Sep 17 00:00:00 2001 From: mjrb Date: Sun, 8 Nov 2020 14:02:02 +0000 Subject: [PATCH 2/5] judging visualzation improvements --- src/client/apps/VisualizePrizesApp.ts | 10 ++++++---- src/client/apps/VisualizeRatingsApp.ts | 2 +- src/client/components/VisualizePrizesPage.tsx | 3 ++- src/server/GetRatingScoresRequest.ts | 17 +++++++---------- tools/topprizes.sh | 15 ++++++++------- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/client/apps/VisualizePrizesApp.ts b/src/client/apps/VisualizePrizesApp.ts index 7afd4321..9205de02 100644 --- a/src/client/apps/VisualizePrizesApp.ts +++ b/src/client/apps/VisualizePrizesApp.ts @@ -69,12 +69,13 @@ function prizeTablesFromResponse(res: GetFullScoresResponseData): Array = []; for (let i=0;i> = res.judges.map(j => []); - + const statuses: Array> = res.judges.map(j => []); + console.log(statuses); for (let eligibleSubmissionIndex of prize.eligibleSubmissions) { for (let j=0;j { loadVisualization() { this.socket.sendRequest({ - requestName: "REQUEST_GET_RATING_SCORES" + requestName: "REQUEST_GET_RATINGS_SCORES" }).then((response: GetRatingScoresRequestResponseData) => { this.setState({ lastUpdateTimestamp: Date.now(), diff --git a/src/client/components/VisualizePrizesPage.tsx b/src/client/components/VisualizePrizesPage.tsx index 88335a26..49bf8e7b 100644 --- a/src/client/components/VisualizePrizesPage.tsx +++ b/src/client/components/VisualizePrizesPage.tsx @@ -28,7 +28,7 @@ export const VisualizePrizesPage = (props: VisualizePrizesPageProps) => ( key={li} style={{background: colorFromStatus(pt.statuses[ji][li])}} > - {' '} + {(() => { console.log(pt.statuses[ji][li]); return pt.statuses[ji][li].score; })()} ))} @@ -69,4 +69,5 @@ export interface PrizeTable { export interface JudgeSubmissionStatus { status: string; + score: string; }; diff --git a/src/server/GetRatingScoresRequest.ts b/src/server/GetRatingScoresRequest.ts index 35d5c27c..4c8c1a33 100644 --- a/src/server/GetRatingScoresRequest.ts +++ b/src/server/GetRatingScoresRequest.ts @@ -14,6 +14,10 @@ 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( @@ -21,16 +25,9 @@ export class GetRatingScoresRequest implements RequestHandler { ).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 Assignment.judgeId AS judgeId, Assignment.status AS status, RatingAssignment.submissionId as submissionId, sum(Rating.answer) as rating from RatingAssignment, Rating left join Assignment ON RatingAssignment.assignmentId=Assignment.id where RatingAssignment.assignmentId=Rating.answer group by RatingAssignment.assignmentId").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); diff --git a/tools/topprizes.sh b/tools/topprizes.sh index 2daa1733..9ddab972 100755 --- a/tools/topprizes.sh +++ b/tools/topprizes.sh @@ -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 )" From d7c6506c6b55dd2c5e9cd71320fe245b819b6665 Mon Sep 17 00:00:00 2001 From: mjrb Date: Mon, 16 Nov 2020 19:05:08 +0000 Subject: [PATCH 3/5] tools f2020 --- tools/bump.sh | 5 +++++ tools/rank_status.sh | 6 ++++++ tools/topprizes.sh | 15 +++++++-------- tools/topprizes_tiebreak.sh | 12 ++++++++++++ 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100755 tools/bump.sh create mode 100755 tools/rank_status.sh create mode 100755 tools/topprizes_tiebreak.sh diff --git a/tools/bump.sh b/tools/bump.sh new file mode 100755 index 00000000..21395c5b --- /dev/null +++ b/tools/bump.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +sqlite3 "$1" "$(cat << EOF +update Assignment set priority=priority+100 where type=1; +EOF +)" diff --git a/tools/rank_status.sh b/tools/rank_status.sh new file mode 100755 index 00000000..4ade03e7 --- /dev/null +++ b/tools/rank_status.sh @@ -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 +)" diff --git a/tools/topprizes.sh b/tools/topprizes.sh index 9ddab972..2daa1733 100755 --- a/tools/topprizes.sh +++ b/tools/topprizes.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash sqlite3 "$1" "$(cat << EOF -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 +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) EOF )" diff --git a/tools/topprizes_tiebreak.sh b/tools/topprizes_tiebreak.sh new file mode 100755 index 00000000..66c3b4ad --- /dev/null +++ b/tools/topprizes_tiebreak.sh @@ -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 +)" From f4a60a6a5f5f9bf911c732fb9e4ca47e8c56295c Mon Sep 17 00:00:00 2001 From: mjrb Date: Mon, 16 Nov 2020 16:16:04 -0500 Subject: [PATCH 4/5] revert some ui changes --- src/client/apps/VisualizePrizesApp.ts | 9 +++------ src/client/components/VisualizePrizesPage.tsx | 3 +-- src/server/GetRatingScoresRequest.ts | 1 - 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/client/apps/VisualizePrizesApp.ts b/src/client/apps/VisualizePrizesApp.ts index 9205de02..af4daee0 100644 --- a/src/client/apps/VisualizePrizesApp.ts +++ b/src/client/apps/VisualizePrizesApp.ts @@ -69,13 +69,11 @@ function prizeTablesFromResponse(res: GetFullScoresResponseData): Array = []; for (let i=0;i> = res.judges.map(j => []); - console.log(statuses); + const statuses: Array> = res.judges.map(j => []); for (let eligibleSubmissionIndex of prize.eligibleSubmissions) { for (let j=0;j ( key={li} style={{background: colorFromStatus(pt.statuses[ji][li])}} > - {(() => { console.log(pt.statuses[ji][li]); return pt.statuses[ji][li].score; })()} + {' '} ))} @@ -69,5 +69,4 @@ export interface PrizeTable { export interface JudgeSubmissionStatus { status: string; - score: string; }; diff --git a/src/server/GetRatingScoresRequest.ts b/src/server/GetRatingScoresRequest.ts index 4c8c1a33..7b72a64d 100644 --- a/src/server/GetRatingScoresRequest.ts +++ b/src/server/GetRatingScoresRequest.ts @@ -26,7 +26,6 @@ export class GetRatingScoresRequest implements RequestHandler { 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, sum(Rating.answer) as rating from RatingAssignment, Rating left join Assignment ON RatingAssignment.assignmentId=Assignment.id where RatingAssignment.assignmentId=Rating.answer group by RatingAssignment.assignmentId").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(); From 158d56615041c93aab543a4bfb69ee7773341afe Mon Sep 17 00:00:00 2001 From: mjrb Date: Mon, 16 Nov 2020 16:54:57 -0500 Subject: [PATCH 5/5] add dayof checklist --- docs/DayOfChecklist.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/DayOfChecklist.md diff --git a/docs/DayOfChecklist.md b/docs/DayOfChecklist.md new file mode 100644 index 00000000..85477c04 --- /dev/null +++ b/docs/DayOfChecklist.md @@ -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.