Initialize a project to keep track of separate dataset repositories and distributions.
Usage
init_datacommons(dir, name = "Data Commons", repos = NULL,
default_user = "", remote = NULL, url = NULL, refresh_after = FALSE,
overwrite = FALSE, serve = FALSE, host = "127.0.0.1", port = 3000,
use_local = FALSE, verbose = interactive())Arguments
- dir
Path to the desired data commons directory.
- name
Name of the data commons.
- repos
A vector of repository names to add to
commons.json.- default_user
GitHub username to prepend to repository names if needed.
- remote
Name of the data commons' GitHub repository (
"username/reponame").- url
URL of the data commons' monitor site; defaults to the GitHub Pages URL associated with
remoteif provided ("https://username.github.io/reponame").- refresh_after
Logical; if
FALSE, will not rundatacommons_refreshafter initiating the project. Defaults toTRUEwhen first creating a data commons project.- overwrite
Logical; if
TRUE, will overwrite existing datacommons files indir. The included.jsand.shfiles are always rewritten, and ifname,repos, ordefault_useris specified,commons.jsonwill also be rewritten regardless ofoverwrite.- serve
Logical; if
TRUE, will serve thedocsdirectory.- host
The IPv4 address to listen to if
serveisTRUE; defaults to"127.0.0.1".- port
The port to listen on if
serveisTRUE; defaults to 3000.- use_local
Logical; if
TRUE, will use adatacommons.jsscript located in a localdist/docs/devdirectory, relative todir.- verbose
Logical; if
FALSE, suppresses messages.
Details
The shell scripts included in the project's scripts directory can be used to retrieve
and update repositories over SSH.
This will clone or pull repositories listed in scripts/repos.txt:
sh scripts/get_repos.sh
This will add, commit, and push all changes in all repositories:
sh scripts/update_repos.sh "commit message"