Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track snapshot use and remove unused snapshots #209

Closed
stefanfritsch opened this issue Oct 27, 2015 · 4 comments
Closed

Track snapshot use and remove unused snapshots #209

stefanfritsch opened this issue Oct 27, 2015 · 4 comments
Assignees
Milestone

Comments

@stefanfritsch
Copy link

Hi,

I don't think there is a FR for something like this atm. The .checkpoint folder can grow quite large and has to be cleaned up by hand currently (afaik?).

If checkpoint put a simple .lastaccessed file in each snapshot and updated that every time checkpoint was set to the respective snapshot then it would be trivial to write a function that removed all snapshots that are older than a certain date:

remove_not_used(since = "2015-01-01")
remove_not_used(in = ddays(90))

That is also something e.g. RRO could put in .Rprofile.

Thx
Stefan

@andrie
Copy link
Contributor

andrie commented Oct 27, 2015

Very nice suggestion! Thank you.

@andrie andrie self-assigned this Oct 26, 2016
@andrie andrie modified the milestones: v0.3.17, v0.3.18, v0.3.19 Oct 26, 2016
@andrie andrie modified the milestones: v0.3.20, v0.3.19 Mar 16, 2017
@andrie andrie changed the title [feature request] Remove unused snapshots Track snapshot use and remove unused snapshots Mar 16, 2017
andrie added a commit that referenced this issue Mar 16, 2017
andrie added a commit that referenced this issue Mar 16, 2017
* dev:
  Skip test if offline
  Rebuild documentation
  Make lines shorter
  Reorganize code; Delete code no longer used
  Use markdown for documentation #235
  Use markdown for documentation #235
  Document newly exposed functions #209, #235
  Use markdown in roxygen docs #235
  Use markdown in roxygen docs #235
@andrie
Copy link
Contributor

andrie commented Mar 16, 2017

I have implemented as follows:

checkpointRemove(snapshotDate, checkpointLocation = "~/",
  allSinceSnapshot = FALSE, allUntilSnapshot = FALSE,
  notUsedSince = FALSE, days)

Right now this is only in the dev branch.

@stefanfritsch Can you please test and provide feedback?

andrie added a commit that referenced this issue Mar 30, 2017
* dev:
  Use package caching on Travis
  Create folder recursively
  Try once more #233
  Explicitly save manifest.R #233
  Try writing to getwd()
  Use dirname(tempdir()) to persist .checkpoint folder #233
  Rebuild vignettes #233
  Add vignette on using checkpoint inside a markdown file #216
  Add argument documentation
  Add experimental unCheckpoint() function #124
  Skip all online checks if `scanForPackages = FALSE` #234
  Expand help for mranUrl() #237
  Documentation improvements and fixes
  Track snapshot use and remove unused snapshots #209
@andrie
Copy link
Contributor

andrie commented Mar 30, 2017

This feature is now available in the master branch on github.

@andrie andrie closed this as completed Mar 30, 2017
@stefanfritsch
Copy link
Author

Sorry, I was unavailable for a while. I'm now on a project where we do work with checkpoint and I'll report any issues I might encounter.

Thanks a lot for the features, they're great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants