You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boB Rudis 33ead345a5
cinc
11 months ago
R cinc prep 11 months ago
inst/tinytest R package repo initialization complete 11 months ago
man cinc prep 11 months ago
tests R package repo initialization complete 11 months ago
.Rbuildignore initial commit 11 months ago
.codecov.yml R package repo initialization complete 11 months ago
.gitignore R package repo initialization complete 11 months ago
.travis.yml R package repo initialization complete 11 months ago
CONDUCT.md R package repo initialization complete 11 months ago
DESCRIPTION cinc prep 11 months ago
LICENSE initial commit 11 months ago
LICENSE.md initial commit 11 months ago
NAMESPACE initial commit 11 months ago
NEWS.md R package repo initialization complete 11 months ago
README.Rmd cinc prep 11 months ago
README.md cinc 11 months ago
kbmemoise.Rproj R package repo initialization complete 11 months ago

README.md

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. Signedby Signed commit% Linux buildStatus
Minimal RVersion License

kbmemoise

Keybase Filesystem Backing Store for ‘memoise’ Caching

Description

Keybase https://keybase.io provides 250GB free, encrypted storage making it suitable for creating a cross-system backing store for ‘memoise’ caches. Tools are provided to use Keybase with ‘memoise’.

What’s Inside The Tin

The following functions are implemented:

  • cache_fs2: Alternative to memoise::cache_filesystem()
  • cache_kb_self: Convenience function to cache to your own public or private Keybase folder
  • cache_kb: Keybase backed cache for cross-system caching
  • platform: Execution platform

Installation

install.packages("kbmemoise", repos = c("https://cinc.rud.is", "https://cloud.r-project.org/"))
# or
remotes::install_git("https://git.rud.is/hrbrmstr/kbmemoise.git")
# or
remotes::install_git("https://git.sr.ht/~hrbrmstr/kbmemoise")
# or
remotes::install_gitlab("hrbrmstr/kbmemoise")
# or
remotes::install_bitbucket("hrbrmstr/kbmemoise")
# or
remotes::install_github("hrbrmstr/kbmemoise")

NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.

Usage

library(kbmemoise)

# current version
packageVersion("kbmemoise")
## [1] '0.1.0'
kbc <- cache_kb_self(".cache")

kbc$location()
## [1] "/Volumes/Keybase/private/hrbrmstr/.cache"

mrunif <- memoise::memoise(runif, cache = kbc)

mrunif(10) # First run, saves cache
##  [1] 0.5687944 0.5739892 0.4309080 0.1959454 0.7240059 0.4751237 0.4049415 0.6617540 0.7025730 0.9428181

mrunif(10) # Loads cache, results should be identical
##  [1] 0.5687944 0.5739892 0.4309080 0.1959454 0.7240059 0.4751237 0.4049415 0.6617540 0.7025730 0.9428181

kbc$keys()
## [1] "abb4b2ca91214fd892622aa50f4f5dc98d1453ae577cd916e60e02ebda8bbe7d75ff93d1fdd81967edced64de89833361e7f150cfae4898acb70b1aac932e791"

kbc$size()
## [1] 0

kbc$reset()

kbc$size()
## [1] 0

kbmemoise Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
R 5 0.83 97 0.85 33 0.58 91 0.72
Rmd 1 0.17 17 0.15 24 0.42 36 0.28

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.