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
remote
if provided ("https://username.github.io/reponame"
).- refresh_after
Logical; if
FALSE
, will not rundatacommons_refresh
after initiating the project. Defaults toTRUE
when first creating a data commons project.- overwrite
Logical; if
TRUE
, will overwrite existing datacommons files indir
. The included.js
and.sh
files are always rewritten, and ifname
,repos
, ordefault_user
is specified,commons.json
will also be rewritten regardless ofoverwrite
.- serve
Logical; if
TRUE
, will serve thedocs
directory.- host
The IPv4 address to listen to if
serve
isTRUE
; defaults to"127.0.0.1"
.- port
The port to listen on if
serve
isTRUE
; defaults to 3000.- use_local
Logical; if
TRUE
, will use adatacommons.js
script located in a localdist/docs/dev
directory, 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"