hubmapconsortium-graveyard / hubmap-sample-metadata

Sample metadata for use in the HuBMAP Portal during development
MIT License
0 stars 0 forks source link

Pick a JSON templating engine #28

Open mccalluc opened 5 years ago

mccalluc commented 5 years ago

Options:

mccalluc commented 5 years ago

additional options from: https://github.com/google/jsonnet/issues/711

Evaluations:

sparkprime commented 5 years ago

Big difference between Jsonnet and Starlark is the latter really only has functions whereas in Jsonnet you can define data structures in terms of other datastructures (it's more data-oriented). If you use Jsonnet, use the go-jsonnet port as it's much faster and where we want to continue development. As for std.extVar you can also write your configs in the form of a function that accepts parameters, but then you have to thread them through into other files. If you do use std.extVar you can do local x = std.extVar("x"); at the top of your file in order to keep it concise.

mccalluc commented 5 years ago

Thanks for the feedback! In #29 I'm proposing that we use jsonnet... for the moment, the python port, but if this work continues we'll keep Go in mind. I may switch to the x = std.extVar("x"); at the top that you suggest... it feels a little more explicit about what's going on than the TLA syntax.