Repeatedly generate an embryonic repository with one command.
Like a pluripotent stem cell, this package will generate new cells/projects. These offspring repos are more specialized, and will exist to do real work (as opposed to exist to generate more stem cells).
The inst/metadata/file-to-copy.csv file describes the source and destination of transferred files. The two projects currently natively supported are:
-
RAnalysisSkeleton which is our all-purpose data science project.
-
cdw-skeleton-1 which is our public repo used to seed our CDW analysis projects.
A new project/repo called 'beasley-poc-1' can be generated in two ways:
-
Run this single chunk of code, after updating the
project_name
anddestination_directory
arguments.remotes::install_github(repo="OuhscBbmc/pluripotent") pluripotent::start_cdw_skeleton_1( project_name = "beasley-poc-1", destination_directory = "~/bbmc/cdw" )
-
The cdw-template-1 repo provides a platform to jump-start consistent repos for CDW projects. Once it's used as a GitHub template, the
utility/spawn.R
file contains the following dynamic code that should run without modification.# Install remotes & pluripotent if not already installed. pluripotent won't reinstall if it's already up-to-date. if( !requireNamespace("remotes") ) utils::install.packages("remotes") remotes::install_github("OuhscBbmc/pluripotent") # Discover repo name & parent directory. project_name <- basename(normalizePath("..")) project_parent_path <- normalizePath("..\\..") # Copy remote files to the current repo. pluripotent::start_cdw_skeleton_1( project_name = project_name, destination_directory = project_parent_path ) # Afterwards, close RStudio and open the *.Rproj file in the root directory.
To spawn a cdw repo (i.e., a repo whose template is cdw-template-1):
- open
utility/spawn.R
directly in RStudio & run the whole file (i.e., ctrl+shift+r) - after it completes, close RStudio
- commit & push the repo. A typical commit message is
populate repo files
closes #1 (or whatever issue number corresponds to 'initialize repo')
- go up one directory (to the repo root) and open the *.Rproj file.
- Do Science 🥇
- open
-
To update a config file that's downloaded from the skeleton's config file, run this instead of spawning a new repo. This scenario comes up when refitting older repos to newer standards.
pluripotent::populate_config("config.yml", basename(getwd())
@andkov, as I'm describing this, I see the resemblance to a factory pattern in software. But the stem cell metaphor is both flowery and abstruse, which seems to be what you and I go for when we're attaching metaphors.
The development version can be installed from GitHub after installing the remotes package.
install.packages("pluripotent") # Run this line if the 'remotes' package isn't installed already.
remotes::install_github(repo="OuhscBbmc/pluripotent")
The package can be uninstalled from your local machine with remove.packages("pluripotent")
.
GitHub | Travis-CI | AppVeyor | Coveralls |
---|---|---|---|
Main | |||
Dev | |||
Ubuntu LTS | Windows Server | Test Coverage |
Key | Value |
---|---|
License |