Closed dougiesquire closed 2 months ago
In an instance like this (input
paths) payu
accepts either a string or an array an coerces the former into the latter
https://github.com/payu-org/payu/blob/master/payu/models/model.py#L145-L148
This seems a friendly approach. Apparently it is possible to express this sort of thing in json schema
https://stackoverflow.com/a/34641055/4727812
I like this approach because it is human-friendly. Yes the model
field needs to be able to accept arrays, but in practice they are almost never specified like that, so it seems perverse and unintuitive to force users to do so.
I like this approach because it is human-friendly. Yes the model field needs to be able to accept arrays, but in practice they are almost never specified like that, so it seems perverse and unintuitive to force users to do so.
I agree. I've opened an issue to broaden the schema here: https://github.com/ACCESS-NRI/schema/issues/11
Noting that the schema has now been broadened so this issue can be closed once Payu has been updated to use the new schema - see https://github.com/payu-org/payu/issues/429
The
model
field in themetadata.yaml
file should be an array to allow for experiments that contain multiple models. Currently Payu writes a string, which means that the auto-generatedmetadata.yaml
files don't validate against theexperiment_asset.json
schema.It could possibly be worth automatically checking somewhere that Payu is generating valid
metadata.yaml
files.