NREL / REopt_API

The model for the REopt API, which is used as the back-end for the REopt Webtool (reopt.nrel.gov/tool), and can be accessed directly via the NREL Developer Network (https://developer.nrel.gov/docs/energy-optimization/reopt)
https://developer.nrel.gov/docs/energy-optimization/reopt
Other
87 stars 46 forks source link

add API job/ tests with posts that include all optional model keys #347

Closed hdunham closed 1 year ago

hdunham commented 2 years ago

All models that don't get created unless the user includes them (e.g. CHP) need to be included in a test post. We need to do this to make sure all the Django fields are aligned with the REopt.jl struct fields.

rathod-b commented 2 years ago

I will include a test which includes all model keys with pass-messages branch. A possible bug / pending item is how we handle prod factor for Wind. If a user provides the Wind key but not the prod factor, it defaults to [] which causes failure in REopt. This issue will need a bit more digging.

rathod-b commented 1 year ago

Added test test_superset_input_fields in https://github.com/NREL/REopt_API/blob/master/reoptjl/test/test_job_endpoint.py. This test is meant to exercise all possible inputs/outputs in API V3 (as long as it is incrementally updated along with API v3 updates).