write_schema

write_schema(path='schema/spec.schema.json')

Write the schema to a file, creating the directory if it is not there.

Also the platypus-schema console script. An editor that understands JSON Schema will complete and check a YAML configuration against it, which is the cheapest way to find a misspelled key - before a run rather than during one.

Parameters

Name Type Description Default
path str | Path Where to write. The default is the path the repository keeps it at. 'schema/spec.schema.json'

Returns

Name Type Description
Path The path written, so a caller can print it.

import json, pathlib, tempfile written = write_schema(pathlib.Path(tempfile.mkdtemp()) / “spec.schema.json”) written.name ‘spec.schema.json’ json.loads(written.read_text())[“title”] ‘platypus experiment specification’