trackintel
trackintel copied to clipboard
Fix version numbers for trackintel dependencies
As mentioned in #396 I am getting more and more errors that are linked to trackintel being installed with incompatible versions of its dependencies. A recent example:
Since PR #404 trackintel uses the pygeos function get_coordinates()
with the return_index
function which is introduced in pygeos version 10.
I think especially because the python geolibraries are under constant development this will happen all the time. The only solution to this is to fix the versions or at least the lower limit of the versions in the following files:
- https://github.com/mie-lab/trackintel/blob/master/setup.py
- https://github.com/mie-lab/trackintel/blob/master/requirements.txt
- https://github.com/mie-lab/trackintel/blob/master/environment.yml
- https://github.com/mie-lab/trackintel/blob/master/docs/environment.yml
Hm... I wonder how other libraries are avoiding these problems. It seems like geopandas and moving_pandas
are not really defining dependencies.
Another way to avoid these problems would be to reinstall the environment constantly...
For geopandas I know that they are hiding the dependencies in a version checker file _compat
that sets some global flags. They just implement the same function in different versions depending on what is installed. I think this is not practical for us :D
I think we should also add a lower bound for what we use, but keeping track of that can be tedious.
Yes, I agree ;-) We should simply add minimum requirements if we notice them. E.g., the pygeos version mentioned above. Any idea how we can find out what caused #420 ?
Done in #422 :)
As for the bug in #420. We probably would have to search in the space of possible numpy-pandas versions what could cause the bug (perhaps automatically). But the error message is quite cryptic to me as pandas is using the datetype timedelta[ns]
from numpy and both library then support it basically by default.