Closed SabineHaas closed 5 years ago
Build fails with python 3.7 but not with 3.6 an 3.5 --- until now I don't know why
I could fix the travis problem, installing hdf5 manually in case of python3.7. The same has to be done for the windpowerlib setup, if we do not want users to be forced to manually install hdf5.
Has any of you @birgits, @uvchik, an idea how to do that nicely in the setup file or if it is possible at all? I will research more, if you do not know that - but I first wanted to ask.
Does this work?
pip install h5py
In the installation guide of h5py I found that it is not necessary to install libhdf5-dev
if you use the pre-compiled package. The advantage is, that such a requirement would work for all OS.
If it does not work with pandas we could use h5py directly. I think an easier installation would justify some extra code (if necessary).
If it does not work with pandas we could use h5py directly. I think an easier installation would justify some extra code (if necessary).
I had a look at that, too. However, HDFstore is a pandas class and therefore works perfectly with dataframes whereas h5py is closely connected to numpy and does not support such a data structure.
Therefore, I'd prefer a solution in the setup.py until the bug is fixed. From old issues (for example here) I understand that this PyTables problem also existed in older python versions but must have been solved, as test do not fail for 3.5 and 3.6.
From old issues (for example here) I understand that this PyTables problem also existed in older python versions but must have been solved, as test do not fail for 3.5 and 3.6.
I thought it is a general problem but if it is bug you should open an issue at the PyTables repository and ask them. Maybe they will fix it again. They are planing a minor release at the end of February.
In https://github.com/PyTables/PyTables/issues/704 it is mentioned that:
No sorry. Currently PyTables is out of funds for doing this sort of maintenance work.
From the comments I understand that it might take some time until this is fixed. Therefore, I'd suggest to prepare our setup file with a workaround for python 3.7 until this is solved. I'd like to ask your support there @birgits as I think we would have to adapt the manual installation to every operating system. Or is there an easier way .. anybody experienced in that?
Travis seems to be able to test Windows and Mac as well.
https://blog.travis-ci.com/2018-10-11-windows-early-release
I wonder if it would avoid problems in the long run if use csv-files instead. We could flatten the array in some way. This would cost us a few extra lines but will avoid all the installation problems.
The problem seems to be fixed now!
Travis seems to be able to test Windows and Mac as well.
I did not realize we were only testing linux.. I thing it would be convenient to test Windows and Mac, too.
I wonder if it would avoid problems in the long run if use csv-files instead. We could flatten the array in some way. This would cost us a few extra lines but will avoid all the installation problems.
As it is working now I would leave the hdf5 version. If the problem keeps on occurring csv could be the -not nice but working- solution
Fixes #43.
When turbine data is first loaded from oedb it is stored in a hdf5 file. Then data is loaded from the file (as long as it exists). Overwrite file by using get_turbine_data_from_oedb() with
overwrite
= True or just executing load_turbine_data_from_oedb().