Open-EO / openeo-grassgis-driver

OpenEO driver for GRASS GIS/actinia. Backend description at https://openeo.mundialis.de/.well-known/openeo
Apache License 2.0
7 stars 9 forks source link

Windows installation: KeyError os.environ["HOME"] #83

Open ahalota opened 3 years ago

ahalota commented 3 years ago

I'm failing several of the tests on a Windows install, because Windows uses "USERPROFILE" instead of "HOME".

I'm not sure if this is designed to run with Windows or not, for now I am going to replace the code on my end with this:

import os.path
home_folder = os.path.expanduser('~')

(src: https://stackoverflow.com/questions/14742064/python-os-environhome-works-on-idle-but-not-in-a-script/33935163)

ahalota commented 3 years ago

I'm not familiar with your process and how much Windows support you have planned in, I am happy to push any updates I make as I run through this on my Windows machine, in case anything else comes up.

ahalota commented 3 years ago

I see now that actinia's installation instructions say it works for linux only, so this issue is mostly irrelevant (unless they change this on their end eventually). Either way it can't hurt to make it os neutral.

mmacata commented 3 years ago

Hi ahalota, we only use it on linux environments, mostly inside a docker container, so no current plans for Windows support. But I agree with you - it can't hurt to make it os neutral. If you are willing to push your updates as you said, it would help! As a running actinia instance is independant from this backend, they can be installed on different operating systems.

jonas-eberle commented 3 years ago

os.environ["HOME"] seems only be used in the config.py. So this relates to https://github.com/Open-EO/openeo-grassgis-driver/issues/76. Such a config file would solve this issue here.

metzm commented 1 year ago

TODO: Use os.path.expanduser('~') in config.py