From d5dae9bf727f08db2f4940f787f8fb7ca338fc11 Mon Sep 17 00:00:00 2001 From: Teymour Aldridge Date: Mon, 27 Jan 2025 06:36:53 +0100 Subject: [PATCH 1/2] Add draw pullup penalty preference. --- tabbycat/options/preferences.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tabbycat/options/preferences.py b/tabbycat/options/preferences.py index 6b669766736..02b5b74da4a 100644 --- a/tabbycat/options/preferences.py +++ b/tabbycat/options/preferences.py @@ -214,6 +214,7 @@ class DrawOddBracket(ChoicePreference): section = draw_rules name = 'draw_odd_bracket' choices = ( + ('pullup_lowest_ds_rank', _("Pull up from the lowest draw strength by rank.")), ('pullup_top', _("Pull up from top")), ('pullup_bottom', _("Pull up from bottom")), ('pullup_middle', _("Pull up from middle")), @@ -288,6 +289,15 @@ class DrawPullupRestriction(ChoicePreference): default = 'none' +@tournament_preferences_registry.register +class DrawPullupPenalty(IntegerPreference): + help_text = _("Penalty applied by minimum cost matching to prefer pullups.") + verbose_name = _("Pullup penalty") + section = draw_rules + name = 'draw_pullup_penalty' + default = 0 + + @tournament_preferences_registry.register class BPPullupDistribution(ChoicePreference): help_text = _("In BP, how pullups are distributed. Only \"Anywhere\" is WUDC-compliant.") From 50e8e652d3ff0c495d90273296bf4c3532fb5fee Mon Sep 17 00:00:00 2001 From: Teymour Aldridge Date: Mon, 3 Feb 2025 15:59:41 +0000 Subject: [PATCH 2/2] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Étienne Beaulé --- tabbycat/options/preferences.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbycat/options/preferences.py b/tabbycat/options/preferences.py index 02b5b74da4a..a52c64372bd 100644 --- a/tabbycat/options/preferences.py +++ b/tabbycat/options/preferences.py @@ -214,7 +214,7 @@ class DrawOddBracket(ChoicePreference): section = draw_rules name = 'draw_odd_bracket' choices = ( - ('pullup_lowest_ds_rank', _("Pull up from the lowest draw strength by rank.")), + ('pullup_lowest_ds_rank', _("Pull up from the lowest draw strength by rank")), ('pullup_top', _("Pull up from top")), ('pullup_bottom', _("Pull up from bottom")), ('pullup_middle', _("Pull up from middle")), @@ -291,7 +291,7 @@ class DrawPullupRestriction(ChoicePreference): @tournament_preferences_registry.register class DrawPullupPenalty(IntegerPreference): - help_text = _("Penalty applied by minimum cost matching to prefer pullups.") + help_text = _("Penalty applied when determining which teams to pull up (for minimum cost matching)") verbose_name = _("Pullup penalty") section = draw_rules name = 'draw_pullup_penalty'