-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic API #195
Add basic API #195
Conversation
landbosse/landbosse_runner.py
Outdated
""" | ||
NUM_BLADES = 3 | ||
|
||
component_param = project_parameters.pop("component") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the data be being removed from proejct_parameters
? Even though this is happening inside this method, it will be directly modifying whatever is passed to project_parameters
and want to be sure that's the intended behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this all squared away, this should be good to go now!
Create a basic API to allow LandBOSSE to be called more easily from other tools, and to return results as objects rather than writing to excel files.
The new LandBOSSERunner class recreates the existing function calls for running LandBOSSE, but without writing to Excel.
The LandBOSSEResult class is a simple container for the results that LandBOSSE generates.
The input to the new API is now a yaml file, but it still requires an excel input file as well. Most of the contents of that yaml file are basic inputs (e.g. number of turbines), however one entry is a filepath to an excel sheet containing additional tabular input data. Rather than having all the inputs in yaml file(s), the inputs are split between a yaml file and an excel file. The idea is, the yaml file contains those inputs which are changed regularly when iterating on parameter values, whereas the excel file contains structured input tables that are unlikely to be modified with any regularity.
Also includes some refactoring of existing LandBOSSE modules to avoid deprecation warnings and avoid repeated use of pd.concat to create dataframes row by row.
Currently the LandBOSSERunner class requires a weather dataframe input with wind speed timeseries data to calculate wind delays. If running LandBOSSE using the old input method, this data must be in the input excel file. It would be possible to have the LandBOSSERunner class download Wind Toolkit data if no weather dataframe is provided, but this is not currently implemented (and would require an API, as well as inputs on the location and time period of the weather data).