open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

loadProcess in outcomes.js does not handle integer values #349

Closed skearnes closed 4 years ago

skearnes commented 4 years ago

TODO after #339 is merged.

skearnes commented 4 years ago

Note that this also affects loadRaw

skearnes commented 4 years ago

Also affects unload{Process,Raw}

skearnes commented 4 years ago

Also affects add{Process,Raw}

skearnes commented 4 years ago

Also affects various functions in codes.js

skearnes commented 4 years ago

Also: update the variable names (see https://github.com/Open-Reaction-Database/ord-schema/pull/339#discussion_r485778799)

skearnes commented 4 years ago

@connorcoley my solution in #350 is to look at the value in the text field and, if it can be parsed as an integer, use integer_value instead of float_value. This means that even numbers entered as e.g. 140.0 will be converted to integer_value in the Data message.

Is this what we want? Or do we want to expand the number radio button to float and integer?