Skip to content
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

Update windpowerlib to work for newer python versions and add automatic testing #136

Merged
merged 43 commits into from
Feb 9, 2024

Conversation

birgits
Copy link
Member

@birgits birgits commented Jan 10, 2024

This PR does the following:

  • Updates the code basis to work for newer versions of python that only work with newer versions of pandas
  • In the course of the above, the support for python 3.6 to python 3.9 is discontinued. However, python 3.9 should still work, it is just not tested anymore.
  • Adds github actions to run tests automatically when changes are pushed to github.
  • Automatic testing on github required changes in how the example jupyter notebooks are tested.

birgits added 30 commits January 8, 2024 14:59
Duplicated wind speed entries lead to errors
I couldn't reproduce the full load hours previously set (1956.164053)
even with older versions of python (checked down to 3.8) and pandas
(checked down to 1.3.5), so I assume, that the value was incorrect. It
was possibly not checked, as the example tests are not in the tests
directory but the example directory.
@birgits birgits marked this pull request as ready for review January 16, 2024 20:13
@birgits birgits requested a review from uvchik January 16, 2024 20:13
if len(broken_turbine_data) < 0.2 * len(turbine_data):
logging.warning(
f"The turbine library data contains faulty {curve_type}s. The "
f"{curve_type} data can therefore not be loaded for the following "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but I think that one broken data set can make the whole file unusable. Maybe we should add a hint that in that case it is possible to use the function restore_default_turbine_data()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I added these checks so that one broken data set could not make the newly downloaded data unusable, as happened in the last weeks due to bugs in the oedb turbine library data. I moved the checks to a separate function now to be able to test it independent of the oedb data and added tests to show that it is working correctly.

Copy link
Member

@uvchik uvchik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment. Everythoing else looks fine. Thanky you very much @birgits 😄

@birgits birgits merged commit 5af422d into dev Feb 9, 2024
4 checks passed
@birgits birgits deleted the features/fix_and_add_automatic_tests branch February 9, 2024 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants