# Path: athlib/utils.py
# def normalize_gender(gender: Any) -> str:
# def str2num(s: str) -> Union[int, float]:
# def parse_hms(t: Union[int, float, str]) -> Union[int, float]:
# def get_distance(discipline: str) -> Optional[int]:
# def get_duration_event_time(dev: str) -> Optional[int]:
# def round_up_str_num(s: str, prec: int = 2, maxDP: int = 5) -> str:
# def format_seconds_as_time(seconds: float, prec: int = 0) -> str:
# def field_event_record(evc: str, gender: str = 'all') -> Optional[float]:
# def check_performance_for_discipline(
#     discipline: str,
#     textvalue: str,
#     gender: str = 'all',
#     ulpc: float = 120/100.0,
#     errorKlass: Type[Exception] = ValueError,
#     prec: int = None
# ) -> str:
# def discipline_sort_key(discipline: Optional[str]) -> Tuple[int, int, str]:
# def text_discipline_sort_key(discipline: str) -> str:
# def sort_by_discipline(stuff: List[T], attr: str = "discipline") -> List[T]:
# def check_event_code(c: str) -> Optional[Match[str]]:
# def _norm_tzeroes(s: str) -> str:
# def _norm_cm(s: str) -> str:
# def _norm_m(s: str) -> str:
# def _norm_kg(s: str) -> str:
# def _norm_g(s: str) -> str:
# def normalize_event_code(c : str) -> str:
# def isStr(o):
# def nativeStr(o, enc="utf8"):
# def localpath(relpath: str, pstart: int = 0) -> str:
#     def resolve_from_url(self, url: str) -> str:
# def _add_to_cache(c: Dict[R, T], t: R, v: T, maxlen: int = 20) -> T:
# def schema_valid(schema_file : str,  # should be relative path
#                  validator=jsonschema.Draft3Validator,
#                  expect_failure: bool = False) -> bool:
# def valid_against_schema(json_file: str, schema_file: str, expect_failure: bool = False) -> bool:
# def is_hand_timing(perf: Any) -> bool:
# FIELD_EVENT_RECORDS_BY_GENDER : Dict [str, Dict[str, float]]= dict(
#                         m = dict(
#                                 HJ = 2.45,
#                                 LJ = 8.95,
#                                 TJ = 18.29,
#                                 PV = 6.16,
#                                 HT = 86.74,
#                                 DT = 74.08,
#                                 WT = 24.57,
#                                 SP = 23.12,
#                                 JT = 104.80,
#                                 ),
#                         f = dict(
#                                 HJ = 2.09,
#                                 LJ = 7.52,
#                                 TJ = 15.50,
#                                 PV = 5.06,
#                                 HT = 82.98,
#                                 DT = 76.80,
#                                 WT = 22.50,
#                                 SP = 22.63,
#                                 JT = 72.28,
#                                 ),
#                         )
# T = TypeVar('T')
#         R = [].append
#         R = R.__self__
# R = TypeVar('R')
# class LocalFileResolver(OriginalResolver):


import sys, os
        import unittest
        import doctest
        import sys
from unittest import TestCase
from athlib.utils import _rootdir
        from athlib.wma import agegrader
        from athlib import utils
        from athlib import codes

'''utilities to assist running the tests'''

class AthlibTestCase(TestCase):

    @classmethod
    def setUpClass(cls):
        me = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
        cls.__sys_path__ = sys.path[:]
        sys.path.insert(0, _rootdir)
        cls.__here__ = os.getcwd()
        os.chdir(me)

    @classmethod
    def tearDownClass(cls):
        os.chdir(cls.__here__)
        sys.path[:] = cls.__sys_path__

def main():
    was_here = os.getcwd()
    try:

# Path: athlib/utils.py
# def normalize_gender(gender: Any) -> str:
# def str2num(s: str) -> Union[int, float]:
# def parse_hms(t: Union[int, float, str]) -> Union[int, float]:
# def get_distance(discipline: str) -> Optional[int]:
# def get_duration_event_time(dev: str) -> Optional[int]:
# def round_up_str_num(s: str, prec: int = 2, maxDP: int = 5) -> str:
# def format_seconds_as_time(seconds: float, prec: int = 0) -> str:
# def field_event_record(evc: str, gender: str = 'all') -> Optional[float]:
# def check_performance_for_discipline(
#     discipline: str,
#     textvalue: str,
#     gender: str = 'all',
#     ulpc: float = 120/100.0,
#     errorKlass: Type[Exception] = ValueError,
#     prec: int = None
# ) -> str:
# def discipline_sort_key(discipline: Optional[str]) -> Tuple[int, int, str]:
# def text_discipline_sort_key(discipline: str) -> str:
# def sort_by_discipline(stuff: List[T], attr: str = "discipline") -> List[T]:
# def check_event_code(c: str) -> Optional[Match[str]]:
# def _norm_tzeroes(s: str) -> str:
# def _norm_cm(s: str) -> str:
# def _norm_m(s: str) -> str:
# def _norm_kg(s: str) -> str:
# def _norm_g(s: str) -> str:
# def normalize_event_code(c : str) -> str:
# def isStr(o):
# def nativeStr(o, enc="utf8"):
# def localpath(relpath: str, pstart: int = 0) -> str:
#     def resolve_from_url(self, url: str) -> str:
# def _add_to_cache(c: Dict[R, T], t: R, v: T, maxlen: int = 20) -> T:
# def schema_valid(schema_file : str,  # should be relative path
#                  validator=jsonschema.Draft3Validator,
#                  expect_failure: bool = False) -> bool:
# def valid_against_schema(json_file: str, schema_file: str, expect_failure: bool = False) -> bool:
# def is_hand_timing(perf: Any) -> bool:
# FIELD_EVENT_RECORDS_BY_GENDER : Dict [str, Dict[str, float]]= dict(
#                         m = dict(
#                                 HJ = 2.45,
#                                 LJ = 8.95,
#                                 TJ = 18.29,
#                                 PV = 6.16,
#                                 HT = 86.74,
#                                 DT = 74.08,
#                                 WT = 24.57,
#                                 SP = 23.12,
#                                 JT = 104.80,
#                                 ),
#                         f = dict(
#                                 HJ = 2.09,
#                                 LJ = 7.52,
#                                 TJ = 15.50,
#                                 PV = 5.06,
#                                 HT = 82.98,
#                                 DT = 76.80,
#                                 WT = 22.50,
#                                 SP = 22.63,
#                                 JT = 72.28,
#                                 ),
#                         )
# T = TypeVar('T')
#         R = [].append
#         R = R.__self__
# R = TypeVar('R')
# class LocalFileResolver(OriginalResolver):


# Path: tests/runall.py
import sys, os
        import unittest
        import doctest
        import sys
from unittest import TestCase
from athlib.utils import _rootdir
        from athlib.wma import agegrader
        from athlib import utils
        from athlib import codes

'''utilities to assist running the tests'''

class AthlibTestCase(TestCase):

    @classmethod
    def setUpClass(cls):
        me = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
        cls.__sys_path__ = sys.path[:]
        sys.path.insert(0, _rootdir)
        cls.__here__ = os.getcwd()
        os.chdir(me)

    @classmethod
    def tearDownClass(cls):
        os.chdir(cls.__here__)
        sys.path[:] = cls.__sys_path__

def main():
    was_here = os.getcwd()
    try:

        sys.path.insert(0, _rootdir)
