Skip to content

Commit

Permalink
Remove environment unlocking and export S3 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed May 15, 2024
1 parent f5e2391 commit c57cdfc
Show file tree
Hide file tree
Showing 24 changed files with 337 additions and 118 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ Suggests:
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
158 changes: 157 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,130 @@
# Generated by roxygen2: do not edit by hand

S3method("[",expr_list)
S3method(assert_format_impl,default)
S3method(assert_format_impl,diskframe)
S3method(assert_format_impl,file)
S3method(assert_format_impl,fst)
S3method(assert_format_impl,fst_dt)
S3method(assert_format_impl,fst_tbl)
S3method(assert_format_impl,keras)
S3method(assert_format_impl,qs)
S3method(assert_format_impl,rds)
S3method(assert_good_transform,default)
S3method(assert_good_transform,map)
S3method(c,expr_list)
S3method(cds_assert_trace,default)
S3method(cds_assert_trace,dynamic)
S3method(cds_assert_trace,group)
S3method(cds_dynamic_deps,default)
S3method(cds_dynamic_deps,dynamic)
S3method(cds_dynamic_trace,default)
S3method(cds_dynamic_trace,dynamic)
S3method(char,transform)
S3method(chr_dynamic_impl,default)
S3method(chr_dynamic_impl,drake_dynamic)
S3method(conclude_build_impl,default)
S3method(conclude_build_impl,drake_cancel)
S3method(dcst_get_,default)
S3method(dcst_get_,drake_format_diskframe)
S3method(dcst_get_,drake_format_file)
S3method(dcst_get_,drake_format_fst)
S3method(dcst_get_,drake_format_fst_dt)
S3method(dcst_get_,drake_format_fst_tbl)
S3method(dcst_get_,drake_format_keras)
S3method(dcst_get_,drake_format_qs)
S3method(dcst_get_,drake_format_rds)
S3method(dcst_get_value_,default)
S3method(dcst_get_value_,drake_format_diskframe)
S3method(dcst_get_value_,drake_format_file)
S3method(dcst_get_value_,drake_format_fst)
S3method(dcst_get_value_,drake_format_fst_dt)
S3method(dcst_get_value_,drake_format_fst_tbl)
S3method(dcst_get_value_,drake_format_keras)
S3method(dcst_get_value_,drake_format_qs)
S3method(dcst_get_value_,drake_format_rds)
S3method(dcst_set,default)
S3method(dcst_set,drake_format_diskframe)
S3method(dcst_set,drake_format_fst)
S3method(dcst_set,drake_format_fst_dt)
S3method(dcst_set,drake_format_fst_tbl)
S3method(dcst_set,drake_format_keras)
S3method(dcst_set,drake_format_qs)
S3method(dcst_set,drake_format_rds)
S3method(decorate_format_meta,default)
S3method(decorate_format_meta,drake_format_file)
S3method(decorate_format_value,default)
S3method(decorate_format_value,drake_format_file)
S3method(decorate_trigger_format_meta,default)
S3method(decorate_trigger_format_meta,file)
S3method(drake_meta_impl,dynamic)
S3method(drake_meta_impl,imported_file)
S3method(drake_meta_impl,imported_object)
S3method(drake_meta_impl,static)
S3method(drake_meta_impl,subtarget)
S3method(dsl_by,combine)
S3method(dsl_combine,combine)
S3method(dsl_deps,combine)
S3method(dsl_deps,cross)
S3method(dsl_deps,map)
S3method(dsl_grid,cross)
S3method(dsl_grid,map)
S3method(dsl_id,transform)
S3method(dsl_names,transform)
S3method(dsl_revdeps,combine)
S3method(dsl_revdeps,cross)
S3method(dsl_revdeps,map)
S3method(dsl_transform,combine)
S3method(dsl_transform,map)
S3method(dynamic_hash_list,cross)
S3method(dynamic_hash_list,group)
S3method(dynamic_hash_list,map)
S3method(dynamic_hashes,default)
S3method(dynamic_hashes,drake_dynamic)
S3method(find_old_groupings,combine)
S3method(find_old_groupings,cross)
S3method(find_old_groupings,map)
S3method(format_file_checksum_impl,default)
S3method(format_file_checksum_impl,file)
S3method(get_subtargets,default)
S3method(get_subtargets,drake_dynamic)
S3method(get_trace_impl,cross)
S3method(get_trace_impl,group)
S3method(get_trace_impl,map)
S3method(groupings,combine)
S3method(groupings,map)
S3method(handle_triggers_impl,dynamic_registered)
S3method(handle_triggers_impl,dynamic_unregistered)
S3method(handle_triggers_impl,static)
S3method(handle_triggers_impl,subtarget)
S3method(hpc_spec_impl,default)
S3method(hpc_spec_impl,subtarget)
S3method(interpret_transform,combine)
S3method(interpret_transform,cross)
S3method(interpret_transform,map)
S3method(is_outdated_impl,dynamic)
S3method(is_outdated_impl,static)
S3method(lang,command)
S3method(load_dynamic_subdep_impl,default)
S3method(load_dynamic_subdep_impl,group)
S3method(load_target_impl,bind)
S3method(load_target_impl,eager)
S3method(load_target_impl,promise)
S3method(load_targets_impl,default)
S3method(load_targets_impl,drake_dynamic)
S3method(manage_deps,autoclean)
S3method(manage_deps,lookahead)
S3method(manage_deps,none)
S3method(manage_deps,preclean)
S3method(manage_deps,speed)
S3method(manage_deps,unload)
S3method(match_dynamic_call_impl,combine)
S3method(match_dynamic_call_impl,cross)
S3method(match_dynamic_call_impl,group)
S3method(match_dynamic_call_impl,map)
S3method(new_groupings,cross)
S3method(new_groupings,map)
S3method(old_groupings,map)
S3method(plot,drake_plan)
S3method(print,drake_config)
S3method(print,drake_deps)
Expand All @@ -13,9 +136,43 @@ S3method(print,drake_plan_source)
S3method(print,drake_settings)
S3method(print,drake_spec)
S3method(print,drake_triggers)
S3method(recovery_key_impl,default)
S3method(recovery_key_impl,subtarget)
S3method(sanitize_format,default)
S3method(sanitize_format,drake_format_diskframe)
S3method(sanitize_format,drake_format_file)
S3method(sanitize_format,drake_format_fst)
S3method(sanitize_format,drake_format_fst_dt)
S3method(sanitize_format,drake_format_fst_tbl)
S3method(serialize_build,default)
S3method(serialize_build,drake_build_keras)
S3method(store_item_impl,drake_function)
S3method(store_item_impl,drake_object)
S3method(store_item_impl,drake_static_storage)
S3method(store_item_impl,drake_storr)
S3method(subtarget_deps,cross)
S3method(subtarget_deps,group)
S3method(subtarget_deps,map)
S3method(subtarget_hashes,cross)
S3method(subtarget_hashes,group)
S3method(subtarget_hashes,map)
S3method(tag_in,transform)
S3method(tag_out,transform)
S3method(target_msg,cancel)
S3method(target_msg,dynamic)
S3method(target_msg,fail)
S3method(target_msg,finalize)
S3method(target_msg,recover)
S3method(target_msg,retry)
S3method(target_msg,subtarget)
S3method(target_msg,target)
S3method(undecorate_format_value,default)
S3method(undecorate_format_value,drake_format)
S3method(unserialize_build,default)
S3method(unserialize_build,drake_build_keras)
S3method(value_format,default)
S3method(value_format,drake_format)
S3method(value_format,drake_format_diskframe)
export(Makefile_recipe)
export(all_of)
export(analyses)
Expand Down Expand Up @@ -312,4 +469,3 @@ importFrom(vctrs,new_rcrd)
importFrom(vctrs,vec_assert)
importFrom(vctrs,vec_c)
importFrom(vctrs,vec_slice)
useDynLib(drake, .registration = TRUE)
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 7.13.10

* Remove environment locking, c.f. https://github.com/r-lib/rlang/issues/1705.
* Export S3 methods.

# Version 7.13.9

* Avoid `is.R()`.
Expand Down
4 changes: 4 additions & 0 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ load_targets_impl <- function(
UseMethod("load_targets_impl")
}

#' @export
load_targets_impl.drake_dynamic <- function( # nolint
hashes,
target,
Expand All @@ -328,6 +329,7 @@ load_targets_impl.drake_dynamic <- function( # nolint
assign(target, value, envir = envir, inherits = FALSE)
}

#' @export
load_targets_impl.default <- function(
hashes,
target,
Expand All @@ -343,6 +345,7 @@ get_subtargets <- function(hashes, target, cache, subtargets, subtarget_list) {
UseMethod("get_subtargets")
}

#' @export
get_subtargets.drake_dynamic <- function(
hashes,
target,
Expand All @@ -366,6 +369,7 @@ get_subtargets.drake_dynamic <- function(
out
}

#' @export
get_subtargets.default <- function(
hashes,
target,
Expand Down
7 changes: 7 additions & 0 deletions R/create_drake_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ cds_dynamic_deps <- function(dynamic, target, args) {
UseMethod("cds_dynamic_deps")
}

#' @export
cds_dynamic_deps.dynamic <- function(dynamic, target, args) {
dynamic$.trace <- NULL
out <- ht_filter(args$ht_globals, all.vars(dynamic))
Expand All @@ -307,6 +308,7 @@ cds_dynamic_deps.dynamic <- function(dynamic, target, args) {
out
}

#' @export
cds_dynamic_deps.default <- function(dynamic, target, args) {
character(0)
}
Expand All @@ -315,10 +317,12 @@ cds_dynamic_trace <- function(dynamic, args) {
UseMethod("cds_dynamic_trace")
}

#' @export
cds_dynamic_trace.dynamic <- function(dynamic, args) {
all.vars(dynamic$.trace)
}

#' @export
cds_dynamic_trace.default <- function(dynamic, args) {
character(0)
}
Expand All @@ -327,6 +331,7 @@ cds_assert_trace <- function(dynamic, spec) {
UseMethod("cds_assert_trace")
}

#' @export
cds_assert_trace.group <- function(dynamic, spec) {
bad <- setdiff(spec$deps_dynamic_trace, spec$deps_dynamic)
if (!length(bad)) {
Expand All @@ -343,6 +348,7 @@ cds_assert_trace.group <- function(dynamic, spec) {
)
}

#' @export
cds_assert_trace.dynamic <- function(dynamic, spec) {
bad <- setdiff(spec$deps_dynamic_trace, spec$deps_dynamic)
if (!length(bad)) {
Expand All @@ -360,6 +366,7 @@ cds_assert_trace.dynamic <- function(dynamic, spec) {
)
}

#' @export
cds_assert_trace.default <- function(dynamic, spec) {
character(0)
}
Expand Down
Loading

0 comments on commit c57cdfc

Please sign in to comment.