Closed dlebauer closed 8 years ago
For now at least, the run
and out
directories are in ghgvc/tmp/
.
presumably $HOME/ghgvc/tmp/
?
@gsrohde can I assume that the R script will be running in ghgvc
and therefore write to tmp/output.*
?
ghgvc_script.R writes to the directory given as its second command-line parameter. The ghgvc rails app calls it with "#{Rails.root}/tmp/out" as the second parameter, so yes, tmp/out is where it writes to if it is run by the rails app. Whether there are other use cases where the R script would be run by something other than the rails app I don't know.
I think this is done as well, pending review of whether you want the run
and out
folders in ghgvc/tmp/. For example, on my installation, the full path to the output folder is /opt/ghgvc/ghgvc/tmp/out/
and it contains ghgv.json
and ghgv.csv
. In contrast run/
contains biome.json
and multisite_config.xml
.
It's probably worth noting that these are not removed on exit, so when developing, we should be careful to remove them before rerunning the server or they can be misleading.
some working directory can be assumed, then add
run
andout
subdirectories.these can be set in the
config.xml
as 1st level tagsrundir
andoutdir
, consistent with the use in PEcAn settings file (see wiki:)When we want to save old runs, we can look more closely at the PEcAn approach (where a subdirectory corresponding to the
runs.id
field in BETYdb is auto-generated).Currently, ruby writes out to
$HOME/ghgvcR/inst
and reads from$HOME/ghgvcR/inst/extdata
. This is an artifact. These should all be replaced byrun
andout
in the ruby code, and then when the ghgvcR script is run, the locations of these directories can be passed as arguments to theghgvc_script
, i.e.:This task requires modification of both the ruby and R code (see ghgvcR issue 1).