`create_sim`: functionality and naming consistency
-
Naming: We have many
create_*functions that createR6objects like theExperiment,DGP, andMethodclasses. On the other hand, we usedinit_docs()for setting up the Rmd documentation directory structure. I think renamingcreate_sim()toinit_sim()would improve our API consistency. Another point of confusion is thehpcargument, which could mislead users into thinking that withhpc = TRUEtheir simulation will automatically work in a distributed computing environment (e.g., a Slurm cluster). I think we should rename this argument somehow to make it a bit more clear. Maybescripts_dir(and also renameteststotests_dir/ add alogs_dirarg)? Another option (my preference) is to replace thehpcandtestsargs with aninit_dirsargument that accepts string vectors, defaultc("logs", "scripts", "tests"). -
Functionality: Can we have
create_sim()optionally callinit_docs()? E.g., we could add a boolean argumentinit_docs.
Maybe create_sim() and init_docs() should be combined, somehow?
@PhilBoileau @tiffanymtang thoughts?
- Naming: We have many
create_*functions that createR6objects like theExperiment,DGP, andMethodclasses. On the other hand, we usedinit_docs()for setting up the Rmd documentation directory structure. I think renamingcreate_sim()toinit_sim()would improve our API consistency.
I like the idea of renaming create_sim() to init_sim().
Another point of confusion is the
hpcargument, which could mislead users into thinking that withhpc = TRUEtheir simulation will automatically work in a distributed computing environment (e.g., a Slurm cluster). I think we should rename this argument somehow to make it a bit more clear. Maybescripts_dir(and also renameteststotests_dir/ add alogs_dirarg)? Another option (my preference) is to replace thehpcandtestsargs with aninit_dirsargument that accepts string vectors, defaultc("logs", "scripts", "tests").
Good points. Adding the described init_dirs sounds good to me.
- Functionality: Can we have
create_sim()optionally callinit_docs()? E.g., we could add a boolean argumentinit_docs.Maybe
create_sim()andinit_docs()should be combined, somehow?
I'm not sure if this is very natural. Currently, init_docs initializes the documentation for a simulation experiment created with create_experiment(). I think create_sim() initializes the directory structure for the overarching "project" or "study", which may consist of multiple simulation experiments. In some sense, maybe we should consider renaming create_sim() to init_sim_study() or init_study() or something of the like.