-
Notifications
You must be signed in to change notification settings - Fork 5
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
AttributeError occurs during pytest in /tests #178
Comments
I cannot reproduce the error. Which version of oemof.tabular do you have installed? When I run pytest with the up-to-date |
I reinstalled Anaconda3-2024.06-1-Linux-x86_64.sh and the version of oemof-tabular is 0.0.5. I did clone the repo shortly before trying pytest. The environment was created with |
Hi @SabineHaas ! If I install via
Here as @miriabeh mentions And afterwards dev should be released as a hot fix for the main branch, which fails checks right now due to #179. |
I've just checked: numpy is not a requirement of oemof.tabular (see setup.py). First thing would be to check which package it comes with. The fix would have to be done there. |
Yes that's true. It comes with oemof.solph. Compare these two: https://github.com/oemof/oemof-solph/blob/v0.5.2.dev1/setup.py (our current dependency - numpy not fixed) @miriabeh could you please create a branch on oemof.tabular locally with a modified setup.py which installs oemof.solph v0.5.3a2 and run all tests? I fear the tests will fail due to the progress in oemof.solph and there will be work for us oemof.tabular developers. The alternative for the transition would be my suggestion to fix numpy here and note that we did this because of the pyomo bug and it needs to be reverted once the bug is fixed in that repo. |
@SabineHaas what do you think? Should there be a quick fix on dev before the next release? |
Yes, for the a release the tests should pass in my opinion. |
Last time I checked on dev fixing numpy the tests have passed. |
Ah sorry, I haven't missed the messages above: @miriabeh has updated to another solph version which is probably why the tests are failing. Edit: alternatively we could try a fix in tabular. If we add a numpy requirement after the solph requirement, this should work, as well, I think. |
I guess the newer solph version will also have tests failing because of the progress happened there. We will need to integrate it in our code. I mean it has to be done sooner or later. If you have the capacities it would be nice. But if not, the quick fix with numpy will surely do it for now. But in my opinion it is important that the latest tabular version works. :) |
I did a quick fix #181 |
running pytest in tests creates an ErrorMessage:
AttributeError:
np.float_
was removed in the NumPy 2.0 release. Usenp.float64
instead.. Did you mean: 'float16'?temporary solution:
install a different numpy version, that is of version <2.0.0
pip install 'numpy<2.0.0'
The text was updated successfully, but these errors were encountered: