Validate¶
validate
¶
Command-line validation of op_system specifications.
Usage::
python -m op_system.validate CONFIG.yml [CONFIG.yml ...] [--json]
Each file may be a bare op_system spec or a flepimop2 configuration whose
system entries use module: op_system. The exit code is 0 when every
spec passes and 1 otherwise. Reading YAML requires PyYAML.
main(argv=None)
¶
Validate every op_system spec in the given files.
Returns:
| Type | Description |
|---|---|
int
|
|
Source code in src/op_system/validate.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
specs_from_file(path)
¶
Return (label, spec) pairs from a spec or flepimop2 config file.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If PyYAML is not installed. |
Source code in src/op_system/validate.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |