Skip to content

Commit

Permalink
Merge pull request #94 from TidierOrg/fix-to-n-in-mutate
Browse files Browse the repository at this point in the history
Bumped version to 0.15.1. `n()` pulls a single value and not a vector of values.`rand()` is no longer auto-vectorized.
  • Loading branch information
kdpsingh authored Mar 8, 2024
2 parents 5122587 + 7db27e5 commit b08c2b0
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.15.1 - 2024-03-08
- Bugfix: `n()` pulls a single value and not a vector of values
- `rand()` is no longer auto-vectorized

## v0.15.0 - 2024-02-25
- Add support for `begin-end` blocks for all macros accepting multiple expressions
- Bug fix to add support for expressions inside of `@group_by()`, as in `@group_by(b = a + 1)`
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.15.0"
version = "0.15.1"

[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 @@ -28,11 +28,11 @@ const code = Ref{Bool}(false) # output DataFrames.jl code?
const log = Ref{Bool}(false) # output tidylog output? (not yet implemented)

# The global do-not-vectorize "list"
const not_vectorized = Ref{Vector{Symbol}}([:esc, :Ref, :Set, :Cols, :collect, :(:), :, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate, :is_float, :is_integer, :is_string, :cat_rev, :cat_relevel, :cat_infreq, :cat_lump, :cat_reorder, :cat_collapse, :cat_lump_min, :cat_lump_prop, :categorical, :as_categorical, :is_categorical])
const not_vectorized = Ref{Vector{Symbol}}([:getindex, :rand, :esc, :Ref, :Set, :Cols, :collect, :(:), :, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate, :is_float, :is_integer, :is_string, :cat_rev, :cat_relevel, :cat_infreq, :cat_lump, :cat_reorder, :cat_collapse, :cat_lump_min, :cat_lump_prop, :categorical, :as_categorical, :is_categorical])

# The global do-not-escape "list"
# `in`, `∈`, and `∉` should be vectorized in auto-vec but not escaped
const not_escaped = Ref{Vector{Symbol}}([:where, :esc, :in, :, :, :Ref, :Set, :Cols, :collect, :(:), :, :(=>), :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :startswith, :contains, :endswith])
const not_escaped = Ref{Vector{Symbol}}([:n, :row_number, :where, :esc, :in, :, :, :Ref, :Set, :Cols, :collect, :(:), :, :(=>), :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :startswith, :contains, :endswith])

# 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 @@ -446,7 +446,7 @@ function parse_interpolation(var_expr::Union{Expr,Symbol,Number,String};
return :end
else
found_n = true # do not move this -- this leads to creation of new column
return :TidierData_n
return :(getindex(TidierData_n, 1))
end
elseif fn == :row_number
found_row_number = true
Expand Down

2 comments on commit b08c2b0

@kdpsingh
Copy link
Member Author

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/102543

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.15.1 -m "<description of version>" b08c2b04200806329c563f0af03e5627820c63f8
git push origin v0.15.1

Please sign in to comment.