Esempio n. 1
0
File: tables.py Progetto: nlarew/mut
def run(root_config: mut.config.RootConfig, paths: List[str]):
    logger.info('Tables')
    config = TableConfig(root_config)
    for path in paths:
        with open(path, 'r') as f:
            Table.load(path, config)

    config.output()
Esempio n. 2
0
File: toc.py Progetto: nlarew/mut
def run(root_config: mut.config.RootConfig, paths: List[str]):
    logger.info('Tocs')
    config = TocConfig(root_config)
    for path in paths:
        raw_tocs = mut.util.load_yaml(path)
        Toc.load(raw_tocs, path, config)

    config.output()
Esempio n. 3
0
def run(root_config: mut.config.RootConfig, paths: List[str]):
    logger.info('Options')
    config = OptionsConfig(root_config)
    for path in paths:
        raw_options = mut.util.load_yaml(path)
        [Option.load(o, path, config) for o in raw_options if o]

    config.output()
Esempio n. 4
0
def run(root_config: mut.config.RootConfig, paths: List[str]):
    logger.info('Release')
    config = ReleaseConfig(root_config)
    for path in paths:
        raw_entries = mut.util.load_yaml(path)
        [ReleaseEntry.load(e, path, config) for e in raw_entries]

    config.output()
Esempio n. 5
0
def run(root_config: mut.config.RootConfig, paths: List[str]):
    logger.info('Extracts')
    config = ExtractConfig(root_config)
    for path in paths:
        raw_extracts = mut.util.load_yaml(path)
        [Extract.load(e, path, config) for e in raw_extracts if e]

    config.output()
Esempio n. 6
0
def run(root_config: mut.config.RootConfig, paths: List[str]) -> List[mut.MutInputError]:
    logger.info('Exercises')
    config = ExerciseConfig(root_config)
    for path in paths:
        with open(path, 'r') as f:
            raw_exercises = mut.util.load_yaml(path)
            [load_exercises(raw, path, config) for raw in raw_exercises]

    config.output()
    return root_config.warnings
Esempio n. 7
0
File: steps.py Progetto: nlarew/mut
def run(root_config: mut.config.RootConfig,
        paths: List[str]) -> List[mut.MutInputError]:
    logger.info('Steps')
    config = StepsConfig(root_config)
    for path in paths:
        raw_steps = mut.util.load_yaml(path)
        StepsList.load(raw_steps, path, config)

    config.output()

    return config.root_config.warnings
Esempio n. 8
0
def run(root_config: mut.config.RootConfig,
        paths: List[str]) -> List[mut.MutInputError]:
    logger.info('Apiargs')
    config = ApiargsConfig(root_config)
    for path in paths:
        with open(path, 'r') as f:
            raw_apiargs = yaml.load_all(f)
            Apiargs.load(raw_apiargs, path, config)

    config.output()
    return root_config.warnings
Esempio n. 9
0
def run(root_config: mut.config.RootConfig,
        paths: List[str]) -> List[mut.MutInputError]:
    logger.info('Images: %d', len(paths))
    config = ImagesConfig(root_config)
    for path in paths:
        raw_images = mut.util.load_yaml(path)
        [
            Image.load(raw_image, path, config) for raw_image in raw_images
            if raw_image
        ]

    config.output()

    return config.root_config.warnings