-
Notifications
You must be signed in to change notification settings - Fork 129
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
Deprecate drake_cache_log_file() #741
Comments
wlandau
added
Good first issue 👋
and removed
difficulty: beginner
most actionable 🔧
labels
Feb 15, 2019
preprocess-config.R refers to the function and the default filename. We can remove its mention from the documentation but should make sure that the behavior described here is accurate.
|
Yes please. The explicit mention of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
drake
's cache log is a data frame with the fingerprints all the targets and dependencies.Created on 2019-02-15 by the reprex package (v0.2.1)
The purpose is to
Point (2) supports reproducibility. You can run
make(cache_log_file = "cache_log.txt")
to generate a flat file with the cache log. Then, when you putcache_log.txt
under version control (git/GitHub) you can track the changes to your targets over time. This is especially handy becausedrake
's cache is inconvenient and messy to put under version control.Problem
drake_cache_log_file()
is a standalone function to write the cache log to a file. It seems convenient at first glance, but I no longer believe it should be part ofdrake
.make()
. If you change an imported function, runoutdated()
, and then rundrake_cache_log_file()
, you will get a cache log file in which the inputs to your workflow are not synchronized with the outputs.drake_cache_log()
anddrake_cache_log_file()
are nearly redundant.Solution
As a Chicago R Unconference project, let's deprecate
drake_cache_log_file()
to warn people not to use it. A year or two later, the function will become defunct and then eventually removed from the package altogether.Implementation
drake_cache_log_file()
from its current home inR/api-cache.R
to the bottom ofR/utils-deprecate.R
..Deprecated()
at the beginning of the function to warn users.roxygen2
documentation.@title
that the function is deprecated.@description
, write the date that you deprecated the function. (We need to know when we can go back and make it defunct.)@export
, add a line with#' @keywords internal
to hidedrake_cache_log_file()
fromhelp(package = "drake")
.@examples
.tests/testthat/test-deprecate.R
to test that the deprecation message shows up and the function still produces a sensible cache log. Feel free to borrow from this line and make a new call totest_with_dir()
.drake_cache_log_file()
from the other tests intests/testthat
.drake_cache_log_file()
from_pkgdown.yml
so it no longer shows up in the online function reference.NEWS.md
.DESCRIPTION
file.The text was updated successfully, but these errors were encountered: