hubverse-org / schemas

JSON schemas for modeling hubs
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

New value features #81

Open LucieContamin opened 3 weeks ago

LucieContamin commented 3 weeks ago

As I was wondering if it makes sense to allow to set the value type to"numeric".

Currently, "double" or "integer" are the two possibilities, but we can imagine a hub allowing to have some target as integer and/or some others as double and/or integer and it might be easier to allow a "numeric" type column to facilitate with that.

It might also allow some flexibility in case we have submission file with value column in different format and a hub accepting both format: For example:

> is.numeric(c(5L, 5))
[1] TRUE
> is.double(c(5L, 5))
[1] TRUE
> is.integer(c(5L, 5))
[1] FALSE

> is.integer(5L)
[1] TRUE
> is.double(5L)
[1] FALSE
> is.numeric(5L)
[1] TRUE

> is.integer(5)
[1] FALSE
> is.double(5)
[1] TRUE
> is.numeric(5)
[1] TRUE