CoinAlpha / gateway-api

Apache License 2.0
47 stars 25 forks source link

[UX] Hummingbot create and gateway create scripts should be able to work with both relative paths and absolute paths #121

Closed martinkou closed 3 years ago

martinkou commented 3 years ago

Why

I was following the docker installation instructions on our documentation, for installing both Hummingbot and Hummingbot gateway. They are currently treating the path inputs for hummingbot_conf in opposite ways and is very confusing for users:

  1. hummingbot create script expects me to put in relative paths. If I put in an absolute path, it concatenates the absolute path to the current path (e.g. if I input /home/martin_kou/hummingbot_conf, it becomes /home/martin_kou/Downloads//home/martin_kou/hummingbot_conf). So I'd have to re-run the script again to get the correct path.

  2. gateway create script expects me to put in absolute paths. If I put in a relative path, it simply fails with a Docker error.

What

Fix the path parsing logic in the current create scripts, for both Hummingbot and gateway. They should be able to parse both absolute and relative paths.