Closed annakrystalli closed 1 year ago
Yes, I agree. I think changing this to a more generic "numeric" format would be appropriate.
OK great. Now that I've been working on https://github.com/Infectious-Disease-Modeling-Hubs/hubAdmin/issues/7 & https://github.com/Infectious-Disease-Modeling-Hubs/hubUtils/issues/40, it's become apparent that, for both loading data and validation, it's better to restrict to actual R data types returned by typeof()
which would be "integer"
or "double"
. Numeric is too generic and never retunred by typeof()
. So I suggest using an array of ["integer", "double"]
and removing any reference to "numeric"
in the schema. I can likely make this backwards compatible though.
I noticed that in the schema, specifying
output_type
mean
minimum
andmaximum
values in a config file is restricted to"integer"
:https://github.com/Infectious-Disease-Modeling-Hubs/schemas/blob/19f40344655064dff9fc8e78f7a10eacb5894cea/v0.0.1/tasks-schema.json#L474-L480
Same in
median
:https://github.com/Infectious-Disease-Modeling-Hubs/schemas/blob/19f40344655064dff9fc8e78f7a10eacb5894cea/v0.0.1/tasks-schema.json#L568-L575
Although these are optional properties, Is this unnecessarily restrictive? I can imagine someone perhaps wanting to use a decimal number to specify ranges. Should I change the schema to
["integer", "number"]
.