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

If a snapshot doesn't exist, suggest the previous and next available snapshots #182

Closed
revodavid opened this Issue Jun 10, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@revodavid
Contributor

revodavid commented Jun 10, 2015

When the user calls checkpoint(DATE) there is a possibility the snapshot won't exist on mran.revolutionanalytics.com/snapshot

  • If the user requests a date before 2014-09-08, issue the following error message:
Snapshot for DATE note available. Use checkpoint("2014-08-09") for the earliest available snapshot.
  • If the user requests a date after 2014-09-08, and the folder mran.revolutionanalytics.com/snapshot/DATE does not exists, issue the following message:
Snapshot for DATE not available. Use checkpoint(DATE1) for the earlier available snapshot, or checkpoint(DATE2) for the next available snapshot.

Calculate DATE1 by searching backwards for existing mran.revolutionanalytics.com/snapshot/DATE folders. Calculate DATE2 by searching backwards for existing mran.revolutionanalytics.com/snapshot/DATE folders, halting at tomorrow's date. If a later snapshot cannot be found, skip the DATE2 part of the message.

Implementation suggestion: we could skip online searches by providing an object with dates we already know not to exist (e.g. 2015-06-04 through 2015-06-08).

@j-martens

This comment has been minimized.

Show comment
Hide comment
@j-martens

j-martens Jun 10, 2015

As noted in #174 by @andrie:

Whoever finds time to design and implement this, please consider my original suggestion in #89 where I suggested a simple API consisting of an .rds file that contains the dates of all valid snapshots. This (to me) seems more elegant than a client-driven brute force search through the folder structures, and not difficult to implement.

j-martens commented Jun 10, 2015

As noted in #174 by @andrie:

Whoever finds time to design and implement this, please consider my original suggestion in #89 where I suggested a simple API consisting of an .rds file that contains the dates of all valid snapshots. This (to me) seems more elegant than a client-driven brute force search through the folder structures, and not difficult to implement.

@j-martens

This comment has been minimized.

Show comment
Hide comment
@j-martens

j-martens Jun 10, 2015

I believe the RRO team would need an updated version of checkpoint package available on CRAN on or before the July 1st date since that is to be our next snapshot date for the RRO 3.2.1 release.

@richcalaway suggested an outage object in checkpoint so we can keep a list of dates we know these days that don't exist.

j-martens commented Jun 10, 2015

I believe the RRO team would need an updated version of checkpoint package available on CRAN on or before the July 1st date since that is to be our next snapshot date for the RRO 3.2.1 release.

@richcalaway suggested an outage object in checkpoint so we can keep a list of dates we know these days that don't exist.

@piccolbo

This comment has been minimized.

Show comment
Hide comment
@piccolbo

piccolbo Jun 11, 2015

Contributor

Given the lack of a distribution mechanism to keep lists of available dates up to date in between releases, independent of ominous sounding names or efficient formats, per today's meeting discussion, we agreed we are going to make the directory of snapshots officially list-able (it is already, but we now make it a requirement) and read available dates from there on demand.

Contributor

piccolbo commented Jun 11, 2015

Given the lack of a distribution mechanism to keep lists of available dates up to date in between releases, independent of ominous sounding names or efficient formats, per today's meeting discussion, we agreed we are going to make the directory of snapshots officially list-able (it is already, but we now make it a requirement) and read available dates from there on demand.

@andrie andrie assigned andrie and unassigned piccolbo Jul 14, 2015

@andrie andrie added this to the v0.3.11 milestone Jul 28, 2015

andrie added a commit that referenced this issue Jul 28, 2015

Prepare to change default MRAN url #184
Scan MRAN repository for snapshot dates #182

@andrie andrie modified the milestones: V0.3.12, v0.3.11 Aug 5, 2015

@andrie andrie modified the milestones: v0.3.13, v0.3.12 Aug 28, 2015

@andrie andrie modified the milestones: v0.3.14, v0.3.13 Sep 4, 2015

andrie added a commit that referenced this issue Sep 11, 2015

@andrie

This comment has been minimized.

Show comment
Hide comment
@andrie

andrie Sep 13, 2015

Contributor

Version 0.3.14 adds this behaviour.

  • Automatically add knitr and rmarkdown packages if .Rmd files found #173
  • This behaviour is controlled by the auto.install.knitr argument (default TRUE)
Contributor

andrie commented Sep 13, 2015

Version 0.3.14 adds this behaviour.

  • Automatically add knitr and rmarkdown packages if .Rmd files found #173
  • This behaviour is controlled by the auto.install.knitr argument (default TRUE)

@andrie andrie closed this Sep 13, 2015

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