diff --git a/CHANGELOG.md b/CHANGELOG.md index 1059b0b..cd603f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#149](https://github.com/jatkinson1000/archeryutils/pull/149) - Addition of new WA rounds for Under 15 category and updating of prestige rounds for outdoor classifications accordingly in [#167](https://github.com/jatkinson1000/archeryutils/pull/167). +- Protection against repeated scores in classification tables in [#170](https://github.com/jatkinson1000/archeryutils/pull/170). + Only changes Under 12 Longbow New Warwick but guards for any future changes. ### Changed @@ -36,6 +38,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Consistent treatment of AGB classifications where there are gaps in the handicap tables. Outdoor and Field updated to match Indoor as part of 2026 Update in [#168](https://github.com/jatkinson1000/archeryutils/pull/168) +- Score changes in Under 12 Longbow New Warwick removing repeated scores from + [#170](https://github.com/jatkinson1000/archeryutils/pull/170). ### Fixes diff --git a/archeryutils/classifications/agb_field_classifications.py b/archeryutils/classifications/agb_field_classifications.py index facc73f..329c7f5 100644 --- a/archeryutils/classifications/agb_field_classifications.py +++ b/archeryutils/classifications/agb_field_classifications.py @@ -595,4 +595,9 @@ def agb_field_classification_scores( else: int_class_scores[i] += 1 + # Finally, ensure that there are no repeated scores. + int_class_scores = cls_funcs.fix_repeated_scores( + int_class_scores, archery_round.max_score() + ) + return int_class_scores diff --git a/archeryutils/classifications/agb_indoor_classifications.py b/archeryutils/classifications/agb_indoor_classifications.py index 240fb6a..4aa5e4f 100644 --- a/archeryutils/classifications/agb_indoor_classifications.py +++ b/archeryutils/classifications/agb_indoor_classifications.py @@ -491,4 +491,9 @@ def agb_indoor_classification_scores( else: int_class_scores[i] += 1 + # Finally, ensure that there are no repeated scores. + int_class_scores = cls_funcs.fix_repeated_scores( + int_class_scores, archery_round.max_score() + ) + return int_class_scores diff --git a/archeryutils/classifications/agb_outdoor_classifications.py b/archeryutils/classifications/agb_outdoor_classifications.py index 0d48c63..5686d25 100644 --- a/archeryutils/classifications/agb_outdoor_classifications.py +++ b/archeryutils/classifications/agb_outdoor_classifications.py @@ -741,4 +741,9 @@ def agb_outdoor_classification_scores( else: int_class_scores[i] += 1 + # Finally, ensure that there are no repeated scores. + int_class_scores = cls_funcs.fix_repeated_scores( + int_class_scores, archery_round.max_score() + ) + return int_class_scores diff --git a/archeryutils/classifications/classification_utils.py b/archeryutils/classifications/classification_utils.py index 8dda8d2..0b4d7d3 100644 --- a/archeryutils/classifications/classification_utils.py +++ b/archeryutils/classifications/classification_utils.py @@ -359,3 +359,39 @@ def get_compound_codename(round_codename: str) -> str: round_codename = convert_dict[round_codename] return round_codename + + +def fix_repeated_scores(scores: list[int], max_score: float) -> list[int]: + """ + Check for repeated scores in a classification table and fix where needed. + + Forces at least 1 point separation between classes, increasing where needed up to + maximum score. + + Parameters + ---------- + scores : list[int] + A set of classification scores from high to low + max_score : float + The maximum possible score on the round in question + + Returns + ------- + list[int] + Amended classification scores with no repeated values + """ + for i in range(len(scores) - 1, 0, -1): + # If previous score is invalid then set the rest to invalid + if scores[i] < 0: + scores[i - 1] = -9999 + # Is the next score (i-1) valid and equal (or below) the previous score (i)? + # If so handle. Previously + elif scores[i - 1] <= scores[i] and scores[i - 1] >= 0: + # If already at max score set rest to invalid + if scores[i] == max_score: + scores[i - 1] = -9999 + # Increment previous score by 1 for new distinct threshold + else: + scores[i - 1] = scores[i] + 1 + + return scores diff --git a/tests/regression/__snapshots__/test_classifications.ambr b/tests/regression/__snapshots__/test_classifications.ambr index 1e705de..0e6b30f 100644 --- a/tests/regression/__snapshots__/test_classifications.ambr +++ b/tests/regression/__snapshots__/test_classifications.ambr @@ -690,7 +690,7 @@ '{"york": [923, 809, 684, 555, 432, 325, 236, 167, 116], "hereford": [1057, 969, 863, 742, 614, 487, 370, 272, 194], "bristol_i": [1057, 969, 863, 742, 614, 487, 370, 272, 194], "bristol_ii": [1158, 1093, 1012, 914, 797, 668, 536, 412, 305], "bristol_iii": [1217, 1167, 1104, 1026, 931, 818, 692, 562, 438], "bristol_iv": [1263, 1232, 1188, 1132, 1061, 974, 870, 751, 624], "bristol_v": [1290, 1277, 1254, 1221, 1177, 1121, 1050, 963, 859], "st_george": [-9999, -9999, -9999, 468, 374, 287, 213, 153, 107], "albion": [-9999, -9999, -9999, 600, 506, 410, 318, 237, 172], "windsor": [-9999, -9999, -9999, 714, 632, 539, 441, 345, 259], "windsor_50": [-9999, -9999, -9999, 797, 731, 653, 564, 468, 373], "windsor_40": [-9999, -9999, -9999, 874, 827, 769, 698, 617, 527], "windsor_30": [-9999, -9999, -9999, 932, 907, 874, 831, 776, 709], "new_western": [-9999, -9999, -9999, 345, 262, 193, 137, 96, 66], "long_western": [-9999, -9999, -9999, 482, 394, 309, 232, 168, 119], "western": [-9999, -9999, -9999, 597, 517, 428, 339, 257, 187], "western_50": [-9999, -9999, -9999, 673, 607, 528, 441, 352, 268], "western_40": [-9999, -9999, -9999, 745, 695, 633, 560, 476, 387], "western_30": [-9999, -9999, -9999, 811, 777, 735, 682, 619, 544], "american": [-9999, -9999, -9999, 595, 527, 449, 367, 288, 216], "st_nicholas": [-9999, -9999, -9999, 647, 602, 548, 482, 408, 330], "new_national": [-9999, -9999, -9999, 243, 183, 134, 95, 66, 45], "long_national": [-9999, -9999, -9999, 343, 276, 214, 159, 114, 80], "national": [-9999, -9999, -9999, 438, 376, 309, 243, 183, 133], "national_50": [-9999, -9999, -9999, 495, 444, 383, 317, 250, 189], "national_40": [-9999, -9999, -9999, 550, 510, 462, 404, 340, 273], "national_30": [-9999, -9999, -9999, 600, 573, 539, 497, 446, 387], "new_warwick": [-9999, -9999, -9999, 173, 131, 97, 69, 48, 33], "long_warwick": [-9999, -9999, -9999, 241, 197, 155, 116, 84, 60], "warwick": [-9999, -9999, -9999, 299, 259, 214, 170, 129, 94], "warwick_50": [-9999, -9999, -9999, 337, 304, 264, 221, 176, 134], "warwick_40": [-9999, -9999, -9999, 373, 348, 317, 280, 238, 194], "warwick_30": [-9999, -9999, -9999, 406, 389, 368, 341, 310, 272], "metric_i": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "metric_ii": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "metric_iii": [1286, 1233, 1167, 1086, 988, 870, 738, 601, 469], "metric_iv": [1359, 1325, 1281, 1227, 1160, 1078, 979, 865, 740], "metric_v": [1400, 1375, 1343, 1303, 1254, 1193, 1118, 1026, 918], "long_metric_90": [-9999, -9999, -9999, 299, 232, 172, 124, 87, 60], "long_metric_70": [-9999, -9999, -9999, 388, 316, 246, 184, 133, 93], "long_metric_i": [-9999, -9999, -9999, 388, 316, 246, 184, 133, 93], "long_metric_ii": [-9999, -9999, -9999, 453, 387, 316, 246, 184, 133], "long_metric_iii": [-9999, -9999, -9999, 517, 462, 398, 327, 257, 194], "long_metric_iv": [-9999, -9999, -9999, 577, 536, 485, 424, 357, 286], "long_metric_v": [-9999, -9999, -9999, 634, 605, 570, 527, 474, 413], "short_metric": [-9999, -9999, -9999, 440, 377, 312, 248, 189, 139], "short_metric_i": [-9999, -9999, -9999, 440, 377, 312, 248, 189, 139], "short_metric_ii": [-9999, -9999, -9999, 484, 423, 355, 285, 218, 161], "short_metric_iii": [-9999, -9999, -9999, 570, 526, 473, 412, 344, 276], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 593, 555, 509, 454], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 592, 553, 505], "metric_122_50": [-9999, -9999, -9999, 486, 424, 354, 282, 214, 156], "metric_122_40": [-9999, -9999, -9999, 548, 500, 441, 373, 300, 231], "metric_122_30": [-9999, -9999, -9999, 607, 572, 529, 476, 413, 342], "metric_80_50": [536, 485, 423, 353, 280, 212, 155, 110, 76], "metric_80_40": [588, 548, 499, 440, 371, 299, 229, 169, 120], "metric_80_30": [636, 607, 572, 528, 475, 411, 340, 268, 202], "agb900_70": [-9999, -9999, -9999, 525, 440, 353, 270, 199, 143], "agb900_60": [-9999, -9999, -9999, 606, 531, 447, 360, 278, 206], "agb900_50": [-9999, -9999, -9999, 683, 623, 552, 471, 386, 304], "agb900_40": [-9999, -9999, -9999, 757, 712, 659, 594, 520, 440], "agb900_30": [-9999, -9999, -9999, 824, 796, 761, 718, 666, 605], "wa1440_90": [1081, 982, 866, 739, 609, 484, 371, 276, 199], "wa1440_70": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "wa1440_60": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "wa1440_90_small": [1081, 982, 866, 739, 609, 484, 371, 276, 199], "wa1440_70_small": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "wa1440_60_small": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "wa720_70": [-9999, -9999, -9999, 355, 283, 215, 157, 112, 78], "wa720_60": [-9999, -9999, -9999, 420, 350, 277, 210, 153, 109], "wa720_40": [-9999, -9999, -9999, 548, 500, 441, 373, 300, 231], "wa720_50_c": [536, 485, 423, 353, 280, 212, 155, 110, 76], "wa720_40_c": [588, 548, 499, 440, 371, 299, 229, 169, 120], "wa720_50_b": [-9999, -9999, -9999, 486, 424, 354, 282, 214, 156], "wa720_30_b": [-9999, -9999, -9999, 607, 572, 529, 476, 413, 342], "wa900": [-9999, -9999, -9999, 606, 531, 447, 360, 278, 206]}' # --- # name: test_outdoor_classification_scores[AGB_ages.UNDER_12-AGB_genders.FEMALE-AGB_bowstyles.LONGBOW] - '{"york": [103, 70, 47, 32, 22, 15, 10, 7, 5], "hereford": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_i": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_ii": [274, 195, 136, 93, 63, 43, 29, 19, 13], "bristol_iii": [399, 296, 213, 149, 103, 70, 48, 32, 22], "bristol_iv": [582, 460, 351, 259, 186, 130, 90, 61, 42], "bristol_v": [821, 704, 585, 473, 372, 285, 213, 155, 110], "st_george": [-9999, -9999, -9999, 30, 20, 14, 10, 7, 5], "albion": [-9999, -9999, -9999, 50, 34, 23, 15, 11, 8], "windsor": [-9999, -9999, -9999, 82, 56, 38, 25, 17, 12], "windsor_50": [-9999, -9999, -9999, 134, 93, 64, 44, 29, 20], "windsor_40": [-9999, -9999, -9999, 239, 175, 125, 87, 60, 41], "windsor_30": [-9999, -9999, -9999, 441, 362, 288, 222, 166, 120], "new_western": [-9999, -9999, -9999, 18, 12, 9, 6, 5, 4], "long_western": [-9999, -9999, -9999, 34, 23, 15, 11, 8, 6], "western": [-9999, -9999, -9999, 56, 38, 25, 17, 12, 8], "western_50": [-9999, -9999, -9999, 87, 59, 40, 27, 18, 13], "western_40": [-9999, -9999, -9999, 146, 102, 70, 48, 32, 22], "western_30": [-9999, -9999, -9999, 266, 197, 141, 99, 68, 47], "american": [-9999, -9999, -9999, 68, 47, 32, 21, 14, 10], "st_nicholas": [-9999, -9999, -9999, 123, 86, 59, 40, 27, 18], "new_national": [-9999, -9999, -9999, 13, 9, 6, 5, 4, 3], "long_national": [-9999, -9999, -9999, 23, 15, 11, 8, 6, 4], "national": [-9999, -9999, -9999, 39, 27, 18, 12, 9, 6], "national_50": [-9999, -9999, -9999, 60, 41, 28, 19, 13, 9], "national_40": [-9999, -9999, -9999, 100, 69, 48, 32, 22, 15], "national_30": [-9999, -9999, -9999, 179, 131, 93, 65, 45, 31], "new_warwick": [-9999, -9999, -9999, 10, 7, 5, 4, 3, 3], "long_warwick": [-9999, -9999, -9999, 17, 12, 8, 6, 5, 4], "warwick": [-9999, -9999, -9999, 28, 19, 13, 9, 7, 5], "warwick_50": [-9999, -9999, -9999, 44, 30, 20, 14, 10, 7], "warwick_40": [-9999, -9999, -9999, 73, 51, 35, 24, 16, 11], "warwick_30": [-9999, -9999, -9999, 133, 99, 71, 50, 34, 24], "metric_i": [207, 145, 100, 68, 46, 31, 21, 14, 10], "metric_ii": [262, 185, 128, 87, 59, 40, 27, 18, 12], "metric_iii": [428, 318, 229, 161, 111, 76, 51, 34, 23], "metric_iv": [698, 573, 458, 354, 266, 194, 138, 96, 66], "metric_v": [878, 750, 617, 486, 368, 270, 192, 134, 92], "long_metric_90": [-9999, -9999, -9999, 17, 11, 8, 6, 4, 3], "long_metric_70": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_i": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_ii": [-9999, -9999, -9999, 39, 26, 18, 12, 9, 6], "long_metric_iii": [-9999, -9999, -9999, 61, 42, 28, 19, 13, 9], "long_metric_iv": [-9999, -9999, -9999, 104, 72, 49, 34, 23, 15], "long_metric_v": [-9999, -9999, -9999, 194, 142, 101, 71, 48, 33], "short_metric": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_i": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_ii": [-9999, -9999, -9999, 49, 33, 22, 15, 11, 8], "short_metric_iii": [-9999, -9999, -9999, 100, 70, 48, 33, 22, 15], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 145, 105, 74, 51], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 122, 86, 59], "metric_122_50": [140, 99, 68, 47, 32, 21, 14, 10, 7], "metric_122_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "metric_122_30": [318, 247, 183, 132, 93, 64, 44, 30, 20], "metric_80_50": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "metric_80_40": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "metric_80_30": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_70": [-9999, -9999, -9999, 41, 28, 19, 13, 9, 6], "agb900_60": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_50": [-9999, -9999, -9999, 106, 73, 50, 34, 23, 15], "agb900_40": [-9999, -9999, -9999, 193, 140, 99, 69, 47, 32], "agb900_30": [-9999, -9999, -9999, 368, 300, 237, 181, 134, 96], "wa1440_90": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa1440_90_small": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70_small": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60_small": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa720_70": [69, 47, 32, 21, 15, 10, 7, 5, 4], "wa720_60": [96, 67, 46, 31, 21, 14, 10, 7, 5], "wa720_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "wa720_50_c": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "wa720_40_c": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "wa720_50_b": [-9999, -9999, -9999, 47, 32, 21, 14, 10, 7], "wa720_30_b": [-9999, -9999, -9999, 132, 93, 64, 44, 30, 20], "wa900": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9]}' + '{"york": [103, 70, 47, 32, 22, 15, 10, 7, 5], "hereford": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_i": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_ii": [274, 195, 136, 93, 63, 43, 29, 19, 13], "bristol_iii": [399, 296, 213, 149, 103, 70, 48, 32, 22], "bristol_iv": [582, 460, 351, 259, 186, 130, 90, 61, 42], "bristol_v": [821, 704, 585, 473, 372, 285, 213, 155, 110], "st_george": [-9999, -9999, -9999, 30, 20, 14, 10, 7, 5], "albion": [-9999, -9999, -9999, 50, 34, 23, 15, 11, 8], "windsor": [-9999, -9999, -9999, 82, 56, 38, 25, 17, 12], "windsor_50": [-9999, -9999, -9999, 134, 93, 64, 44, 29, 20], "windsor_40": [-9999, -9999, -9999, 239, 175, 125, 87, 60, 41], "windsor_30": [-9999, -9999, -9999, 441, 362, 288, 222, 166, 120], "new_western": [-9999, -9999, -9999, 18, 12, 9, 6, 5, 4], "long_western": [-9999, -9999, -9999, 34, 23, 15, 11, 8, 6], "western": [-9999, -9999, -9999, 56, 38, 25, 17, 12, 8], "western_50": [-9999, -9999, -9999, 87, 59, 40, 27, 18, 13], "western_40": [-9999, -9999, -9999, 146, 102, 70, 48, 32, 22], "western_30": [-9999, -9999, -9999, 266, 197, 141, 99, 68, 47], "american": [-9999, -9999, -9999, 68, 47, 32, 21, 14, 10], "st_nicholas": [-9999, -9999, -9999, 123, 86, 59, 40, 27, 18], "new_national": [-9999, -9999, -9999, 13, 9, 6, 5, 4, 3], "long_national": [-9999, -9999, -9999, 23, 15, 11, 8, 6, 4], "national": [-9999, -9999, -9999, 39, 27, 18, 12, 9, 6], "national_50": [-9999, -9999, -9999, 60, 41, 28, 19, 13, 9], "national_40": [-9999, -9999, -9999, 100, 69, 48, 32, 22, 15], "national_30": [-9999, -9999, -9999, 179, 131, 93, 65, 45, 31], "new_warwick": [-9999, -9999, -9999, 10, 7, 6, 5, 4, 3], "long_warwick": [-9999, -9999, -9999, 17, 12, 8, 6, 5, 4], "warwick": [-9999, -9999, -9999, 28, 19, 13, 9, 7, 5], "warwick_50": [-9999, -9999, -9999, 44, 30, 20, 14, 10, 7], "warwick_40": [-9999, -9999, -9999, 73, 51, 35, 24, 16, 11], "warwick_30": [-9999, -9999, -9999, 133, 99, 71, 50, 34, 24], "metric_i": [207, 145, 100, 68, 46, 31, 21, 14, 10], "metric_ii": [262, 185, 128, 87, 59, 40, 27, 18, 12], "metric_iii": [428, 318, 229, 161, 111, 76, 51, 34, 23], "metric_iv": [698, 573, 458, 354, 266, 194, 138, 96, 66], "metric_v": [878, 750, 617, 486, 368, 270, 192, 134, 92], "long_metric_90": [-9999, -9999, -9999, 17, 11, 8, 6, 4, 3], "long_metric_70": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_i": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_ii": [-9999, -9999, -9999, 39, 26, 18, 12, 9, 6], "long_metric_iii": [-9999, -9999, -9999, 61, 42, 28, 19, 13, 9], "long_metric_iv": [-9999, -9999, -9999, 104, 72, 49, 34, 23, 15], "long_metric_v": [-9999, -9999, -9999, 194, 142, 101, 71, 48, 33], "short_metric": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_i": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_ii": [-9999, -9999, -9999, 49, 33, 22, 15, 11, 8], "short_metric_iii": [-9999, -9999, -9999, 100, 70, 48, 33, 22, 15], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 145, 105, 74, 51], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 122, 86, 59], "metric_122_50": [140, 99, 68, 47, 32, 21, 14, 10, 7], "metric_122_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "metric_122_30": [318, 247, 183, 132, 93, 64, 44, 30, 20], "metric_80_50": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "metric_80_40": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "metric_80_30": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_70": [-9999, -9999, -9999, 41, 28, 19, 13, 9, 6], "agb900_60": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_50": [-9999, -9999, -9999, 106, 73, 50, 34, 23, 15], "agb900_40": [-9999, -9999, -9999, 193, 140, 99, 69, 47, 32], "agb900_30": [-9999, -9999, -9999, 368, 300, 237, 181, 134, 96], "wa1440_90": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa1440_90_small": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70_small": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60_small": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa720_70": [69, 47, 32, 21, 15, 10, 7, 5, 4], "wa720_60": [96, 67, 46, 31, 21, 14, 10, 7, 5], "wa720_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "wa720_50_c": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "wa720_40_c": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "wa720_50_b": [-9999, -9999, -9999, 47, 32, 21, 14, 10, 7], "wa720_30_b": [-9999, -9999, -9999, 132, 93, 64, 44, 30, 20], "wa900": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9]}' # --- # name: test_outdoor_classification_scores[AGB_ages.UNDER_12-AGB_genders.FEMALE-AGB_bowstyles.RECURVE] '{"york": [597, 452, 325, 223, 149, 96, 62, 39, 25], "hereford": [784, 635, 487, 353, 244, 163, 106, 68, 43], "bristol_i": [784, 635, 487, 353, 244, 163, 106, 68, 43], "bristol_ii": [948, 818, 668, 515, 374, 259, 173, 113, 72], "bristol_iii": [1054, 948, 818, 671, 519, 380, 266, 179, 117], "bristol_iv": [1153, 1074, 974, 851, 709, 561, 422, 302, 208], "bristol_v": [1233, 1185, 1121, 1037, 930, 802, 664, 528, 404], "st_george": [-9999, -9999, -9999, 202, 136, 89, 57, 37, 23], "albion": [-9999, -9999, -9999, 304, 214, 144, 95, 61, 39], "windsor": [-9999, -9999, -9999, 424, 315, 222, 150, 99, 63], "windsor_50": [-9999, -9999, -9999, 548, 436, 328, 234, 160, 106], "windsor_40": [-9999, -9999, -9999, 685, 587, 481, 374, 277, 195], "windsor_30": [-9999, -9999, -9999, 823, 755, 672, 579, 482, 387], "new_western": [-9999, -9999, -9999, 129, 85, 54, 34, 22, 14], "long_western": [-9999, -9999, -9999, 220, 150, 99, 64, 41, 26], "western": [-9999, -9999, -9999, 324, 232, 158, 105, 67, 43], "western_50": [-9999, -9999, -9999, 426, 323, 231, 158, 104, 67], "western_40": [-9999, -9999, -9999, 546, 447, 344, 250, 173, 115], "western_30": [-9999, -9999, -9999, 673, 595, 503, 403, 305, 219], "american": [-9999, -9999, -9999, 354, 263, 185, 125, 82, 53], "st_nicholas": [-9999, -9999, -9999, 470, 382, 292, 211, 145, 97], "new_national": [-9999, -9999, -9999, 89, 58, 37, 24, 15, 10], "long_national": [-9999, -9999, -9999, 151, 102, 67, 43, 27, 17], "national": [-9999, -9999, -9999, 232, 165, 112, 74, 47, 30], "national_50": [-9999, -9999, -9999, 306, 229, 162, 110, 73, 47], "national_40": [-9999, -9999, -9999, 394, 318, 241, 173, 118, 78], "national_30": [-9999, -9999, -9999, 489, 427, 355, 279, 207, 146], "new_warwick": [-9999, -9999, -9999, 65, 43, 27, 17, 11, 8], "long_warwick": [-9999, -9999, -9999, 110, 75, 50, 32, 21, 13], "warwick": [-9999, -9999, -9999, 162, 116, 79, 53, 34, 22], "warwick_50": [-9999, -9999, -9999, 213, 162, 116, 79, 52, 34], "warwick_40": [-9999, -9999, -9999, 273, 224, 172, 125, 87, 58], "warwick_30": [-9999, -9999, -9999, 337, 298, 252, 202, 153, 110], "metric_i": [870, 716, 558, 411, 289, 195, 128, 82, 52], "metric_ii": [975, 832, 670, 507, 363, 248, 164, 106, 67], "metric_iii": [1115, 1005, 870, 716, 556, 408, 286, 192, 126], "metric_iv": [1246, 1172, 1078, 961, 824, 677, 534, 404, 294], "metric_v": [1317, 1263, 1193, 1104, 992, 858, 706, 550, 406], "long_metric_90": [-9999, -9999, -9999, 117, 77, 50, 32, 20, 13], "long_metric_70": [-9999, -9999, -9999, 174, 118, 78, 50, 32, 20], "long_metric_i": [-9999, -9999, -9999, 174, 118, 78, 50, 32, 20], "long_metric_ii": [-9999, -9999, -9999, 235, 165, 112, 73, 47, 30], "long_metric_iii": [-9999, -9999, -9999, 315, 235, 166, 112, 73, 47], "long_metric_iv": [-9999, -9999, -9999, 414, 333, 252, 180, 123, 81], "long_metric_v": [-9999, -9999, -9999, 518, 455, 380, 300, 224, 158], "short_metric": [-9999, -9999, -9999, 237, 171, 118, 78, 51, 33], "short_metric_i": [-9999, -9999, -9999, 237, 171, 118, 78, 51, 33], "short_metric_ii": [-9999, -9999, -9999, 273, 198, 137, 91, 59, 38], "short_metric_iii": [-9999, -9999, -9999, 401, 321, 243, 174, 119, 79], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 425, 354, 281, 213], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 406, 327, 248], "metric_122_50": [504, 435, 354, 270, 193, 132, 87, 56, 36], "metric_122_40": [562, 509, 441, 361, 276, 199, 136, 90, 58], "metric_122_30": [617, 578, 529, 466, 390, 305, 224, 156, 105], "metric_80_50": [-9999, -9999, -9999, 147, 98, 63, 41, 26, 16], "metric_80_40": [-9999, -9999, -9999, 218, 151, 101, 66, 42, 27], "metric_80_30": [-9999, -9999, -9999, 328, 245, 173, 116, 76, 49], "agb900_70": [-9999, -9999, -9999, 258, 179, 120, 78, 50, 32], "agb900_60": [-9999, -9999, -9999, 346, 253, 176, 118, 77, 49], "agb900_50": [-9999, -9999, -9999, 457, 358, 265, 187, 126, 83], "agb900_40": [-9999, -9999, -9999, 582, 494, 399, 307, 224, 156], "agb900_30": [-9999, -9999, -9999, 710, 647, 572, 488, 404, 322], "wa1440_90": [782, 630, 484, 354, 248, 167, 110, 71, 45], "wa1440_70": [870, 716, 558, 411, 289, 195, 128, 82, 52], "wa1440_60": [975, 832, 670, 507, 363, 248, 164, 106, 67], "wa1440_90_small": [782, 630, 484, 354, 248, 167, 110, 71, 45], "wa1440_70_small": [870, 716, 558, 411, 289, 195, 128, 82, 52], "wa1440_60_small": [975, 832, 670, 507, 363, 248, 164, 106, 67], "wa720_70": [379, 295, 215, 149, 99, 64, 41, 26, 17], "wa720_60": [442, 362, 277, 200, 137, 91, 59, 37, 24], "wa720_40": [562, 509, 441, 361, 276, 199, 136, 90, 58], "wa720_50_c": [-9999, -9999, -9999, 147, 98, 63, 41, 26, 16], "wa720_40_c": [-9999, -9999, -9999, 218, 151, 101, 66, 42, 27], "wa720_50_b": [-9999, -9999, -9999, 270, 193, 132, 87, 56, 36], "wa720_30_b": [-9999, -9999, -9999, 466, 390, 305, 224, 156, 105], "wa900": [-9999, -9999, -9999, 346, 253, 176, 118, 77, 49]}' @@ -702,7 +702,7 @@ '{"york": [923, 809, 684, 555, 432, 325, 236, 167, 116], "hereford": [1057, 969, 863, 742, 614, 487, 370, 272, 194], "bristol_i": [1057, 969, 863, 742, 614, 487, 370, 272, 194], "bristol_ii": [1158, 1093, 1012, 914, 797, 668, 536, 412, 305], "bristol_iii": [1217, 1167, 1104, 1026, 931, 818, 692, 562, 438], "bristol_iv": [1263, 1232, 1188, 1132, 1061, 974, 870, 751, 624], "bristol_v": [1290, 1277, 1254, 1221, 1177, 1121, 1050, 963, 859], "st_george": [-9999, -9999, -9999, 468, 374, 287, 213, 153, 107], "albion": [-9999, -9999, -9999, 600, 506, 410, 318, 237, 172], "windsor": [-9999, -9999, -9999, 714, 632, 539, 441, 345, 259], "windsor_50": [-9999, -9999, -9999, 797, 731, 653, 564, 468, 373], "windsor_40": [-9999, -9999, -9999, 874, 827, 769, 698, 617, 527], "windsor_30": [-9999, -9999, -9999, 932, 907, 874, 831, 776, 709], "new_western": [-9999, -9999, -9999, 345, 262, 193, 137, 96, 66], "long_western": [-9999, -9999, -9999, 482, 394, 309, 232, 168, 119], "western": [-9999, -9999, -9999, 597, 517, 428, 339, 257, 187], "western_50": [-9999, -9999, -9999, 673, 607, 528, 441, 352, 268], "western_40": [-9999, -9999, -9999, 745, 695, 633, 560, 476, 387], "western_30": [-9999, -9999, -9999, 811, 777, 735, 682, 619, 544], "american": [-9999, -9999, -9999, 595, 527, 449, 367, 288, 216], "st_nicholas": [-9999, -9999, -9999, 647, 602, 548, 482, 408, 330], "new_national": [-9999, -9999, -9999, 243, 183, 134, 95, 66, 45], "long_national": [-9999, -9999, -9999, 343, 276, 214, 159, 114, 80], "national": [-9999, -9999, -9999, 438, 376, 309, 243, 183, 133], "national_50": [-9999, -9999, -9999, 495, 444, 383, 317, 250, 189], "national_40": [-9999, -9999, -9999, 550, 510, 462, 404, 340, 273], "national_30": [-9999, -9999, -9999, 600, 573, 539, 497, 446, 387], "new_warwick": [-9999, -9999, -9999, 173, 131, 97, 69, 48, 33], "long_warwick": [-9999, -9999, -9999, 241, 197, 155, 116, 84, 60], "warwick": [-9999, -9999, -9999, 299, 259, 214, 170, 129, 94], "warwick_50": [-9999, -9999, -9999, 337, 304, 264, 221, 176, 134], "warwick_40": [-9999, -9999, -9999, 373, 348, 317, 280, 238, 194], "warwick_30": [-9999, -9999, -9999, 406, 389, 368, 341, 310, 272], "metric_i": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "metric_ii": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "metric_iii": [1286, 1233, 1167, 1086, 988, 870, 738, 601, 469], "metric_iv": [1359, 1325, 1281, 1227, 1160, 1078, 979, 865, 740], "metric_v": [1400, 1375, 1343, 1303, 1254, 1193, 1118, 1026, 918], "long_metric_90": [-9999, -9999, -9999, 299, 232, 172, 124, 87, 60], "long_metric_70": [-9999, -9999, -9999, 388, 316, 246, 184, 133, 93], "long_metric_i": [-9999, -9999, -9999, 388, 316, 246, 184, 133, 93], "long_metric_ii": [-9999, -9999, -9999, 453, 387, 316, 246, 184, 133], "long_metric_iii": [-9999, -9999, -9999, 517, 462, 398, 327, 257, 194], "long_metric_iv": [-9999, -9999, -9999, 577, 536, 485, 424, 357, 286], "long_metric_v": [-9999, -9999, -9999, 634, 605, 570, 527, 474, 413], "short_metric": [-9999, -9999, -9999, 440, 377, 312, 248, 189, 139], "short_metric_i": [-9999, -9999, -9999, 440, 377, 312, 248, 189, 139], "short_metric_ii": [-9999, -9999, -9999, 484, 423, 355, 285, 218, 161], "short_metric_iii": [-9999, -9999, -9999, 570, 526, 473, 412, 344, 276], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 593, 555, 509, 454], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 592, 553, 505], "metric_122_50": [-9999, -9999, -9999, 486, 424, 354, 282, 214, 156], "metric_122_40": [-9999, -9999, -9999, 548, 500, 441, 373, 300, 231], "metric_122_30": [-9999, -9999, -9999, 607, 572, 529, 476, 413, 342], "metric_80_50": [536, 485, 423, 353, 280, 212, 155, 110, 76], "metric_80_40": [588, 548, 499, 440, 371, 299, 229, 169, 120], "metric_80_30": [636, 607, 572, 528, 475, 411, 340, 268, 202], "agb900_70": [-9999, -9999, -9999, 525, 440, 353, 270, 199, 143], "agb900_60": [-9999, -9999, -9999, 606, 531, 447, 360, 278, 206], "agb900_50": [-9999, -9999, -9999, 683, 623, 552, 471, 386, 304], "agb900_40": [-9999, -9999, -9999, 757, 712, 659, 594, 520, 440], "agb900_30": [-9999, -9999, -9999, 824, 796, 761, 718, 666, 605], "wa1440_90": [1081, 982, 866, 739, 609, 484, 371, 276, 199], "wa1440_70": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "wa1440_60": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "wa1440_90_small": [1081, 982, 866, 739, 609, 484, 371, 276, 199], "wa1440_70_small": [1142, 1056, 951, 828, 693, 558, 431, 321, 232], "wa1440_60_small": [1205, 1133, 1044, 937, 810, 670, 530, 401, 293], "wa720_70": [-9999, -9999, -9999, 355, 283, 215, 157, 112, 78], "wa720_60": [-9999, -9999, -9999, 420, 350, 277, 210, 153, 109], "wa720_40": [-9999, -9999, -9999, 548, 500, 441, 373, 300, 231], "wa720_50_c": [536, 485, 423, 353, 280, 212, 155, 110, 76], "wa720_40_c": [588, 548, 499, 440, 371, 299, 229, 169, 120], "wa720_50_b": [-9999, -9999, -9999, 486, 424, 354, 282, 214, 156], "wa720_30_b": [-9999, -9999, -9999, 607, 572, 529, 476, 413, 342], "wa900": [-9999, -9999, -9999, 606, 531, 447, 360, 278, 206]}' # --- # name: test_outdoor_classification_scores[AGB_ages.UNDER_12-AGB_genders.OPEN-AGB_bowstyles.LONGBOW] - '{"york": [103, 70, 47, 32, 22, 15, 10, 7, 5], "hereford": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_i": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_ii": [274, 195, 136, 93, 63, 43, 29, 19, 13], "bristol_iii": [399, 296, 213, 149, 103, 70, 48, 32, 22], "bristol_iv": [582, 460, 351, 259, 186, 130, 90, 61, 42], "bristol_v": [821, 704, 585, 473, 372, 285, 213, 155, 110], "st_george": [-9999, -9999, -9999, 30, 20, 14, 10, 7, 5], "albion": [-9999, -9999, -9999, 50, 34, 23, 15, 11, 8], "windsor": [-9999, -9999, -9999, 82, 56, 38, 25, 17, 12], "windsor_50": [-9999, -9999, -9999, 134, 93, 64, 44, 29, 20], "windsor_40": [-9999, -9999, -9999, 239, 175, 125, 87, 60, 41], "windsor_30": [-9999, -9999, -9999, 441, 362, 288, 222, 166, 120], "new_western": [-9999, -9999, -9999, 18, 12, 9, 6, 5, 4], "long_western": [-9999, -9999, -9999, 34, 23, 15, 11, 8, 6], "western": [-9999, -9999, -9999, 56, 38, 25, 17, 12, 8], "western_50": [-9999, -9999, -9999, 87, 59, 40, 27, 18, 13], "western_40": [-9999, -9999, -9999, 146, 102, 70, 48, 32, 22], "western_30": [-9999, -9999, -9999, 266, 197, 141, 99, 68, 47], "american": [-9999, -9999, -9999, 68, 47, 32, 21, 14, 10], "st_nicholas": [-9999, -9999, -9999, 123, 86, 59, 40, 27, 18], "new_national": [-9999, -9999, -9999, 13, 9, 6, 5, 4, 3], "long_national": [-9999, -9999, -9999, 23, 15, 11, 8, 6, 4], "national": [-9999, -9999, -9999, 39, 27, 18, 12, 9, 6], "national_50": [-9999, -9999, -9999, 60, 41, 28, 19, 13, 9], "national_40": [-9999, -9999, -9999, 100, 69, 48, 32, 22, 15], "national_30": [-9999, -9999, -9999, 179, 131, 93, 65, 45, 31], "new_warwick": [-9999, -9999, -9999, 10, 7, 5, 4, 3, 3], "long_warwick": [-9999, -9999, -9999, 17, 12, 8, 6, 5, 4], "warwick": [-9999, -9999, -9999, 28, 19, 13, 9, 7, 5], "warwick_50": [-9999, -9999, -9999, 44, 30, 20, 14, 10, 7], "warwick_40": [-9999, -9999, -9999, 73, 51, 35, 24, 16, 11], "warwick_30": [-9999, -9999, -9999, 133, 99, 71, 50, 34, 24], "metric_i": [207, 145, 100, 68, 46, 31, 21, 14, 10], "metric_ii": [262, 185, 128, 87, 59, 40, 27, 18, 12], "metric_iii": [428, 318, 229, 161, 111, 76, 51, 34, 23], "metric_iv": [698, 573, 458, 354, 266, 194, 138, 96, 66], "metric_v": [878, 750, 617, 486, 368, 270, 192, 134, 92], "long_metric_90": [-9999, -9999, -9999, 17, 11, 8, 6, 4, 3], "long_metric_70": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_i": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_ii": [-9999, -9999, -9999, 39, 26, 18, 12, 9, 6], "long_metric_iii": [-9999, -9999, -9999, 61, 42, 28, 19, 13, 9], "long_metric_iv": [-9999, -9999, -9999, 104, 72, 49, 34, 23, 15], "long_metric_v": [-9999, -9999, -9999, 194, 142, 101, 71, 48, 33], "short_metric": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_i": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_ii": [-9999, -9999, -9999, 49, 33, 22, 15, 11, 8], "short_metric_iii": [-9999, -9999, -9999, 100, 70, 48, 33, 22, 15], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 145, 105, 74, 51], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 122, 86, 59], "metric_122_50": [140, 99, 68, 47, 32, 21, 14, 10, 7], "metric_122_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "metric_122_30": [318, 247, 183, 132, 93, 64, 44, 30, 20], "metric_80_50": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "metric_80_40": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "metric_80_30": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_70": [-9999, -9999, -9999, 41, 28, 19, 13, 9, 6], "agb900_60": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_50": [-9999, -9999, -9999, 106, 73, 50, 34, 23, 15], "agb900_40": [-9999, -9999, -9999, 193, 140, 99, 69, 47, 32], "agb900_30": [-9999, -9999, -9999, 368, 300, 237, 181, 134, 96], "wa1440_90": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa1440_90_small": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70_small": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60_small": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa720_70": [69, 47, 32, 21, 15, 10, 7, 5, 4], "wa720_60": [96, 67, 46, 31, 21, 14, 10, 7, 5], "wa720_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "wa720_50_c": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "wa720_40_c": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "wa720_50_b": [-9999, -9999, -9999, 47, 32, 21, 14, 10, 7], "wa720_30_b": [-9999, -9999, -9999, 132, 93, 64, 44, 30, 20], "wa900": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9]}' + '{"york": [103, 70, 47, 32, 22, 15, 10, 7, 5], "hereford": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_i": [173, 120, 82, 56, 38, 25, 17, 12, 8], "bristol_ii": [274, 195, 136, 93, 63, 43, 29, 19, 13], "bristol_iii": [399, 296, 213, 149, 103, 70, 48, 32, 22], "bristol_iv": [582, 460, 351, 259, 186, 130, 90, 61, 42], "bristol_v": [821, 704, 585, 473, 372, 285, 213, 155, 110], "st_george": [-9999, -9999, -9999, 30, 20, 14, 10, 7, 5], "albion": [-9999, -9999, -9999, 50, 34, 23, 15, 11, 8], "windsor": [-9999, -9999, -9999, 82, 56, 38, 25, 17, 12], "windsor_50": [-9999, -9999, -9999, 134, 93, 64, 44, 29, 20], "windsor_40": [-9999, -9999, -9999, 239, 175, 125, 87, 60, 41], "windsor_30": [-9999, -9999, -9999, 441, 362, 288, 222, 166, 120], "new_western": [-9999, -9999, -9999, 18, 12, 9, 6, 5, 4], "long_western": [-9999, -9999, -9999, 34, 23, 15, 11, 8, 6], "western": [-9999, -9999, -9999, 56, 38, 25, 17, 12, 8], "western_50": [-9999, -9999, -9999, 87, 59, 40, 27, 18, 13], "western_40": [-9999, -9999, -9999, 146, 102, 70, 48, 32, 22], "western_30": [-9999, -9999, -9999, 266, 197, 141, 99, 68, 47], "american": [-9999, -9999, -9999, 68, 47, 32, 21, 14, 10], "st_nicholas": [-9999, -9999, -9999, 123, 86, 59, 40, 27, 18], "new_national": [-9999, -9999, -9999, 13, 9, 6, 5, 4, 3], "long_national": [-9999, -9999, -9999, 23, 15, 11, 8, 6, 4], "national": [-9999, -9999, -9999, 39, 27, 18, 12, 9, 6], "national_50": [-9999, -9999, -9999, 60, 41, 28, 19, 13, 9], "national_40": [-9999, -9999, -9999, 100, 69, 48, 32, 22, 15], "national_30": [-9999, -9999, -9999, 179, 131, 93, 65, 45, 31], "new_warwick": [-9999, -9999, -9999, 10, 7, 6, 5, 4, 3], "long_warwick": [-9999, -9999, -9999, 17, 12, 8, 6, 5, 4], "warwick": [-9999, -9999, -9999, 28, 19, 13, 9, 7, 5], "warwick_50": [-9999, -9999, -9999, 44, 30, 20, 14, 10, 7], "warwick_40": [-9999, -9999, -9999, 73, 51, 35, 24, 16, 11], "warwick_30": [-9999, -9999, -9999, 133, 99, 71, 50, 34, 24], "metric_i": [207, 145, 100, 68, 46, 31, 21, 14, 10], "metric_ii": [262, 185, 128, 87, 59, 40, 27, 18, 12], "metric_iii": [428, 318, 229, 161, 111, 76, 51, 34, 23], "metric_iv": [698, 573, 458, 354, 266, 194, 138, 96, 66], "metric_v": [878, 750, 617, 486, 368, 270, 192, 134, 92], "long_metric_90": [-9999, -9999, -9999, 17, 11, 8, 6, 4, 3], "long_metric_70": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_i": [-9999, -9999, -9999, 26, 18, 12, 9, 6, 5], "long_metric_ii": [-9999, -9999, -9999, 39, 26, 18, 12, 9, 6], "long_metric_iii": [-9999, -9999, -9999, 61, 42, 28, 19, 13, 9], "long_metric_iv": [-9999, -9999, -9999, 104, 72, 49, 34, 23, 15], "long_metric_v": [-9999, -9999, -9999, 194, 142, 101, 71, 48, 33], "short_metric": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_i": [-9999, -9999, -9999, 42, 29, 19, 13, 9, 7], "short_metric_ii": [-9999, -9999, -9999, 49, 33, 22, 15, 11, 8], "short_metric_iii": [-9999, -9999, -9999, 100, 70, 48, 33, 22, 15], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 145, 105, 74, 51], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 122, 86, 59], "metric_122_50": [140, 99, 68, 47, 32, 21, 14, 10, 7], "metric_122_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "metric_122_30": [318, 247, 183, 132, 93, 64, 44, 30, 20], "metric_80_50": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "metric_80_40": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "metric_80_30": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_70": [-9999, -9999, -9999, 41, 28, 19, 13, 9, 6], "agb900_60": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9], "agb900_50": [-9999, -9999, -9999, 106, 73, 50, 34, 23, 15], "agb900_40": [-9999, -9999, -9999, 193, 140, 99, 69, 47, 32], "agb900_30": [-9999, -9999, -9999, 368, 300, 237, 181, 134, 96], "wa1440_90": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa1440_90_small": [177, 124, 85, 58, 39, 27, 18, 12, 9], "wa1440_70_small": [207, 145, 100, 68, 46, 31, 21, 14, 10], "wa1440_60_small": [262, 185, 128, 87, 59, 40, 27, 18, 12], "wa720_70": [69, 47, 32, 21, 15, 10, 7, 5, 4], "wa720_60": [96, 67, 46, 31, 21, 14, 10, 7, 5], "wa720_40": [209, 153, 108, 75, 51, 35, 24, 16, 11], "wa720_50_c": [-9999, -9999, -9999, 21, 14, 10, 7, 5, 4], "wa720_40_c": [-9999, -9999, -9999, 35, 23, 16, 11, 8, 6], "wa720_50_b": [-9999, -9999, -9999, 47, 32, 21, 14, 10, 7], "wa720_30_b": [-9999, -9999, -9999, 132, 93, 64, 44, 30, 20], "wa900": [-9999, -9999, -9999, 63, 43, 29, 20, 13, 9]}' # --- # name: test_outdoor_classification_scores[AGB_ages.UNDER_12-AGB_genders.OPEN-AGB_bowstyles.RECURVE] '{"york": [597, 452, 325, 223, 149, 96, 62, 39, 25], "hereford": [784, 635, 487, 353, 244, 163, 106, 68, 43], "bristol_i": [784, 635, 487, 353, 244, 163, 106, 68, 43], "bristol_ii": [948, 818, 668, 515, 374, 259, 173, 113, 72], "bristol_iii": [1054, 948, 818, 671, 519, 380, 266, 179, 117], "bristol_iv": [1153, 1074, 974, 851, 709, 561, 422, 302, 208], "bristol_v": [1233, 1185, 1121, 1037, 930, 802, 664, 528, 404], "st_george": [-9999, -9999, -9999, 202, 136, 89, 57, 37, 23], "albion": [-9999, -9999, -9999, 304, 214, 144, 95, 61, 39], "windsor": [-9999, -9999, -9999, 424, 315, 222, 150, 99, 63], "windsor_50": [-9999, -9999, -9999, 548, 436, 328, 234, 160, 106], "windsor_40": [-9999, -9999, -9999, 685, 587, 481, 374, 277, 195], "windsor_30": [-9999, -9999, -9999, 823, 755, 672, 579, 482, 387], "new_western": [-9999, -9999, -9999, 129, 85, 54, 34, 22, 14], "long_western": [-9999, -9999, -9999, 220, 150, 99, 64, 41, 26], "western": [-9999, -9999, -9999, 324, 232, 158, 105, 67, 43], "western_50": [-9999, -9999, -9999, 426, 323, 231, 158, 104, 67], "western_40": [-9999, -9999, -9999, 546, 447, 344, 250, 173, 115], "western_30": [-9999, -9999, -9999, 673, 595, 503, 403, 305, 219], "american": [-9999, -9999, -9999, 354, 263, 185, 125, 82, 53], "st_nicholas": [-9999, -9999, -9999, 470, 382, 292, 211, 145, 97], "new_national": [-9999, -9999, -9999, 89, 58, 37, 24, 15, 10], "long_national": [-9999, -9999, -9999, 151, 102, 67, 43, 27, 17], "national": [-9999, -9999, -9999, 232, 165, 112, 74, 47, 30], "national_50": [-9999, -9999, -9999, 306, 229, 162, 110, 73, 47], "national_40": [-9999, -9999, -9999, 394, 318, 241, 173, 118, 78], "national_30": [-9999, -9999, -9999, 489, 427, 355, 279, 207, 146], "new_warwick": [-9999, -9999, -9999, 65, 43, 27, 17, 11, 8], "long_warwick": [-9999, -9999, -9999, 110, 75, 50, 32, 21, 13], "warwick": [-9999, -9999, -9999, 162, 116, 79, 53, 34, 22], "warwick_50": [-9999, -9999, -9999, 213, 162, 116, 79, 52, 34], "warwick_40": [-9999, -9999, -9999, 273, 224, 172, 125, 87, 58], "warwick_30": [-9999, -9999, -9999, 337, 298, 252, 202, 153, 110], "metric_i": [870, 716, 558, 411, 289, 195, 128, 82, 52], "metric_ii": [975, 832, 670, 507, 363, 248, 164, 106, 67], "metric_iii": [1115, 1005, 870, 716, 556, 408, 286, 192, 126], "metric_iv": [1246, 1172, 1078, 961, 824, 677, 534, 404, 294], "metric_v": [1317, 1263, 1193, 1104, 992, 858, 706, 550, 406], "long_metric_90": [-9999, -9999, -9999, 117, 77, 50, 32, 20, 13], "long_metric_70": [-9999, -9999, -9999, 174, 118, 78, 50, 32, 20], "long_metric_i": [-9999, -9999, -9999, 174, 118, 78, 50, 32, 20], "long_metric_ii": [-9999, -9999, -9999, 235, 165, 112, 73, 47, 30], "long_metric_iii": [-9999, -9999, -9999, 315, 235, 166, 112, 73, 47], "long_metric_iv": [-9999, -9999, -9999, 414, 333, 252, 180, 123, 81], "long_metric_v": [-9999, -9999, -9999, 518, 455, 380, 300, 224, 158], "short_metric": [-9999, -9999, -9999, 237, 171, 118, 78, 51, 33], "short_metric_i": [-9999, -9999, -9999, 237, 171, 118, 78, 51, 33], "short_metric_ii": [-9999, -9999, -9999, 273, 198, 137, 91, 59, 38], "short_metric_iii": [-9999, -9999, -9999, 401, 321, 243, 174, 119, 79], "short_metric_iv": [-9999, -9999, -9999, -9999, -9999, 425, 354, 281, 213], "short_metric_v": [-9999, -9999, -9999, -9999, -9999, -9999, 406, 327, 248], "metric_122_50": [504, 435, 354, 270, 193, 132, 87, 56, 36], "metric_122_40": [562, 509, 441, 361, 276, 199, 136, 90, 58], "metric_122_30": [617, 578, 529, 466, 390, 305, 224, 156, 105], "metric_80_50": [-9999, -9999, -9999, 147, 98, 63, 41, 26, 16], "metric_80_40": [-9999, -9999, -9999, 218, 151, 101, 66, 42, 27], "metric_80_30": [-9999, -9999, -9999, 328, 245, 173, 116, 76, 49], "agb900_70": [-9999, -9999, -9999, 258, 179, 120, 78, 50, 32], "agb900_60": [-9999, -9999, -9999, 346, 253, 176, 118, 77, 49], "agb900_50": [-9999, -9999, -9999, 457, 358, 265, 187, 126, 83], "agb900_40": [-9999, -9999, -9999, 582, 494, 399, 307, 224, 156], "agb900_30": [-9999, -9999, -9999, 710, 647, 572, 488, 404, 322], "wa1440_90": [782, 630, 484, 354, 248, 167, 110, 71, 45], "wa1440_70": [870, 716, 558, 411, 289, 195, 128, 82, 52], "wa1440_60": [975, 832, 670, 507, 363, 248, 164, 106, 67], "wa1440_90_small": [782, 630, 484, 354, 248, 167, 110, 71, 45], "wa1440_70_small": [870, 716, 558, 411, 289, 195, 128, 82, 52], "wa1440_60_small": [975, 832, 670, 507, 363, 248, 164, 106, 67], "wa720_70": [379, 295, 215, 149, 99, 64, 41, 26, 17], "wa720_60": [442, 362, 277, 200, 137, 91, 59, 37, 24], "wa720_40": [562, 509, 441, 361, 276, 199, 136, 90, 58], "wa720_50_c": [-9999, -9999, -9999, 147, 98, 63, 41, 26, 16], "wa720_40_c": [-9999, -9999, -9999, 218, 151, 101, 66, 42, 27], "wa720_50_b": [-9999, -9999, -9999, 270, 193, 132, 87, 56, 36], "wa720_30_b": [-9999, -9999, -9999, 466, 390, 305, 224, 156, 105], "wa900": [-9999, -9999, -9999, 346, 253, 176, 118, 77, 49]}' diff --git a/tests/unit/classifications/test_classification_utils.py b/tests/unit/classifications/test_classification_utils.py index e86e305..c551f39 100644 --- a/tests/unit/classifications/test_classification_utils.py +++ b/tests/unit/classifications/test_classification_utils.py @@ -1,5 +1,6 @@ """Tests for classification utilities.""" +import numpy as np import pytest import archeryutils.classifications.classification_utils as class_utils @@ -82,3 +83,77 @@ def test_strip_spots( strippedname = class_utils.strip_spots(roundname) assert strippedname == strippedname_expected + + +class TestScoreFixing: + """Tests for the score fixing utilities.""" + + @pytest.mark.parametrize( + "scores,max_score,expected", + [ + # Test case 1: No repeated scores + ( + [100, 95, 90, 85, 80], + 100, + [100, 95, 90, 85, 80], + ), + # Test case 2: Repeated scores in middle + ( + [100, 95, 90, 90, 80], + 100, + [100, 95, 91, 90, 80], + ), + # Test case 3: Multiple repeated scores + ( + [100, 95, 90, 90, 90, 80], + 100, + [100, 95, 92, 91, 90, 80], + ), + # Test case 4: Repeated max scores + ( + [100, 100, 100, 95, 90], + 100, + [-9999, -9999, 100, 95, 90], + ), + # Test case 5: All same scores + ( + [80, 80, 80, 80], + 100, + [83, 82, 81, 80], + ), + # Test case 6: Scores at max + ( + [100, 100, 100], + 100, + [-9999, -9999, 100], + ), + # Test case 7: Single score + ( + [90], + 100, + [90], + ), + # Test case 8: Two identical scores + ( + [85, 85], + 100, + [86, 85], + ), + # Test case 9: Real example that caught edge case in the code + ( + [500, 499, 498, 497, 496, 425, 343, 259, 185], + 500, + [500, 499, 498, 497, 496, 425, 343, 259, 185], + ), + ], + ) + def test_fix_repeated_scores( + self, + scores: list[int], + max_score: float, + expected: list[int], + ) -> None: + """Test that fix_repeated_scores() correctly handles repeated scores.""" + result = class_utils.fix_repeated_scores(scores, max_score) + + assert result == expected