Closed jaydorsey closed 4 years ago
Just thought I'd chime in quickly if I can help, though I'm sort of out of the loop. The calc_ghgv
takes the data passed in and converts from json to an R
list via the code below:
#convert from json to list
eco_params <- if(is_xml) xmlToList(eco) else fromJSON(eco)
#get config information
options <- eco_params$options
If the above JSON is well formed, then was there a change to the fromJSON()
function that would make this happen? I remember dealing with it not properly nesting at some point, but not sure.
With a JSON string below, assigned to a variable
data
:The command below fails on the Ruby app side (this repo):
With the following error messages listed:
This looks like an error on the ghgvcr repo side of things (the R application), rather than the ruby/rails side. Noting here for triage & investigation further (even though likely broken on the ghgvcr repo).
Unclear if this is related to this bit of code leftover with the XML stuff (thought was ripped out):
https://github.com/jaydorsey/ghgvcR/blob/master/R/ghgvc.R#L49
Steps to Reproduce
Use the
jay/compose_improvements
branch for testing. The branch uses an image I pushed up that uses a slightly different path for the data folder (/app/data
) so we could use compose locally without having to spend a lot of time thinking about how the data gets loaded/mounted (the command downloads the data to a mounted volume which is preserved across up/down calls)docker-compose up
on the branch and visit http://localhost:3000 and try to generate a graph to see the errorDesired behavior
calc_ghgv
method?@ValentineHerr I can schedule a time to chat about this if you've got time in the upcoming weeks, if you think it's something you can investigate & resolve.