Skip to content

Commit

Permalink
Merge branch 'main' into f-reorg-import
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Oct 8, 2023
2 parents 27d1e59 + bfd1498 commit b99dcfa
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 10 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dm
Title: Relational Data Models
Version: 1.0.6.9008
Date: 2023-10-07
Version: 1.0.6.9009
Date: 2023-10-08
Authors@R:
c(person(given = "Tobias",
family = "Schieferdecker",
Expand Down Expand Up @@ -55,7 +55,6 @@ Imports:
glue,
igraph,
lifecycle (>= 1.0.3),
magrittr,
memoise,
methods,
purrr (>= 1.0.0),
Expand Down Expand Up @@ -83,6 +82,7 @@ Suggests:
keyring,
knitr,
labelled (>= 2.12.0),
magrittr,
mockr,
nycflights13,
odbc,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ import(cli)
import(dplyr, except = c(data_frame))
import(glue)
import(lifecycle)
import(magrittr, except = c(set_names))
import(purrr, except = c(list_along, rep_along, invoke, modify, as_function, flatten_dbl, flatten_lgl, flatten_int, flatten_raw, flatten_chr, splice, flatten, prepend, `%@%`, `%||%`))
import(rlang)
import(tibble, except = c(data_frame))
Expand Down
27 changes: 27 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
<!-- NEWS.md is maintained by https://fledge.cynkra.com, contributors should not edit this file -->

# dm 1.0.6.9009

## Chore

- Prepare for removal of magrittr imports (#1983).

- Add FIXME.

- Support loading with empty NAMESPACE file.

- Move pillar to Suggests (#1976).

- Switch to usethis imports, blanket vctrs import.

- Switch internal testing to MariaDB.

- Explain reasoning behind SQLite.

- Parallel.

## Testing

- Add explicit unique key to `dm_for_filter()`.

- Add Postgres test for `dm_sql()`.


# dm 1.0.6.9008

## Chore
Expand Down
2 changes: 1 addition & 1 deletion R/code-generation.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cg_eval_block <- function(cg_block) {
if (is_empty(cg_block$cg_f_list)) {
eval_tidy(cg_block$cg_input_object)
} else {
freduce(eval_tidy(cg_block$cg_input_object), cg_block$cg_f_list)
magrittr::freduce(eval_tidy(cg_block$cg_input_object), cg_block$cg_f_list)
}
}

Expand Down
1 change: 0 additions & 1 deletion R/dm-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#' @rawNamespace import(dplyr, except = c(data_frame))
#' @rawNamespace import(purrr, except = c(list_along, rep_along, invoke, modify, as_function, flatten_dbl, flatten_lgl, flatten_int, flatten_raw, flatten_chr, splice, flatten, prepend, `%@%`, `%||%`))
#' @rawNamespace import(tidyr, except = c(extract))
#' @rawNamespace import(magrittr, except = c(set_names))
## usethis namespace: start
#' @importFrom methods is
#' @importFrom igraph V E
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
Primary keys: 16
Foreign keys: 14

---
# output for dm() with dm (2)

Code
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter())
Expand All @@ -154,7 +154,7 @@
* "tf_5" at locations 5 and 16.
* ...

---
# output for dm() with dm (3)

Code
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique") %>%
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/examine-cardinalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Message
! No FKs available in `dm`.

---
# `dm_examine_cardinalities()` API (2)

Code
dm_examine_cardinalities(dm_test_obj(), foo = "bar")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/examine-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
Message
i No constraints defined.

---
# `dm_examine_constraints()` API (2)

Code
dm_examine_constraints(dm_test_obj(), foo = "bar")
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-dm.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,15 @@ test_that("output for dm() with dm", {
dm(dm_for_filter()) %>% collect()
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique", .quiet = TRUE) %>% collect()
})
})

test_that("output for dm() with dm (2)", {
expect_snapshot(error = TRUE, {
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter())
})
})

test_that("output for dm() with dm (3)", {
expect_snapshot({
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique") %>% collect()
})
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examine-cardinalities.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ test_that("`dm_examine_cardinalities()` API", {
dm_examine_cardinalities(dm_test_obj(), progress = FALSE)
dm_examine_cardinalities(dm = dm_test_obj())
})
})

test_that("`dm_examine_cardinalities()` API (2)", {
expect_snapshot(error = TRUE, {
dm_examine_cardinalities(dm_test_obj(), foo = "bar")
})
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examine-constraints.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ test_that("`dm_examine_constraints()` API", {
dm_examine_constraints(dm_test_obj(), progress = FALSE)
dm_examine_constraints(dm = dm_test_obj())
})
})

test_that("`dm_examine_constraints()` API (2)", {
expect_snapshot(error = TRUE, {
dm_examine_constraints(dm_test_obj(), foo = "bar")
})
Expand Down

0 comments on commit b99dcfa

Please sign in to comment.