-
Notifications
You must be signed in to change notification settings - Fork 109
Add module for data handling and check integrity of turbine data #101
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
Conversation
It might be a good idea to copy some other data-functions to this module.
…ind-python/windpowerlib into features/new_data_structure_with_check
…es/new_data_structure_with_check
There are still some tests missing with a wrong dataset. At the moment the test will log suspicious data sets but will not remove them. It is possible to add additional checks. @birgits, @SabineHaas Please check whether you agree with the basic approach. |
This pull request introduces 1 alert when merging d32aca5 into 1273dea - view on LGTM.com new alerts:
|
…ind-python/windpowerlib into features/new_data_structure_with_check
…ind-python/windpowerlib into features/new_data_structure_with_check
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.
Thank you @uvchik and excuse my late review!
I already give my approval although you should check my suggestions and comments.
I would also appreciate if you could add some more comments and docstrings - at least a one line explanation for each new function. :)
|
||
def get_turbine_types(turbine_library="local", print_out=True, filter_=True): | ||
r""" | ||
Get all provided wind turbine types provided. |
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.
Get all provided wind turbine types provided. | |
Get all provided wind turbine types. |
"{0}: No cp-curve but has_cp_curve=True.".format(wt_type) | ||
) | ||
if wt.power_curve is not None: | ||
if len(wt.power_curve) < min_pc_length: |
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 we add a minimum length for cp curves, too?
A new thought about this issue. We could store the update of the turbine data at a new place. This will have some advantages:
|
Now default data is used instead of back files. Please check again.
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.
Looks good to me @uvchik !
windpowerlib/data.py
Outdated
filename = os.path.join(os.path.dirname(__file__), "oedb", "{0}.csv") | ||
|
||
# get all power (coefficient) curves and save to file | ||
# for curve_type in ['power_curve', 'power_coefficient_curve']: |
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.
# for curve_type in ['power_curve', 'power_coefficient_curve']: |
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.
Removed. Thanks 😄
UPDATE:
3.
get_turbine_types()
will not silently import new database from oedb. In the past the local data has been overwritten by this function.