Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_sim: functionality and naming consistency #177

Open
jpdunc23 opened this issue Jan 15, 2024 · 2 comments
Open

create_sim: functionality and naming consistency #177

jpdunc23 opened this issue Jan 15, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jpdunc23
Copy link
Contributor

jpdunc23 commented Jan 15, 2024

  • Naming: We have many create_* functions that create R6 objects like the Experiment, DGP, and Method classes. On the other hand, we used init_docs() for setting up the Rmd documentation directory structure. I think renaming create_sim() to init_sim() would improve our API consistency. Another point of confusion is the hpc argument, which could mislead users into thinking that with hpc = TRUE their 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. Maybe scripts_dir (and also rename tests to tests_dir / add a logs_dir arg)? Another option (my preference) is to replace the hpc and tests args with an init_dirs argument that accepts string vectors, default c("logs", "scripts", "tests").
  • Functionality: Can we have create_sim() optionally call init_docs() ? E.g., we could add a boolean argument init_docs.

Maybe create_sim() and init_docs() should be combined, somehow?

@jpdunc23 jpdunc23 added the enhancement New feature or request label Jan 15, 2024
@jpdunc23
Copy link
Contributor Author

@PhilBoileau @tiffanymtang thoughts?

@tiffanymtang
Copy link
Collaborator

  • Naming: We have many create_* functions that create R6 objects like the Experiment, DGP, and Method classes. On the other hand, we used init_docs() for setting up the Rmd documentation directory structure. I think renaming create_sim() to init_sim() would improve our API consistency.

I like the idea of renaming create_sim() to init_sim().

Another point of confusion is the hpc argument, which could mislead users into thinking that with hpc = TRUE their 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. Maybe scripts_dir (and also rename tests to tests_dir / add a logs_dir arg)? Another option (my preference) is to replace the hpc and tests args with an init_dirs argument that accepts string vectors, default c("logs", "scripts", "tests").

Good points. Adding the described init_dirs sounds good to me.

  • Functionality: Can we have create_sim() optionally call init_docs() ? E.g., we could add a boolean argument init_docs.

Maybe create_sim() and init_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants