mocnik-science / osm-python-tools

A library to access OpenStreetMap related services
GNU General Public License v3.0
438 stars 48 forks source link

Reduce footprint / make dependencies optional #72

Open st-a opened 1 year ago

st-a commented 1 year ago

Hi @mocnik-science, thanks a lot for this very useful python package.

I am using OSMPythonTools in a server context and recognized, that there are some really heavy dependencies: matplotlib, numpy and pandas. Would you mind making these optional, as they are only used by the data module?

Here is a comparison of the virtual environment folder (Linux) with and without optional dependencies:

Besides modifying setup.py, I did add some documentation where applicable.

Unfortunately I was not able to run the tests. This should be no problem, as there were no changes to the internal code. The output of pytest --verbose is:


Test session starts (platform: linux, Python 3.11.3, pytest 7.3.1, pytest-sugar 0.9.7)
cachedir: .pytest_cache
rootdir: /home/sta/temp/new
plugins: sugar-0.9.7
collected 0 items

Results (0.01s):