# Path: athlib/qkids_score.py
# def qkids_score(competition_type: str, event: str, perf: Union[str, int, float]) -> int:
#     competition_type = competition_type.replace(' ','').upper()
#     if competition_type in _compTypeMap:
#         competition_type = _compTypeMap[competition_type]
#     table = _qkidsTables.get(competition_type,None)
#     if not table:
#         raise ValueError('cannot find QuadKids Table for competition type %r' % competition_type)
#     event = normalize_event_code(event)
#     row = table.get(event,None)
#     if not row:
#         raise ValueError('cannot find find data for QuadKids Table[%r][%r]' % (competition_type,event))
#     delta = float((row[1] - parse_hms(perf)) if PAT_RUN.match(event) else (float(perf) - row[1]))
#     v = int(1e-6 + delta/row[0] + 10)
#     return max(10,min(v,100))


from unittest import TestCase, main
from athlib import qkids_score
                ('QuadKids Secondary', '100', 18.3, 22),
                ('QuadKids Secondary', '100', 18.4, 21),
                ('QuadKids Secondary', '100', 18.5, 20),
                ('QuadKids Secondary', '100', 18.6, 19),
                ('QuadKids Secondary', '100', 18.7, 18),
                ('QuadKids Secondary', '100', 18.8, 17),
                ('QuadKids Secondary', '100', 18.9, 16),
                ('QuadKids Secondary', '100', 19,   15),
                ('QuadKids Secondary', '100', 19.1, 14),
                ('QuadKids Secondary', '100', 19.2, 13),
                ('QuadKids Secondary', '100', 19.3, 12),
                ('QuadKids Secondary', '100', 19.4, 11),
                ('QuadKids Secondary', '100', 20.1, 10),
                ('QKSEC', '100', 9, 100),
                ('QuadKids Secondary', '100', 19.03, 14),
                ('QuadKids Primary', 'SLJ', 1.82, 50),
                ('QuadKids Primary', '4x100', '74.00', 50),
                ('QuadKids Primary', '75', '12.00', 50),
                ('QuadKids Primary', '600', '2:20', 50),
                ('QuadKids Primary', 'ot', '25', 50),
                ('Wessex League','600','1:30',100),
                ('Wessex League (U13)','800','2:20',100),
                ('QKSEC','800','140',100),
                ('QuadKids Primary','600','1:30',100),
                ('QKSTA','400','35',100),
                ('QKCLUB','600','1:30',100),
                ('QKCLU13','800','2:20',100),
                ('QKCLU9','400','40',100),
                ('QKPRE','300','45',100),
                ]:

# Path: athlib/qkids_score.py
# def qkids_score(competition_type: str, event: str, perf: Union[str, int, float]) -> int:
#     competition_type = competition_type.replace(' ','').upper()
#     if competition_type in _compTypeMap:
#         competition_type = _compTypeMap[competition_type]
#     table = _qkidsTables.get(competition_type,None)
#     if not table:
#         raise ValueError('cannot find QuadKids Table for competition type %r' % competition_type)
#     event = normalize_event_code(event)
#     row = table.get(event,None)
#     if not row:
#         raise ValueError('cannot find find data for QuadKids Table[%r][%r]' % (competition_type,event))
#     delta = float((row[1] - parse_hms(perf)) if PAT_RUN.match(event) else (float(perf) - row[1]))
#     v = int(1e-6 + delta/row[0] + 10)
#     return max(10,min(v,100))


# Path: tests/test_qkids.py
from unittest import TestCase, main
from athlib import qkids_score

                ('QuadKids Secondary', '100', 18.3, 22),
                ('QuadKids Secondary', '100', 18.4, 21),
                ('QuadKids Secondary', '100', 18.5, 20),
                ('QuadKids Secondary', '100', 18.6, 19),
                ('QuadKids Secondary', '100', 18.7, 18),
                ('QuadKids Secondary', '100', 18.8, 17),
                ('QuadKids Secondary', '100', 18.9, 16),
                ('QuadKids Secondary', '100', 19,   15),
                ('QuadKids Secondary', '100', 19.1, 14),
                ('QuadKids Secondary', '100', 19.2, 13),
                ('QuadKids Secondary', '100', 19.3, 12),
                ('QuadKids Secondary', '100', 19.4, 11),
                ('QuadKids Secondary', '100', 20.1, 10),
                ('QKSEC', '100', 9, 100),
                ('QuadKids Secondary', '100', 19.03, 14),
                ('QuadKids Primary', 'SLJ', 1.82, 50),
                ('QuadKids Primary', '4x100', '74.00', 50),
                ('QuadKids Primary', '75', '12.00', 50),
                ('QuadKids Primary', '600', '2:20', 50),
                ('QuadKids Primary', 'ot', '25', 50),
                ('Wessex League','600','1:30',100),
                ('Wessex League (U13)','800','2:20',100),
                ('QKSEC','800','140',100),
                ('QuadKids Primary','600','1:30',100),
                ('QKSTA','400','35',100),
                ('QKCLUB','600','1:30',100),
                ('QKCLU13','800','2:20',100),
                ('QKCLU9','400','40',100),
                ('QKPRE','300','45',100),
                ]:

            r = qkids_score(ct, event, perf)