Skip to content

Commit

Permalink
Merge pull request #23 from TidierOrg/add-tidiercats-not-vectorized
Browse files Browse the repository at this point in the history
Add TidierCats functions to not-vectorized list, bump version to 0.9.2
  • Loading branch information
Karandeep Singh authored Aug 7, 2023
2 parents 5600778 + 481d242 commit b3b8886
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/TidierData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)))
Expand Down

2 comments on commit b3b8886

@kdpsingh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/89168

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.2 -m "<description of version>" b3b8886eac075264fe1a6c44894fd8af123ce933
git push origin v0.9.2

Please sign in to comment.