pyaltt2/config.py
def load_yaml(fname, schema=None):
    """
    Load config from YAML/JSON file

    Args:
        fname: file name to load
        schema: JSON schema for validation
    """
    with open(fname) as fh:
        data = yaml.load(fh.read())
    if schema:
        import jsonschema
        jsonschema.validate(data, schema=schema)
    return data

    Load config from YAML/JSON file

    Args:
        fname: file name to load
        schema: JSON schema for validation
    
Load config from YAML/JSON file
Load config from YAML / JSON file
def load_yaml(fname, schema=None):
    with open(fname) as fh:
        data = yaml.load(fh.read())
    if schema:
        import jsonschema
        jsonschema.validate(data, schema=schema)
    return data
def load_yaml ( fname , schema = None ) : with open ( fname ) as fh : data = yaml . load ( fh . read ( ) ) if schema : import jsonschema jsonschema . validate ( data , schema = schema ) return data
Load config from YAML/JSON file
Load config from YAML / JSON file
"""
    Load config from YAML/JSON file

    Args:
        fname: file name to load
        schema: JSON schema for validation
    """
fname
file name to load
file name to load
schema
JSON schema for validation
JSON schema for validation