ATFutures / geoplumber

Serve geographic data from R and consume with scalable front end.
https://atfutures.github.io/geoplumber/
59 stars 7 forks source link

Example from gp_add_geojson is not reproducible #14

Closed Robinlovelace closed 6 years ago

Robinlovelace commented 6 years ago

Currently it is

gp_add_geojson()

Which generates an error.

layik commented 6 years ago

Could I see the error?

Robinlovelace commented 6 years ago
gp_add_geojson()
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :

 Show Traceback

 Rerun with Debug
 Error in file(con, "r") : cannot open the connection 
layik commented 6 years ago

I assume there is no target "geoplumber" app created so I will add a "stop" to this method. Thanks @Robinlovelace

Robinlovelace commented 6 years ago

Or just a message that tells the user how to create a target app.

layik commented 6 years ago
geoplumber::gp_add_geojson()
#> Error in geoplumber::gp_add_geojson(): Is current dir a geoplumber app? 
#> Try geoplumber::gp_create()
#> Both src and Welcome.js do not exist.

Created on 2018-09-07 by the reprex package (v0.2.0).

layik commented 6 years ago

Test here and subsequent push

https://github.com/ATFutures/geoplumber/commit/fd596c3e36eeb7974f3b07beb447e23799ad6d60

layik commented 6 years ago

closeable?

geoplumber::gp_add_geojson()
#> Error in geoplumber::gp_add_geojson(): Is current dir a geoplumber app? 
#> Try geoplumber::gp_create() first.

Created on 2018-09-10 by the reprex package (v0.2.0).

Robinlovelace commented 6 years ago

Testing this now, looking good!

Robinlovelace commented 6 years ago

LGTM, as illustrated in this bash/R session: https://asciinema.org/a/BI2zB49f3aFQjxCmaMkDVbQyP

layik commented 6 years ago

Apologies for more irreproducible code. I will review & repeat and update. The build should have gone ahead..

layik commented 6 years ago

Ah I know. First run does need “gp_install”. Need more R power to get better messages.

Robinlovelace commented 6 years ago

aha so it's gp_create -> install -> build -> plumb? Suggest gp_build() does all of those if not previously done and then if there are any issues with plumbing it can just say have you run gp_build() yet. Good to be modular though, to a avoid megaFunctions (I learned the hard way in early days of stplanr)!