コード例 #1
0
fm_profile_types = (
    'acc',
    'loc',
)

keys_status_flags = tuple(v['id'] for v in viewvalues(OASIS_KEYS_STATUS))

perils = tuple(v['id'] for v in viewvalues(PERILS))

peril_groups = tuple(v['id'] for v in viewvalues(PERIL_GROUPS))

# Used simple echo command rather than ktools conversion utility for testing purposes
ECHO_CONVERSION_INPUT_FILES = {
    k: ChainMap({'conversion_tool': 'echo'}, v)
    for k, v in INPUT_FILES.items()
}


def standard_input_files(min_size=0):
    return lists(
        sampled_from([
            target['name'] for target in chain(
                viewvalues(GUL_INPUT_FILES), viewvalues(OPTIONAL_INPUT_FILES))
        ]),
        min_size=min_size,
        unique=True,
    )


def il_input_files(min_size=0):
コード例 #2
0
ファイル: data.py プロジェクト: cihanb/OasisLMF
        (t.get('FMLevelName'), t.get('FMLevel'))
        for t in itertools.chain(six.itervalues(canonical_exposures_profile_simple), six.itervalues(canonical_accounts_profile))
    ) if t != (None,None)], key=lambda t: t[1])
)

fm_term_types = tuple(FM_TERMS[k]['desc'] for k in FM_TERMS)

fm_profile_types = ('acc', 'loc',)

keys_status_flags = tuple(OASIS_KEYS_STATUS[k]['id'] for k in OASIS_KEYS_STATUS)

peril_ids = tuple(OASIS_PERILS[k]['id'] for k in OASIS_PERILS)
oed_peril_ids = tuple(OED_PERILS[k]['id'] for k in OED_PERILS)

# Used simple echo command rather than ktools conversion utility for testing purposes
ECHO_CONVERSION_INPUT_FILES = {k: ChainMap({'conversion_tool': 'echo'}, v) for k, v in INPUT_FILES.items()}

def standard_input_files(min_size=0):
    return lists(
        sampled_from([target['name'] for target in chain(six.itervalues(GUL_INPUT_FILES), six.itervalues(OPTIONAL_INPUT_FILES))]),
        min_size=min_size,
        unique=True,
    )


def il_input_files(min_size=0):
    return lists(
        sampled_from([target['name'] for target in six.itervalues(IL_INPUT_FILES)]),
        min_size=min_size,
        unique=True,
    )