add offgrid wind to job/ app, update generator and PV defaults#343
Conversation
Include all fields added/updated for off_grid and name changes
update validator tests as well
changing defaults to 0.076 gal/kWh and 0 gal/hr intercept. This aligns with current API (v2) and Julia Pkg defaults. Remove default slope and intercept based on system size.
|
@rathod-b do we need to provide this message in |
|
I've finished reviewing and left some comments. The PR description also needs to be filled out. |
Simplify how we validate certain fields when off-grid is true
My understanding is also that null=True isn't necessary if a default is provided, though I haven't been able to find this said explicitly in the Django docs so had been holding off on the issue. Removing all unnecessary null=True is something that I've been keeping in mind as a low priority to-do for a while and was going to include in a general validator.py/models.py clean up after finishing more urgent capabilities. |
Good idea, once we merge everything into API v3 over the next few weeks it would be nice to clean up the code and remove redundancies/make functions for repetitive validations in model cross_clean |
Correct how defaults were being set for some off-grid related inputs, update default values, update the testcase, up REopt
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
(Bug fix, feature, docs update, ...)
The following Minor Updates have been added to the job/ endpoint:
Added
job/endpoint: Add inputs and validation to model off-grid windChanged
job/models.py: remove Generatorfuel_slope_gal_per_kwhandfuel_intercept_gal_per_hrdefaults based on size, keep defaults independent of sizejob/validators.py: Align PV tilt and aziumth defaults with API v2 behavior, based on location and PV typeWhat is the current behavior?
(You can also link to an open issue here)
off_grid_flag=TrueWhat is the new behavior (if this is a feature change)?
See above
Does this PR introduce a breaking change?
(What changes might users need to make in their application due to this PR?)
The PV and generator default changes are breaking as compared to previous v3 (job/ app) behavior, but not as compared to v2.