Title: | Large/Sensitive File Linker for Git Repositories |
---|---|
Description: | This package allows users to version large or sensitive files under Git without tracking the file directly. |
Authors: | Jenna Johnson [aut, cre], Devin Pastoor [aut] |
Maintainer: | Jenna Johnson <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1.9000 |
Built: | 2024-11-21 05:50:54 UTC |
Source: | https://github.com/a2-ai/dvs |
copy files to the storage directory
dvs_add(files, message = NULL, split_output = FALSE)
dvs_add(files, message = NULL, split_output = FALSE)
files |
file paths or glob patterns to add to the storage directory |
message |
optional: a message associated with the file(s) for versioning context to appear in dvs metadata files |
split_output |
optional: when
when |
after initializing the storage directory with dvs_init, this command copies files to storage directory for other collaborators to version and retrieve with dvs_get If an explicitly inputted file doesn't exist, the command returns an error .
For any other error retrieving a particular file, the function itself will indicate the error type and message in the data frame output; the function itself will not return an error.
one or two data frames whose rows are the files attempted to add in the given operation.
## Not run: # would add all csv files in data/derived to the initialized storage directory dvs_add("data/derived/*.csv") # would add model/nonmem/1001/1001.ext and all files in data/derived # to the initialized storage directory (excluding dvs metadata and .gitignore files) dvs_add(c("model/nonmem/1001/1001.ext", "data/derived/*")) ## End(Not run)
## Not run: # would add all csv files in data/derived to the initialized storage directory dvs_add("data/derived/*.csv") # would add model/nonmem/1001/1001.ext and all files in data/derived # to the initialized storage directory (excluding dvs metadata and .gitignore files) dvs_add(c("model/nonmem/1001/1001.ext", "data/derived/*")) ## End(Not run)
get or update files if they are in shared storage to add to the local repo
dvs_get(files, split_output = FALSE)
dvs_get(files, split_output = FALSE)
files |
file paths or glob patterns to get from the storage directory |
split_output |
when split_output is true, a list of two data frames -
|
retrieves files previously added with dvs_add to the storage directory (initialized by dvs_init). If a file is explicitly inputted without a corresponding dvs metadata file i.e. hasn't been added yet with dvs_add, the command returns an error.
For any other error retrieving a particular file, the function itself will indicate the error type and message in the data frame output; the function itself will not return an error.
one or two data frames whose rows are the files attempted to get in the given operation.
## Not run: # would get all previously added files in data/derived from # the initialized storage directory dvs_get("data/derived/*.dvs") # would get all files in data/derived (excluding # .gitignore files) and ~Projects/project_x/large_file.pdf # from the initialized storage directory dvs_get(c("data/derived/*", "~Projects/project_x/large_file.pdf")) ## End(Not run)
## Not run: # would get all previously added files in data/derived from # the initialized storage directory dvs_get("data/derived/*.dvs") # would get all files in data/derived (excluding # .gitignore files) and ~Projects/project_x/large_file.pdf # from the initialized storage directory dvs_get(c("data/derived/*", "~Projects/project_x/large_file.pdf")) ## End(Not run)
initialize devious to add/get versioned files from the storage directory
dvs_init(storage_directory, permissions = NULL, group = NULL)
dvs_init(storage_directory, permissions = NULL, group = NULL)
storage_directory |
path to the desired storage directory for versioned files |
permissions |
optional: linux file permissions to set for files added to the storage directory (in octal format) |
group |
optional: primary group to set for files added to the storage directory |
A data frame with the storage directory, permissions, and group
## Not run: # would initialize the project's storage directory at /data/project_x dvs_init("/data/project_x") # would initialize the project's storage directory at /data/project_x and # configure the linux permissions "777" and primary group "project_x_group" for all # files added to the storage directory dvs_init("/data/project_x", 777, "project_x_group") ## End(Not run)
## Not run: # would initialize the project's storage directory at /data/project_x dvs_init("/data/project_x") # would initialize the project's storage directory at /data/project_x and # configure the linux permissions "777" and primary group "project_x_group" for all # files added to the storage directory dvs_init("/data/project_x", 777, "project_x_group") ## End(Not run)
status report for added files
dvs_status(files = c(""), split_output = FALSE)
dvs_status(files = c(""), split_output = FALSE)
files |
optional: when specified, returns data frame with only these specified file paths or glob patterns. |
split_output |
when split_output is true, a list of two data frames -
|
gives the statuses of previously added files (current
, unsynced
,
absent
, or error
) to make users aware if files stored in the storage
directory don't exist in their local repository or have been updated.
If no file paths or glob patterns are inputted, dvs_status
gives the status
of all previously added files.
If there an error getting the status of a particular file, the function
itself will not return an error, rather, a given error will be indicated in
the data frame output.
a data frame with the statuses of previously added files
## Not run: # would give the status of all previously added files dvs_status() # would attempt to get the status of all files in data/derived # (except for .gitignore files) dvs_status("data/derived/*") ## End(Not run)
## Not run: # would give the status of all previously added files dvs_status() # would attempt to get the status of all files in data/derived # (except for .gitignore files) dvs_status("data/derived/*") ## End(Not run)