コード例 #1
0
ファイル: __init__.py プロジェクト: vpuenteg/where
def names():
    """List the names of the available parsers

    Returns:
        List: List of strings with the names of the available parsers
    """
    return plugins.list_all(package_name=__name__)
コード例 #2
0
ファイル: __init__.py プロジェクト: vpuenteg/where
def names():
    """List names of integrators for a given session

    The list of names will be sorted according to the sort_value of the integrator plugins (use `register_ordered` to
    define a sort value for an integrator).

    Returns:
        List:   Sorted list of names of integrators.
    """
    return plugins.list_all(package_name=__name__)
コード例 #3
0
def satellites():
    """Available satellites and where they are defined

    Returns:
        Dict: For each satellite, a tuple describing which satellite plug-in defines the satellite.
    """
    return {
        p.lower(): (s, p)
        for s in plugins.list_all(__name__)
        for p in plugins.list_parts(__name__, s)
    }
コード例 #4
0
def names():
    """List the names of the available writers specified in the configuration

    The available writers (modules in the writers directory) are compared to the list specified in the ``output``-field
    of the configuration file. Only writers that appears both places are returned.

    Returns:
        List: List of strings with the names of the available writers.

    """
    return plugins.list_all(package_name=__name__, config_key="output")
コード例 #5
0
ファイル: __init__.py プロジェクト: priyatharsan/where
def apply_editors(config_key, dset):
    """Apply editors for a given session

    Args:
        config_key (String):  The configuration key listing which editors to apply.
        dset (Dataset):       Dataset containing analysis data.
    """
    prefix = config.analysis.get("analysis", default="").str
    editors = plugins.list_all(package_name=__name__,
                               config_key=config_key,
                               prefix=prefix)
    log.info(f"Applying editors")
    return plugins.call_all(package_name=__name__,
                            config_key=config_key,
                            prefix=prefix,
                            dset=dset)
コード例 #6
0
def options():
    """List the command line options for starting the different pipelines

    Returns:
        Dict:  Command line options pointing to pipelines
    """
    options = dict()
    plugin_files = plugins.list_all(package_name=__name__)

    for pipeline in plugin_files:
        try:
            pipeline_options = plugins.call_one(package_name=__name__,
                                                plugin_name=pipeline,
                                                part="options")
        except exceptions.UnknownPluginError:
            continue
        options.update({opt: pipeline for opt in pipeline_options})

    return options