INNER CODE UNIT · Python

run

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

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(".*")}

    schema_values_diff = get_schema_values_diff(values_yaml, schema, schema_wildcards)
    if schema_values_diff:
        print("values.schema.yaml entries not found in values.yaml:")
        for l in sorted(schema_values_diff):
            print(f"- {l}")

    lint_schema_values_diff = get_schema_values_diff(
        lint_values_yaml, schema, schema_wildcards
    )
    if lint_schema_values_diff:
        print("values.schema.yaml entries not found in lint-and-validate-values.yaml:")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…