Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement contest settings short display #1732

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

Ninjaclasher
Copy link
Member

@Ninjaclasher Ninjaclasher commented Jun 19, 2021

This fixes #695 and supercedes #700.

We add an option to turn off this short display so that information is not duplicated for existing contests.

Todo:

  • Add contest format-specific information.

@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2021

Codecov Report

Merging #1732 (5fa23a8) into master (64da46b) will decrease coverage by 0.06%.
The diff coverage is 34.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1732      +/-   ##
==========================================
- Coverage   46.52%   46.45%   -0.07%     
==========================================
  Files         221      222       +1     
  Lines       12461    12505      +44     
==========================================
+ Hits         5797     5809      +12     
- Misses       6664     6696      +32     
Impacted Files Coverage Δ
judge/admin/contest.py 44.97% <ø> (ø)
judge/views/contests.py 29.90% <0.00%> (-0.06%) ⬇️
judge/contest_format/ecoo.py 28.57% <16.66%> (-3.25%) ⬇️
judge/contest_format/atcoder.py 30.98% <28.57%> (-1.33%) ⬇️
judge/contest_format/icpc.py 28.75% <28.57%> (-0.98%) ⬇️
judge/contest_format/ioi.py 26.82% <28.57%> (-0.95%) ⬇️
judge/contest_format/legacy_ioi.py 35.59% <33.33%> (-1.45%) ⬇️
judge/contest_format/base.py 60.60% <50.00%> (-0.69%) ⬇️
judge/contest_format/default.py 81.25% <50.00%> (-3.20%) ⬇️
...udge/migrations/0123_contest_show_short_display.py 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64da46b...5fa23a8. Read the comment docs.

@Ninjaclasher Ninjaclasher force-pushed the contest-short-display branch 3 times, most recently from fe9643a to d4e2a5b Compare June 19, 2021 15:30
@Ninjaclasher Ninjaclasher marked this pull request as ready for review June 19, 2021 15:31
@Ninjaclasher
Copy link
Member Author

Screenshot:
image

Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential i18n problems are pain~~

**self.object.contest_problems
.annotate(
partials_enabled=F('partial').bitand(F('problem__partial')),
pretests_enabled=F('is_pretested').bitand(F('contest__run_pretests_only')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone confirm that this will work even after systesting? cc @Xyene @quantum5

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unfortunately won't be correct after systests, but I don't see any way to correctly grab that information after the settings are unchecked. FWIW this is also how it was done in #700, so it might be fine (?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a defect in the design of the pretest system. What we really want is two different booleans, but that's out of scope here.

@Ninjaclasher Ninjaclasher force-pushed the contest-short-display branch from d4e2a5b to 15925c4 Compare June 19, 2021 15:44
Copy link
Contributor

@maxcruickshanks maxcruickshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo for penalties: Each submission before the first maximum score submission with incur a **penalty of %d minute**.. It should be will incur instead of with incur.

Markdown is not capitalized: Returns a generator of markdown strings.

A is not supposed to be capitalized: :return A generator, where each item is an individual line.

The scoreboard will be **hidden** for the duration of the contest. seems vague.
Roger's potential replacement: the entire duration of the contest.

@Ninjaclasher Ninjaclasher force-pushed the contest-short-display branch from 15925c4 to 26a931b Compare June 26, 2021 15:09
@Ninjaclasher
Copy link
Member Author

There is a typo for penalties: Each submission before the first maximum score submission with incur a **penalty of %d minute**.. It should be will incur instead of with incur.

Fixed.

Markdown is not capitalized: Returns a generator of markdown strings.

Fixed.

A is not supposed to be capitalized: :return A generator, where each item is an individual line.

The A is supposed to be captialized (see the other docstrings). However, I was missing a : after :return, which is now added.

The scoreboard will be **hidden** for the duration of the contest. seems vague.
Roger's potential replacement: the entire duration of the contest.

Updated

Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ninjaclasher Ninjaclasher requested a review from quantum5 July 5, 2021 00:35
Copy link
Member

@quantum5 quantum5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, will deploy after current rated contest finishes.

@Ninjaclasher Ninjaclasher force-pushed the contest-short-display branch from 26a931b to 5fa23a8 Compare August 12, 2021 00:57
@Ninjaclasher
Copy link
Member Author

Rebased migration.

@Ninjaclasher Ninjaclasher force-pushed the contest-short-display branch from 5fa23a8 to 98008de Compare August 20, 2021 02:38
@Ninjaclasher
Copy link
Member Author

Rebased migration again.

@quantum5 quantum5 merged commit bf850f7 into DMOJ:master Aug 20, 2021
@Ninjaclasher Ninjaclasher deleted the contest-short-display branch March 20, 2022 22:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contest settings short display
5 participants