UMapMaster

Mapping classes of Ursgal

UParamMapper

class ursgal.umapmaster.UParamMapper(*args, **kwargs)

UParamMapper class offers interface to ursgal.uparams

Be default, the ursgal.uparams are parsed and the UParamMapper class is set with the ursgal_params dictionary.

get_masked_params(mask=None)

Lists all uparams and the fields specified in the mask

For example:

upapa.get_masked_params( mask = ['uvalue_type']) will return::
    {
        '-xmx' : {
            'uvalue_type' : "str",
        },
        'aa_exception_dict' : {
            'uvalue_type' : "dict",
        },
        ...
    }
group_styles()

Parses self.items() and build up lookups. Additionally, consistency check is performed to guarantee that each engine is mapping only on one style.

The lookup build and returned looks like:

lookup = {
    'style_2_engine' : {
        'xtandem_style_1' : [
            'xtandem_sledgehamer',
            'xtandem_cylone',
            ...
        ],
        'omssa_style_1' ...
    },
    # This is done during uNode initializations
    # each unode will register its style with umapmaster
    #
    'engine_2_style' : {
        'xtandem_sledgehamer' : 'xtandem_style_1', ...
    },
    'engine_2_params' : {
        'xtandem_sledgehamer' : [ uparam1, uparam2, ...], ...
    },
    'style_2_params' : {
        'xtandem_style_1' : [ uparam1, uparam2, ... ], ...
    },
    'params_triggering_rerun' : {
        'xtandem_style_1' : [ uparam1, uparam2 .... ]
    }
}
mapping_dicts(engine_or_engine_style)

yields all mapping dicts