Closed kdorheim closed 2 years ago
Hi @kdorheim -
Sorry for my slow response here. Wow, this is looking good!
The README example reads well and is clear
Hmm, license. I would check with Chris, but maybe for simplicity just use what Hector is using.
No, I think having the input-generating script in data-raw/
makes sense. I didn't understand this though:
DIR <- here::here("inst")
dir.create(DIR, recursive = TRUE, showWarnings = FALSE)
How can here
find the directory if it doesn't exist? Conversely, if it exists, why are you creating it in the next line?
What else is missing — nothing that I see on an initial pass! But I would want to clone the repo, build it locally, and fully test out. Is it at the stage I could do that, do you think?
Great work :)
Hi Ben! thanks for taking a look at it!
My understanding was that the here
function builds file path names (much like the function file.path
does) but does so based on the current root project directory, so it doesn't necessarily have to already exist to work. Including the code to make the directory might be overly cautious 🤷♀️
And re cloning the repo building it locally. That would be great feedback & I hope it is at that stage for testing. I wanted to have github actions set up for that but I've been struggling to get the proper environment set up. Before cloning the repo what I would really be interested in is if the following works.
remotes::install_github("jgcri/hectordata")
library(hectordata)
library(hector)
ini <- system.file("input/hector_ssp434.ini", package = "hectordata")
core <- newcore(ini)
run(core)
@bpbond could you take a look at this package and let me know what you think? So far I have only added the ssp scenarios to the package and figured we could add other scenarios as needed.
Things that would be helpful to get your input on:
hector
.data-raw/generate_inputs.R
does that make sense? Or should that script be located elsewhere?