att / rcloud.params

Notebook parameters for RCloud
3 stars 9 forks source link

make invalid values impossible #15

Open gordonwoodhull opened 5 years ago

gordonwoodhull commented 5 years ago

Currently if you add a widget in non-blocking mode, and the variable doesn't exist, it will be initialized to "", which is invalid for most types.

It's great that we now support the non-blocking mode, but it's super important that controls never put variables in an invalid state, even if they were not previously declared.

The default value can come from the code (declaring and initializing the variable), or it can come from the query string. If there is no default value, and rcloud.params is in the non-blocking mode, it should either block or just error out.

Since blocking may not always be possible without a submit button - it just doesn't make sense for a lot of controls - erroring seems to be the only solution here.