diff --git a/NEWS.md b/NEWS.md index 2cca1e09..f35813b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # TidierData.jl updates +## v0.9.2 - 2023-08-06 +- Remove `TidierData_not_vectorized[]` from exports +- Add `TidierCats.jl` functions to `not_vectorized[]` list + ## v0.9.1 - 2023-08-06 - Export `TidierData_not_vectorized[]` to make it easier for other packages to access it diff --git a/Project.toml b/Project.toml index 8b0eda90..ebb8cc48 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TidierData" uuid = "fe2206b3-d496-4ee9-a338-6a095c4ece80" authors = ["Karandeep Singh"] -version = "0.9.1" +version = "0.9.2" [deps] Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc" diff --git a/src/TidierData.jl b/src/TidierData.jl index fa1f417b..8a22e6f2 100644 --- a/src/TidierData.jl +++ b/src/TidierData.jl @@ -18,14 +18,14 @@ export TidierData_set, across, desc, n, row_number, starts_with, ends_with, matc as_float, as_integer, as_string, @select, @transmute, @rename, @mutate, @summarize, @summarise, @filter, @group_by, @ungroup, @slice, @arrange, @distinct, @pull, @left_join, @right_join, @inner_join, @full_join, @pivot_wider, @pivot_longer, @bind_rows, @bind_cols, @clean_names, @count, @tally, @drop_na, @glimpse, @separate, - @unite, @summary, TidierData_not_vectorized + @unite, @summary # Package global variables const code = Ref{Bool}(false) # output DataFrames.jl code? const log = Ref{Bool}(false) # output tidylog output? (not yet implemented) # Expose the global do-not-vectorize "list" -const TidierData_not_vectorized = Ref{Vector{Symbol}}([:Ref, :Set, :Cols, :(:), :∘, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate]) +const not_vectorized = Ref{Vector{Symbol}}([:Ref, :Set, :Cols, :(:), :∘, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate, :cat_rev, :cat_relevel, :cat_infreq, :cat_lump, :cat_reorder, :cat_collapse, :cat_lump_min, :cat_lump_prop, :as_categorical]) # Includes include("docstrings.jl") diff --git a/src/parsing.jl b/src/parsing.jl index 011b2da1..67861b5d 100644 --- a/src/parsing.jl +++ b/src/parsing.jl @@ -307,7 +307,7 @@ function parse_autovec(tidy_expr::Union{Expr,Symbol}) elseif @capture(x, fn_(args__)) # This is the do-not-vectorize "list" # `in` should be vectorized so do not add to this exclusion list - if fn in TidierData_not_vectorized[] + if fn in not_vectorized[] return x elseif contains(string(fn), r"[^\W0-9]\w*$") # valid variable name return :($fn.($(args...)))