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

Fix pandas issues #34

Merged
merged 19 commits into from Jan 27, 2021
Merged

Fix pandas issues #34

merged 19 commits into from Jan 27, 2021

Conversation

p-snft
Copy link
Member

@p-snft p-snft commented Jan 22, 2021

This PR introduces the following changes:

  • Rework generation of time series to allow usage of Pandas >= 1.2
  • Require more recent version of dependencies (pandas>=1.0, numpy >= 1.17)
  • Split electric and thermal profile generation into two files (helped with debugging)
  • Test sums over individual profiles instead of sum over all profiles (still no unit test, but an improvement, see There are no unit tests #35)

It seems, pandas requires minimum versions of numpy, but only checks for them instead of doing proper dependency handling.
As a workaround, we can define a minimum version for numpy, that will work with recent releases of pandas.
@p-snft p-snft changed the title Require numpy 1.17 Allow use with recent pandas releases Jan 22, 2021
@pep8speaks
Copy link

pep8speaks commented Jan 22, 2021

Hello @p-snft! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-01-25 15:49:36 UTC

@p-snft p-snft marked this pull request as draft January 22, 2021 20:01
@p-snft p-snft changed the title Allow use with recent pandas releases Fix pandas issues Jan 22, 2021
@p-snft
Copy link
Member Author

p-snft commented Jan 22, 2021

Setting pandas to < 1.2 might workaround the issue but does not solve it. 1.2 has improved error detection, so our code is probably erroneous:

pandas-dev/pandas#16228

@p-snft
Copy link
Member Author

p-snft commented Jan 23, 2021

The decrease in Coverage is actually caused by the dynamic H0 function. As the CI pipeline was broken, however, the decreased coverage was not recognised. In my opinion, the testing should be addressed in another PR.

@p-snft p-snft mentioned this pull request Jan 24, 2021
@p-snft
Copy link
Member Author

p-snft commented Jan 24, 2021

A proper solution might be to

  1. set index as an ordinary column
  2. merge
  3. make column from 1 the index.

@p-snft p-snft added the bug label Jan 25, 2021
@p-snft p-snft marked this pull request as ready for review January 25, 2021 15:14
@p-snft p-snft requested a review from uvchik January 25, 2021 15:46
@p-snft p-snft self-assigned this Jan 26, 2021
Copy link
Member Author

@p-snft p-snft left a comment

Choose a reason for hiding this comment

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

I checked that the results of the examples are unchanged. Considering that the last release is actually broken, @uvchik agreed that my self-review this is good enough.

@p-snft p-snft merged commit 1b7a58d into master Jan 27, 2021
@p-snft p-snft deleted the fix/dependency_compat branch January 27, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants