INNER CODE UNIT · Python

get_schema_values_diff

jupyterhub/zero-to-jupyterhub-k8s · tools/compare-values-schema-content.py:79

def get_schema_values_diff(values_file, schema, schema_wildcards):
    with open(values_file) as f:
        values = yaml.safe_load(f)
    values = flatten(values)
    return {
        v
        for v in schema - values
        if not startswith_any_element_in_list(v, schema_wildcards)
    }


def run():
    with open(schema_yaml) as f:
        schema = yaml.safe_load(f)
    schema = flatten(reduce_schema(schema))
    schema_wildcards = {l[:-2] for l in schema if l.endswith(".*")}
    schema = {l for l in schema if not l.endswith(".*")}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…