Skip to content

Commit

Permalink
refactor: remove more useless dispatched methods from Series (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Apr 1, 2024
1 parent f188495 commit 50b44de
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 78 deletions.
2 changes: 2 additions & 0 deletions R/series__series.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ Series_shape = method_as_active_binding(\() .pr$Series$shape(self))
add_expr_methods_to_series = function() {
methods_exclude = c(
"agg_groups",
"exclude",
"inspect",
"over",
"rolling",
"to_series"
Expand Down
122 changes: 44 additions & 78 deletions tests/testthat/_snaps/after-wrappers.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,39 +203,6 @@
[51] "with_columns" "with_columns_seq"
[53] "with_context" "with_row_index"

---

Code
ls(.pr[[private_key]])
Output
[1] "clone_in_rust" "collect"
[3] "collect_in_background" "debug_plan"
[5] "describe_optimized_plan" "describe_plan"
[7] "drop" "drop_nulls"
[9] "explode" "fetch"
[11] "fill_nan" "fill_null"
[13] "filter" "first"
[15] "get_optimization_toggle" "group_by"
[17] "group_by_dynamic" "join"
[19] "join_asof" "last"
[21] "max" "mean"
[23] "median" "melt"
[25] "min" "print"
[27] "profile" "quantile"
[29] "rename" "reverse"
[31] "rolling" "schema"
[33] "select" "select_seq"
[35] "set_optimization_toggle" "shift"
[37] "shift_and_fill" "sink_csv"
[39] "sink_ipc" "sink_json"
[41] "sink_parquet" "slice"
[43] "sort_by_exprs" "std"
[45] "sum" "tail"
[47] "to_dot" "unique"
[49] "unnest" "var"
[51] "with_columns" "with_columns_seq"
[53] "with_context" "with_row_index"

# public and private methods of each class Expr

Code
Expand Down Expand Up @@ -679,51 +646,50 @@
[46] "drop_nulls" "dt" "dtype"
[49] "entropy" "eq" "eq_missing"
[52] "equals" "ewm_mean" "ewm_std"
[55] "ewm_var" "exclude" "exp"
[58] "explode" "extend_constant" "fill_nan"
[61] "fill_null" "filter" "first"
[64] "flags" "flatten" "floor"
[67] "floor_div" "forward_fill" "gather"
[70] "gather_every" "gt" "gt_eq"
[73] "hash" "head" "implode"
[76] "inspect" "interpolate" "is_between"
[79] "is_duplicated" "is_finite" "is_first_distinct"
[82] "is_in" "is_infinite" "is_last_distinct"
[85] "is_nan" "is_not_nan" "is_not_null"
[88] "is_null" "is_numeric" "is_sorted"
[91] "is_unique" "item" "kurtosis"
[94] "last" "len" "limit"
[97] "list" "log" "log10"
[100] "lower_bound" "lt" "lt_eq"
[103] "map_batches" "map_elements" "max"
[106] "mean" "median" "min"
[109] "mod" "mode" "mul"
[112] "n_chunks" "n_unique" "name"
[115] "nan_max" "nan_min" "neq"
[118] "neq_missing" "not" "null_count"
[121] "or" "pct_change" "peak_max"
[124] "peak_min" "pow" "print"
[127] "product" "quantile" "rank"
[130] "rechunk" "reinterpret" "rename"
[133] "rep" "rep_extend" "repeat_by"
[136] "replace" "reshape" "reverse"
[139] "rle" "rle_id" "rolling_max"
[142] "rolling_mean" "rolling_median" "rolling_min"
[145] "rolling_quantile" "rolling_skew" "rolling_std"
[148] "rolling_sum" "rolling_var" "round"
[151] "sample" "search_sorted" "set_sorted"
[154] "shape" "shift" "shift_and_fill"
[157] "shrink_dtype" "shuffle" "sign"
[160] "sin" "sinh" "skew"
[163] "slice" "sort" "sort_by"
[166] "sqrt" "std" "str"
[169] "struct" "sub" "sum"
[172] "tail" "tan" "tanh"
[175] "to_frame" "to_list" "to_lit"
[178] "to_physical" "to_r" "to_struct"
[181] "to_vector" "top_k" "unique"
[184] "unique_counts" "upper_bound" "value_counts"
[187] "var" "xor"
[55] "ewm_var" "exp" "explode"
[58] "extend_constant" "fill_nan" "fill_null"
[61] "filter" "first" "flags"
[64] "flatten" "floor" "floor_div"
[67] "forward_fill" "gather" "gather_every"
[70] "gt" "gt_eq" "hash"
[73] "head" "implode" "interpolate"
[76] "is_between" "is_duplicated" "is_finite"
[79] "is_first_distinct" "is_in" "is_infinite"
[82] "is_last_distinct" "is_nan" "is_not_nan"
[85] "is_not_null" "is_null" "is_numeric"
[88] "is_sorted" "is_unique" "item"
[91] "kurtosis" "last" "len"
[94] "limit" "list" "log"
[97] "log10" "lower_bound" "lt"
[100] "lt_eq" "map_batches" "map_elements"
[103] "max" "mean" "median"
[106] "min" "mod" "mode"
[109] "mul" "n_chunks" "n_unique"
[112] "name" "nan_max" "nan_min"
[115] "neq" "neq_missing" "not"
[118] "null_count" "or" "pct_change"
[121] "peak_max" "peak_min" "pow"
[124] "print" "product" "quantile"
[127] "rank" "rechunk" "reinterpret"
[130] "rename" "rep" "rep_extend"
[133] "repeat_by" "replace" "reshape"
[136] "reverse" "rle" "rle_id"
[139] "rolling_max" "rolling_mean" "rolling_median"
[142] "rolling_min" "rolling_quantile" "rolling_skew"
[145] "rolling_std" "rolling_sum" "rolling_var"
[148] "round" "sample" "search_sorted"
[151] "set_sorted" "shape" "shift"
[154] "shift_and_fill" "shrink_dtype" "shuffle"
[157] "sign" "sin" "sinh"
[160] "skew" "slice" "sort"
[163] "sort_by" "sqrt" "std"
[166] "str" "struct" "sub"
[169] "sum" "tail" "tan"
[172] "tanh" "to_frame" "to_list"
[175] "to_lit" "to_physical" "to_r"
[178] "to_struct" "to_vector" "top_k"
[181] "unique" "unique_counts" "upper_bound"
[184] "value_counts" "var" "xor"

---

Expand Down

0 comments on commit 50b44de

Please sign in to comment.