Title: | Predictive Ecology Development Tools |
---|---|
Description: | Miscellaneous development tools developed by the Predictive Ecology Group (<https://predictiveecology.org>). |
Authors: | Eliot J B McIntire [aut, cre] , Her Majesty the Queen in Right of Canada, as represented by the Minister of Natural Resources Canada [cph] |
Maintainer: | Eliot J B McIntire <[email protected]> |
License: | GPL-3 |
Version: | 0.0.1.9005 |
Built: | 2024-11-21 04:36:20 UTC |
Source: | https://github.com/PredictiveEcology/pedev |
Miscellaneous development tools developed by the Predictive Ecology Group (https://predictiveecology.org).
Maintainer: Eliot J B McIntire [email protected] (ORCID)
Other contributors:
Her Majesty the Queen in Right of Canada, as represented by the Minister of Natural Resources Canada [copyright holder]
Useful links:
Report bugs at https://github.com/PredictiveEcology/pedev/issues
If two files are hardlinks, they don't actually take up extra space on disk: there is only one copy of the data and two pointers to the data.
file.sizeWOLinks(path = ".", units = "auto", recursive = FALSE) file.sizeCompare(path = ".", units = "auto", recursive = TRUE)
file.sizeWOLinks(path = ".", units = "auto", recursive = FALSE) file.sizeCompare(path = ".", units = "auto", recursive = TRUE)
path |
The path to evaluate file sizes in. Must be a directory. |
units |
the units to be used in formatting and printing the size.
Allowed values for the different
For all standards, |
recursive |
Logical indicating whether to search recursively. |
devtools::load_all
that detaches dependenciesThis is very idiosyncratic for the Predictive Ecology group.
reload_all(pkgs, load_all = TRUE, gitPath = "~/GitHub")
reload_all(pkgs, load_all = TRUE, gitPath = "~/GitHub")
pkgs |
A character vector of the package(s) to run "devtools::load_all" |
load_all |
Logical. If |
gitPath |
CHaracter giving the directory containing GitHub repos. |
A quick wrapper for removing a objects with specials names,
"._xxx"
.
rmDotUnderline(envir = .GlobalEnv)
rmDotUnderline(envir = .GlobalEnv)
envir |
The environment from with to rm objects, defaults to
|
Fetches all branches, then pulls the identified branch from git,
then runs a digest on the local folders. If that digest is different
as a previous one, then the function will run
devtools::install(dependencies = FALSE, reload = FALSE, quick = TRUE, ...)
.
This should be safe even in cases where local files have changed. If
they were uncommitted, Git will error, and nothing will be pulled,
and if they were committed, then it will try a merge. If the automoated
merge works, then it will proceed. If automated merge fails, then nothing
will be pulled.
updateGit( pkgs = NULL, install = TRUE, branch = c("development", "master"), cacheRepo = getOption("pedev.cacheRepo", "~/.pedevCache"), fetch = TRUE, submodule = FALSE, quick = TRUE, dependencies = FALSE, reload = FALSE, ... )
updateGit( pkgs = NULL, install = TRUE, branch = c("development", "master"), cacheRepo = getOption("pedev.cacheRepo", "~/.pedevCache"), fetch = TRUE, submodule = FALSE, quick = TRUE, dependencies = FALSE, reload = FALSE, ... )
pkgs |
A character vector of package names, which is actually
the path names of the packages. i.e., must be absolute or relative
path. Defaults to current directory. It will also check in "..",
i.e., one folder up from the current active folder if it doesn't find
|
install |
Logical. If TRUE, then it will run |
branch |
A vector of branch names to pull from, in reverse order
so that the first one is the active branch after this function call finishes.
Default is |
cacheRepo |
The location where subsequent calls will store their history. To be most effective, this should be "persistent", and not part of any other cacheRepo. |
fetch |
Logical. Should it fetch before pulling. |
submodule |
Logical. VERY EXPERIMENTAL. |
quick |
if |
dependencies |
Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector.
The value "soft" means the same as You can also specify dependencies from one or more additional fields, common ones include:
|
reload |
if |
... |
Passed to |
## Not run: # This will pull development branch of all these packages, and install them # all, if there are any file changes in each respective directory allPkgs <- c("quickPlot", "reproducible", "SpaDES.core", "SpaDES.tools", "pemisc", "map", "LandR", "pedev") updateGit(allPkgs) # Will update and install all development branches of all repositories # in ~/GitHub folder pedev::updateGit(dir("~/GitHub")) ## End(Not run)
## Not run: # This will pull development branch of all these packages, and install them # all, if there are any file changes in each respective directory allPkgs <- c("quickPlot", "reproducible", "SpaDES.core", "SpaDES.tools", "pemisc", "map", "LandR", "pedev") updateGit(allPkgs) # Will update and install all development branches of all repositories # in ~/GitHub folder pedev::updateGit(dir("~/GitHub")) ## End(Not run)