Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Oct 17, 2024
1 parent cb372f1 commit 9144fbf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tidypolars
Type: Package
Title: Get the Power of Polars with the Syntax of the Tidyverse
Version: 0.10.1.9000
Version: 0.11.0
Authors@R:
person(given = "Etienne",
family = "Bacher",
Expand All @@ -24,7 +24,7 @@ Imports:
dplyr,
glue,
lifecycle,
polars (>= 0.18.0),
polars (>= 0.20.0),
rlang,
tidyr,
tidyselect,
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# tidypolars (development version)
# tidypolars 0.11.0

`tidypolars` requires `polars` >= 0.20.0.

## Breaking changes

Expand Down
62 changes: 32 additions & 30 deletions tests/testthat/test-join_inequality-lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test_that("basic inequality join works", {
revenue = c(50, 4, 10, 12)
)

companies_pl <- as_polars_df(companies)
transactions_pl <- as_polars_df(transactions)
companies_pl <- as_polars_lf(companies)
transactions_pl <- as_polars_lf(transactions)

by <- join_by(company == id, year >= since)
expect_equal_lazy(
Expand Down Expand Up @@ -56,8 +56,8 @@ test_that("'between' helper works", {
end = c(150, 250, 399, 450)
)

segments_pl <- as_polars_df(segments)
reference_pl <- as_polars_df(reference)
segments_pl <- as_polars_lf(segments)
reference_pl <- as_polars_lf(reference)

for (bnds in c("[]", "[)", "(]", "()")) {
by <- join_by(
Expand Down Expand Up @@ -100,8 +100,8 @@ test_that("'within' helper works", {
end = c(150, 250, 399, 450)
)

segments_pl <- as_polars_df(segments)
reference_pl <- as_polars_df(reference)
segments_pl <- as_polars_lf(segments)
reference_pl <- as_polars_lf(reference)

by <- join_by(
chromosome,
Expand Down Expand Up @@ -142,32 +142,34 @@ test_that("'overlaps' helper works", {
end = c(150, 250, 399, 450)
)

segments_pl <- as_polars_df(segments)
reference_pl <- as_polars_df(reference)
segments_pl <- as_polars_lf(segments)
reference_pl <- as_polars_lf(reference)

by <- join_by(
chromosome,
overlaps(start, end, start, end)
)

expect_identical(
inner_join(segments, reference, by),
inner_join(segments_pl, reference_pl, by) |>
arrange(segment_id) |>
as_tibble()
)

by2 <- join_by(
chromosome,
overlaps(x$start, x$end, y$start, y$end)
)
for (bnds in c("[]", "[)", "(]", "()")) {
by <- join_by(
chromosome,
overlaps(start, end, start, end, bounds = !!bnds)
)

expect_identical(
inner_join(segments, reference, by),
inner_join(segments_pl, reference_pl, by) |>
arrange(segment_id) |>
as_tibble()
)

expect_identical(
inner_join(segments, reference, by2),
inner_join(segments_pl, reference_pl, by2) |>
arrange(segment_id) |>
as_tibble()
)
by2 <- join_by(
chromosome,
overlaps(x$start, x$end, y$start, y$end, bounds = !!bnds)
)

expect_identical(
inner_join(segments, reference, by2),
inner_join(segments_pl, reference_pl, by2) |>
arrange(segment_id) |>
as_tibble()
)
}
})

Sys.setenv('TIDYPOLARS_TEST' = FALSE)

0 comments on commit 9144fbf

Please sign in to comment.