noaa-nwfsc / FishSET

FishSET (fisheries spatial economics toolbox) includes tools for spatial data analysis, running location choice models, and simulating policy scenarios.
https://noaa-nwfsc.github.io/FishSET/
Other
4 stars 0 forks source link

save the version and commit into the FishSET db #150

Closed mle2718 closed 2 months ago

mle2718 commented 2 months ago

It would be nice for reproducibility to save the FishSET version and commit that was installed to the database of fishset results.

See https://github.com/timjmiller/wham/blob/d50acc7305be99c6c6d5280313b7ad66dd85d48d/R/fit_wham.R#L110-L114

Here is a modification of that code.

FishSET_commit <- packageDescription("FishSET")$GithubSHA1
FishSET_commit <- ifelse(is.null(FishSET_commit ), "local install", paste0("Github (noaa-nwfsc/FishSET@", FishSET_commit , ")")) 
FishSET_version <- packageDescription("FishSET")$Version
FishSET_version <- paste0(FishSET_version , " / ", FishSET_commit)

Then, store these in the FishSET output somewhere.