in scripts/validate.py [0:0]
def load_schema(name):
"""Load a schema and cache it."""
if name in ALL_SCHEMAS:
return ALL_SCHEMAS[name]
with SCHEMA_MAP[name].open("r") as f:
schema = json.load(f)
if name == "experiment":
# The new schema has a title "DesktopNimbusExperiment" instead of a self-ref.
if "DesktopNimbusExperiment" in schema:
schema = schema["DesktopNimbusExperiment"]
ALL_SCHEMAS[name] = schema
return ALL_SCHEMAS[name]