USGS-R / drb-inland-salinity-ml

Code repo for Delaware River Basin machine learning models that predict inland salinity.
Creative Commons Zero v1.0 Universal
3 stars 4 forks source link

Move user-defined values to config file #22

Open jds485 opened 2 years ago

jds485 commented 2 years ago

This is an enhancement thought for the future usability of our repo. We could move all user-defined input and output names (strings) and eventual model parameter values to a config file that is read into the main targets.R script. That way there is one file to change everything needed to run the pipeline. Right now, the targets.R script is serving as that single location, but it could become long as we add steps to the pipeline.

lekoenig commented 1 year ago

In our APB/IIDD data science groups I think we tend to use _targets.R as a general pipeline config file (as opposed to a place where individual targets get defined). So I think we could embrace that and leave as is (maybe with a comment at the top of that file that indicates this purpose?), or we could move the user-defined inputs to a separate yaml file that gets called by {targets}.

I was just reading over the {targets} documentation and was reminded of this. Here's a page that might be useful if we end up going the yaml route: https://docs.ropensci.org/targets/reference/tar_config_set.html