Repository navigation
Let competition admins see hidden leaderboard columns - #2748
Merged
Merged
Conversation
…y finished submission's scores
Let competition admins see hidden leaderboard columns
Member
Author
|
Test failure: FAILED src/apps/api/tests/test_leaderboards.py::HiddenColumnScoreTests::test_hidden_column_does_not_change_ranking - assert [155, 154] == [154, 155]
====== 1 failed, 563 passed, 2 skipped, 25 warnings in 503.36s (0:08:23) =======EDIT: this test was introduced by the PR. The problem is that the date of submission are randomly attributed, so the order is random, and the test can fail. I fixed this by fixing the creation date of the later submission in this test. |
Member
Author
Contributor
|
Yeah!! Thanks for the feature, super helpful |
Member
Author
Thank YOU, you initiated this PR! You contribution is greatly appreciated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Original PR: #2709
Description
Hidden leaderboard columns are private to the competition admins (creator,
collaborators, superusers): participants still never see them, and the
admins now do. The organizers can then monitor the private test set during
the challenge, without downloading the scoring output of every submission.
/api/submissions/, list and detail): admins get thehidden scores. Each score now says whether its column is
hidden. Thepermission check is cached per competition, so a list view adds a couple of queries
per competition, not per submission.
/api/phases/<id>/get_leaderboard/and/api/leaderboards/<id>/): admins get the hidden columns and their scores.The ranking still uses the visible columns only, so it is the same for
admins and participants.
/api/competitions/<id>/results.<json|csv|zip>):all_submissions=trueexports every finished submission of the phase, onthe leaderboard or not, with
created_whenandon_leaderboard. Theexport already included hidden columns. It now does so on purpose, and a
test covers it.
download menu has an "All finished submissions (CSV)" entry. The
submissions panel has a "Hidden scores" column, shown only when the API
sent hidden scores, so only to admins.
This reverses part of #2526, which hid these scores from everyone "for
consistency with the columns metadata". Admins could already get them from
the results export and from the scoring output, so this change exposes
nothing new. It makes them usable.
/api/leaderboards/<id>/orders its entries by every column, hidden onesincluded, for everyone. This PR does not change it.
Issues this PR resolves
A checklist for hand testing
/api/submissions/?phase=<id>returns no hidden score.Any relevant files for testing
Any competition with a
hidden: truecolumn in its leaderboard.Checklist