ospc-org / ospc.org

Source code for PolicyBrain, ospc.org, and related assets.
MIT License
24 stars 32 forks source link

Add default parameter handling for macro elasticity simulation #908

Closed lucassz closed 6 years ago

lucassz commented 6 years ago

Add default parameter handling for macro elasticity simulation. Follow-up to #883 and #905: currently, running the macro elasticity model without inputting any data results in not even a UI error, but an uncaught server error in converting an empty string to a float. This adds default handling in a general way. However, it does make the assumption that there is only one column/value per input; this was already implied in the previous code, and I believe that should be okay for this model, but please let me know if it is not.

hdoupe commented 6 years ago

@lucassz Nice catch. Would you mind adding a test in the dynamicapp where a reform is submitted with the defaults?

lucassz commented 6 years ago

@hdoupe This is done. I had to make the class not be a TestCase to get the parametrization to work.

hdoupe commented 6 years ago

LGTM. @lucassz are you ready for this to be merged?

lucassz commented 6 years ago

@hdoupe Seems good to me too.

hdoupe commented 6 years ago

Cool, thanks for the contribution.