From 6219950c408d942fdaceca4e70f47da81b99f387 Mon Sep 17 00:00:00 2001 From: samssann Date: Sat, 11 Mar 2023 02:03:09 +0000 Subject: [PATCH] [create-pull-request] automated change --- tests/testthat/_snaps/deconstruct.md | 124 +++++++++---------- tests/testthat/_snaps/df/flatten.md | 115 ++++++++--------- tests/testthat/_snaps/disentangle.md | 4 +- tests/testthat/_snaps/dm.md | 119 +++++++++--------- tests/testthat/_snaps/dplyr.md | 2 +- tests/testthat/_snaps/enumerate_all_paths.md | 8 +- tests/testthat/_snaps/foreign-keys.md | 4 +- tests/testthat/_snaps/primary-keys.md | 2 +- tests/testthat/_snaps/rows-dm.md | 111 +---------------- tests/testthat/_snaps/zoom.md | 29 ++--- 10 files changed, 205 insertions(+), 313 deletions(-) diff --git a/tests/testthat/_snaps/deconstruct.md b/tests/testthat/_snaps/deconstruct.md index be8d00664..76671ace6 100644 --- a/tests/testthat/_snaps/deconstruct.md +++ b/tests/testthat/_snaps/deconstruct.md @@ -36,7 +36,7 @@ $uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $fks_in # A tibble: 2 x 3 @@ -68,7 +68,7 @@ $airlines$uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $airlines$fks_in # A tibble: 1 x 3 @@ -78,7 +78,7 @@ $airlines$fks_out # A tibble: 0 x 3 - # ... with 3 variables: child_fk_cols , parent_uuid , + # * 3 variables: child_fk_cols , parent_uuid , # parent_key_cols $airlines$uuid @@ -91,7 +91,7 @@ $airports$uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $airports$fks_in # A tibble: 2 x 3 @@ -102,7 +102,7 @@ $airports$fks_out # A tibble: 0 x 3 - # ... with 3 variables: child_fk_cols , parent_uuid , + # * 3 variables: child_fk_cols , parent_uuid , # parent_key_cols $airports$uuid @@ -115,12 +115,11 @@ $flights$uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $flights$fks_in # A tibble: 0 x 3 - # ... with 3 variables: child_uuid , child_fk_cols , - # parent_key_cols + # * 3 variables: child_uuid , child_fk_cols , parent_key_cols $flights$fks_out # A tibble: 5 x 3 @@ -142,7 +141,7 @@ $planes$uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $planes$fks_in # A tibble: 1 x 3 @@ -152,7 +151,7 @@ $planes$fks_out # A tibble: 0 x 3 - # ... with 3 variables: child_fk_cols , parent_uuid , + # * 3 variables: child_fk_cols , parent_uuid , # parent_key_cols $planes$uuid @@ -165,7 +164,7 @@ $weather$uks # A tibble: 0 x 1 - # ... with 1 variable: column + # * 1 variable: column $weather$fks_in # A tibble: 1 x 3 @@ -175,7 +174,7 @@ $weather$fks_out # A tibble: 0 x 3 - # ... with 3 variables: child_fk_cols , parent_uuid , + # * 3 variables: child_fk_cols , parent_uuid , # parent_key_cols $weather$uuid @@ -190,23 +189,22 @@ Output # A tibble: 1,761 x 19 # Keys: --- | 0 | 5 - year month day dep_time sched_de~1 dep_d~2 arr_t~3 sched~4 arr_d~5 carrier - - 1 2013 1 10 3 2359 4 426 437 -11 B6 - 2 2013 1 10 16 2359 17 447 444 3 B6 - 3 2013 1 10 450 500 -10 634 648 -14 US - 4 2013 1 10 520 525 -5 813 820 -7 UA - 5 2013 1 10 530 530 0 824 829 -5 UA - 6 2013 1 10 531 540 -9 832 850 -18 AA - 7 2013 1 10 535 540 -5 1015 1017 -2 B6 - 8 2013 1 10 546 600 -14 645 709 -24 B6 - 9 2013 1 10 549 600 -11 652 724 -32 EV - 10 2013 1 10 550 600 -10 649 703 -14 US - # ... with 1,751 more rows, 9 more variables: flight , tailnum , - # origin , dest , air_time , distance , hour , - # minute , time_hour , and abbreviated variable names - # 1: sched_dep_time, 2: dep_delay, 3: arr_time, 4: sched_arr_time, - # 5: arr_delay + year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time + + 1 2013 1 10 3 2359 4 426 437 + 2 2013 1 10 16 2359 17 447 444 + 3 2013 1 10 450 500 -10 634 648 + 4 2013 1 10 520 525 -5 813 820 + 5 2013 1 10 530 530 0 824 829 + 6 2013 1 10 531 540 -9 832 850 + 7 2013 1 10 535 540 -5 1015 1017 + 8 2013 1 10 546 600 -14 645 709 + 9 2013 1 10 549 600 -11 652 724 + 10 2013 1 10 550 600 -10 649 703 + # * 1,751 more rows + # * 11 more variables: arr_delay , carrier , flight , + # tailnum , origin , dest , air_time , distance , + # hour , minute , time_hour Code keyed_tbl_impl(dm_nycflights13(cycle = TRUE), "airports") Output @@ -224,7 +222,7 @@ 8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~ 9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~ 10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~ - # ... with 76 more rows + # * 76 more rows Code keyed_tbl_impl(dm_nycflights13(cycle = TRUE), "airlines") Output @@ -1449,24 +1447,25 @@ Output # A tibble: 1,800 x 32 # Keys: --- | 1 | 4 - origin year.x month.x day.x hour.x temp dewp humid wind_dir wind_~1 wind_~2 - - 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA - 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA - 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA - 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA - 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 7 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 8 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 9 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 10 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - # ... with 1,790 more rows, 21 more variables: precip , pressure , + origin year.x month.x day.x hour.x temp dewp humid wind_dir wind_speed + + 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 + 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 + 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 + 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 + 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 + 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 7 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 8 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 9 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 10 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + # * 1,790 more rows + # * 22 more variables: wind_gust , precip , pressure , # visib , time_hour , year.y , month.y , day.y , # dep_time , sched_dep_time , dep_delay , arr_time , # sched_arr_time , arr_delay , carrier , flight , # tailnum , dest , air_time , distance , hour.y , - # minute , and abbreviated variable names 1: wind_speed, 2: wind_gust + # minute # semi_join() @@ -1534,23 +1533,22 @@ # A tibble: 1,761 x 19 # Groups: month [2] # Keys: --- | 0 | 5 - year month day dep_time sched_de~1 dep_d~2 arr_t~3 sched~4 arr_d~5 carrier - - 1 2013 1 10 3 2359 4 426 437 -11 B6 - 2 2013 1 10 16 2359 17 447 444 3 B6 - 3 2013 1 10 450 500 -10 634 648 -14 US - 4 2013 1 10 520 525 -5 813 820 -7 UA - 5 2013 1 10 530 530 0 824 829 -5 UA - 6 2013 1 10 531 540 -9 832 850 -18 AA - 7 2013 1 10 535 540 -5 1015 1017 -2 B6 - 8 2013 1 10 546 600 -14 645 709 -24 B6 - 9 2013 1 10 549 600 -11 652 724 -32 EV - 10 2013 1 10 550 600 -10 649 703 -14 US - # ... with 1,751 more rows, 9 more variables: flight , tailnum , - # origin , dest , air_time , distance , hour , - # minute , time_hour , and abbreviated variable names - # 1: sched_dep_time, 2: dep_delay, 3: arr_time, 4: sched_arr_time, - # 5: arr_delay + year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time + + 1 2013 1 10 3 2359 4 426 437 + 2 2013 1 10 16 2359 17 447 444 + 3 2013 1 10 450 500 -10 634 648 + 4 2013 1 10 520 525 -5 813 820 + 5 2013 1 10 530 530 0 824 829 + 6 2013 1 10 531 540 -9 832 850 + 7 2013 1 10 535 540 -5 1015 1017 + 8 2013 1 10 546 600 -14 645 709 + 9 2013 1 10 549 600 -11 652 724 + 10 2013 1 10 550 600 -10 649 703 + # * 1,751 more rows + # * 11 more variables: arr_delay , carrier , flight , + # tailnum , origin , dest , air_time , distance , + # hour , minute , time_hour Code keyed_tbl_impl(dm, "airports") %>% group_by(tzone) Output @@ -1569,7 +1567,7 @@ 8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~ 9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~ 10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~ - # ... with 76 more rows + # * 76 more rows Code keyed_tbl_impl(dm, "airports") %>% group_by(faa) Output @@ -1588,7 +1586,7 @@ 8 BTV Burlington Intl 44.5 -73.2 335 -5 A Amer~ 9 BUF Buffalo Niagara Intl 42.9 -78.7 724 -5 A Amer~ 10 BUR Bob Hope 34.2 -118. 778 -8 A Amer~ - # ... with 76 more rows + # * 76 more rows # summarize for keyed tables produces expected output diff --git a/tests/testthat/_snaps/df/flatten.md b/tests/testthat/_snaps/df/flatten.md index 57eec70b3..3c3f827c4 100644 --- a/tests/testthat/_snaps/df/flatten.md +++ b/tests/testthat/_snaps/df/flatten.md @@ -13,19 +13,18 @@ Output $fact # A tibble: 10 x 7 - fact dim_1_key_1 dim_1_key_2 dim_2_key dim_3_key dim_4_key something~1 - - 1 acorn 14 N c X 7 1 - 2 blubber 13 M d W 8 2 - 3 cinderella 12 L e V 9 3 - 4 depth 11 K f U 10 4 - 5 elysium 10 J g T 11 5 - 6 fantasy 9 I h S 12 6 - 7 gorgeous 8 H i R 13 7 - 8 halo 7 G j Q 14 8 - 9 ill-advised 6 F k P 15 9 - 10 jitter 5 E l O 16 10 - # ... with abbreviated variable name 1: something.fact + fact dim_1_key_1 dim_1_key_2 dim_2_key dim_3_key dim_4_key something.fact + + 1 acorn 14 N c X 7 1 + 2 blubber 13 M d W 8 2 + 3 cindere~ 12 L e V 9 3 + 4 depth 11 K f U 10 4 + 5 elysium 10 J g T 11 5 + 6 fantasy 9 I h S 12 6 + 7 gorgeous 8 H i R 13 7 + 8 halo 7 G j Q 14 8 + 9 ill-adv~ 6 F k P 15 9 + 10 jitter 5 E l O 16 10 $dim_1 # A tibble: 20 x 3 @@ -131,42 +130,38 @@ dm_rename(dim_4, something.dim_4 = something) Output # A tibble: 10 x 11 - fact dim_1~1 dim_1~2 dim_2~3 dim_3~4 dim_4~5 somet~6 somet~7 somet~8 somet~9 - - 1 acorn 14 N c X 7 1 p G 22 - 2 blub~ 13 M d W 8 2 o H 21 - 3 cind~ 12 L e V 9 3 n I 20 - 4 depth 11 K f U 10 4 m J 19 - 5 elys~ 10 J g T 11 5 l K 18 - 6 fant~ 9 I h S 12 6 k L 17 - 7 gorg~ 8 H i R 13 7 j M 16 - 8 halo 7 G j Q 14 8 i N 15 - 9 ill-~ 6 F k P 15 9 h O 14 - 10 jitt~ 5 E l O 16 10 g P 13 - # ... with 1 more variable: something.dim_4 , and abbreviated variable - # names 1: dim_1_key_1, 2: dim_1_key_2, 3: dim_2_key, 4: dim_3_key, - # 5: dim_4_key, 6: something.fact, 7: something.dim_1, 8: something.dim_2, - # 9: something.dim_3 + fact dim_1_key_1 dim_1_key_2 dim_2_key dim_3_key dim_4_key something.fact + + 1 acorn 14 N c X 7 1 + 2 blubber 13 M d W 8 2 + 3 cindere~ 12 L e V 9 3 + 4 depth 11 K f U 10 4 + 5 elysium 10 J g T 11 5 + 6 fantasy 9 I h S 12 6 + 7 gorgeous 8 H i R 13 7 + 8 halo 7 G j Q 14 8 + 9 ill-adv~ 6 F k P 15 9 + 10 jitter 5 E l O 16 10 + # * 4 more variables: something.dim_1 , something.dim_2 , + # something.dim_3 , something.dim_4 Code result_from_flatten_new() Output # A tibble: 10 x 11 - fact dim_1~1 dim_1~2 dim_2~3 dim_3~4 dim_4~5 somet~6 somet~7 somet~8 somet~9 - - 1 acorn 14 N c X 7 1 p G 22 - 2 blub~ 13 M d W 8 2 o H 21 - 3 cind~ 12 L e V 9 3 n I 20 - 4 depth 11 K f U 10 4 m J 19 - 5 elys~ 10 J g T 11 5 l K 18 - 6 fant~ 9 I h S 12 6 k L 17 - 7 gorg~ 8 H i R 13 7 j M 16 - 8 halo 7 G j Q 14 8 i N 15 - 9 ill-~ 6 F k P 15 9 h O 14 - 10 jitt~ 5 E l O 16 10 g P 13 - # ... with 1 more variable: something.dim_4 , and abbreviated variable - # names 1: dim_1_key_1, 2: dim_1_key_2, 3: dim_2_key, 4: dim_3_key, - # 5: dim_4_key, 6: something.fact, 7: something.dim_1, 8: something.dim_2, - # 9: something.dim_3 + fact dim_1_key_1 dim_1_key_2 dim_2_key dim_3_key dim_4_key something.fact + + 1 acorn 14 N c X 7 1 + 2 blubber 13 M d W 8 2 + 3 cindere~ 12 L e V 9 3 + 4 depth 11 K f U 10 4 + 5 elysium 10 J g T 11 5 + 6 fantasy 9 I h S 12 6 + 7 gorgeous 8 H i R 13 7 + 8 halo 7 G j Q 14 8 + 9 ill-adv~ 6 F k P 15 9 + 10 jitter 5 E l O 16 10 + # * 4 more variables: something.dim_1 , something.dim_2 , + # something.dim_3 , something.dim_4 # `dm_flatten_to_tbl()` does the right things for 'inner_join()' @@ -174,20 +169,18 @@ out Output # A tibble: 10 x 11 - fact dim_1~1 dim_1~2 dim_2~3 dim_3~4 dim_4~5 somet~6 somet~7 somet~8 somet~9 - - 1 acorn 14 N c X 7 1 p G 22 - 2 blub~ 13 M d W 8 2 o H 21 - 3 cind~ 12 L e V 9 3 n I 20 - 4 depth 11 K f U 10 4 m J 19 - 5 elys~ 10 J g T 11 5 l K 18 - 6 fant~ 9 I h S 12 6 k L 17 - 7 gorg~ 8 H i R 13 7 j M 16 - 8 halo 7 G j Q 14 8 i N 15 - 9 ill-~ 6 F k P 15 9 h O 14 - 10 jitt~ 5 E l O 16 10 g P 13 - # ... with 1 more variable: something.dim_4 , and abbreviated variable - # names 1: dim_1_key_1, 2: dim_1_key_2, 3: dim_2_key, 4: dim_3_key, - # 5: dim_4_key, 6: something.fact, 7: something.dim_1, 8: something.dim_2, - # 9: something.dim_3 + fact dim_1_key_1 dim_1_key_2 dim_2_key dim_3_key dim_4_key something.fact + + 1 acorn 14 N c X 7 1 + 2 blubber 13 M d W 8 2 + 3 cindere~ 12 L e V 9 3 + 4 depth 11 K f U 10 4 + 5 elysium 10 J g T 11 5 + 6 fantasy 9 I h S 12 6 + 7 gorgeous 8 H i R 13 7 + 8 halo 7 G j Q 14 8 + 9 ill-adv~ 6 F k P 15 9 + 10 jitter 5 E l O 16 10 + # * 4 more variables: something.dim_1 , something.dim_2 , + # something.dim_3 , something.dim_4 diff --git a/tests/testthat/_snaps/disentangle.md b/tests/testthat/_snaps/disentangle.md index e8900dc77..9a719d6a5 100644 --- a/tests/testthat/_snaps/disentangle.md +++ b/tests/testthat/_snaps/disentangle.md @@ -64,7 +64,7 @@ 8 d-2 d e-3 e no_action 9 d-1 d f-2 f no_action 10 d-2 d f-4 f no_action - # ... with 12 more rows + # * 12 more rows Code dm_disentangle(entangled_dm(), c) %>% dm_get_all_fks() Message @@ -89,7 +89,7 @@ 8 d-2 d e-3 e no_action 9 d-1 d f-2 f no_action 10 d-2 d f-4 f no_action - # ... with 12 more rows + # * 12 more rows Code dm_disentangle(entangled_dm_2(), a) %>% dm_get_all_fks() Message diff --git a/tests/testthat/_snaps/dm.md b/tests/testthat/_snaps/dm.md index ea645564c..cf0ee8dad 100644 --- a/tests/testthat/_snaps/dm.md +++ b/tests/testthat/_snaps/dm.md @@ -394,84 +394,87 @@ select(-uuid) Output # A tibble: 5 x 10 - table data segment display pks uks fks filters zoom col_t~1 - - 1 airli~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 2 airpo~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 3 fligh~ [0 x 2] [0 x 1] [0 x 4] [0 x 2] - 4 planes [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 5 weath~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - # ... with abbreviated variable name 1: col_tracker_zoom + table data segment display pks uks fks filters zoom + + 1 airlines [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 2 airports [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 3 flights [0 x 2] [0 x 1] [0 x 4] [0 x 2] + 4 planes [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 5 weather [1 x 2] [0 x 1] [1 x 4] [0 x 2] + # * 1 more variable: col_tracker_zoom Code nyc_comp() %>% dm_zoom_to(weather) %>% mutate(origin_new = paste0(origin, " airport")) %>% compute() %>% dm_update_zoomed() %>% collect() %>% dm_get_def() %>% select(-uuid) Output # A tibble: 5 x 10 - table data segment display pks uks fks filters zoom col_t~1 - - 1 airli~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 2 airpo~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 3 fligh~ [0 x 2] [0 x 1] [0 x 4] [0 x 2] - 4 planes [1 x 2] [0 x 1] [1 x 4] [0 x 2] - 5 weath~ [1 x 2] [0 x 1] [1 x 4] [0 x 2] - # ... with abbreviated variable name 1: col_tracker_zoom + table data segment display pks uks fks filters zoom + + 1 airlines [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 2 airports [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 3 flights [0 x 2] [0 x 1] [0 x 4] [0 x 2] + 4 planes [1 x 2] [0 x 1] [1 x 4] [0 x 2] + 5 weather [1 x 2] [0 x 1] [1 x 4] [0 x 2] + # * 1 more variable: col_tracker_zoom Code nyc_comp() %>% dm_zoom_to(weather) %>% collect() Message Detaching table from dm, use `collect(pull_tbl())` instead to silence this message. Output # A tibble: 144 x 15 - origin year month day hour temp dewp humid wind_dir wind_speed wind_g~1 - - 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA - 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA - 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA - 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA - 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 NA - 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 NA - 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 26.5 - # ... with 134 more rows, 4 more variables: precip , pressure , - # visib , time_hour , and abbreviated variable name 1: wind_gust + origin year month day hour temp dewp humid wind_dir wind_speed + + 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 + 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 + 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 + 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 + 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 + 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 + 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 + 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 + # * 134 more rows + # * 5 more variables: wind_gust , precip , pressure , + # visib , time_hour Code pull_tbl(nyc_comp(), weather) Output # A tibble: 144 x 15 - origin year month day hour temp dewp humid wind_dir wind_speed wind_g~1 - - 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA - 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA - 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA - 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA - 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 NA - 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 NA - 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 26.5 - # ... with 134 more rows, 4 more variables: precip , pressure , - # visib , time_hour , and abbreviated variable name 1: wind_gust + origin year month day hour temp dewp humid wind_dir wind_speed + + 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 + 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 + 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 + 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 + 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 + 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 + 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 + 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 + # * 134 more rows + # * 5 more variables: wind_gust , precip , pressure , + # visib , time_hour Code nyc_comp() %>% dm_zoom_to(weather) %>% pull_tbl() Output # A tibble: 144 x 15 - origin year month day hour temp dewp humid wind_dir wind_speed wind_g~1 - - 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA - 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA - 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA - 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA - 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 NA - 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 NA - 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 26.5 - # ... with 134 more rows, 4 more variables: precip , pressure , - # visib , time_hour , and abbreviated variable name 1: wind_gust + origin year month day hour temp dewp humid wind_dir wind_speed + + 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 + 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 + 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 + 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 + 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 + 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 + 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 + 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 + # * 134 more rows + # * 5 more variables: wind_gust , precip , pressure , + # visib , time_hour # glimpse.dm() works diff --git a/tests/testthat/_snaps/dplyr.md b/tests/testthat/_snaps/dplyr.md index 0b863ca54..0c3e9689e 100644 --- a/tests/testthat/_snaps/dplyr.md +++ b/tests/testthat/_snaps/dplyr.md @@ -505,7 +505,7 @@ 4 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA 5 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA 6 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - # ... with 4 more variables: precip , pressure , visib , + # * 4 more variables: precip , pressure , visib , # time_hour Code zoomed_comp_dm %>% slice(c(1:3, 5:3), .keep_pk = TRUE) %>% col_tracker_zoomed() diff --git a/tests/testthat/_snaps/enumerate_all_paths.md b/tests/testthat/_snaps/enumerate_all_paths.md index e43bc77b8..2fc876097 100644 --- a/tests/testthat/_snaps/enumerate_all_paths.md +++ b/tests/testthat/_snaps/enumerate_all_paths.md @@ -88,7 +88,7 @@ 8 e-2 e 9 g-2 g 10 c-2 c - # ... with 12 more rows + # * 12 more rows $new_fks # A tibble: 22 x 5 @@ -104,7 +104,7 @@ 8 d-1 d f-2 f no_action 9 f-2 f g-2 g no_action 10 e-2 e g-2 g no_action - # ... with 12 more rows + # * 12 more rows Code enumerate_all_paths(entangled_dm(), "c") @@ -123,7 +123,7 @@ 8 e-2 e 9 g-2 g 10 b-2 b - # ... with 12 more rows + # * 12 more rows $new_fks # A tibble: 22 x 5 @@ -139,7 +139,7 @@ 8 d-1 d f-2 f no_action 9 f-2 f g-2 g no_action 10 e-2 e g-2 g no_action - # ... with 12 more rows + # * 12 more rows Code enumerate_all_paths(entangled_dm_2(), "a") diff --git a/tests/testthat/_snaps/foreign-keys.md b/tests/testthat/_snaps/foreign-keys.md index e60795566..2e91f5927 100644 --- a/tests/testthat/_snaps/foreign-keys.md +++ b/tests/testthat/_snaps/foreign-keys.md @@ -172,8 +172,8 @@ $fks # A tibble: 0 x 5 - # ... with 5 variables: child_table , child_fk_cols , - # parent_table , parent_key_cols , on_delete + # * 5 variables: child_table , child_fk_cols , parent_table , + # parent_key_cols , on_delete # dm_enum_fk_candidates() works as intended? diff --git a/tests/testthat/_snaps/primary-keys.md b/tests/testthat/_snaps/primary-keys.md index 74d287b2f..c10278555 100644 --- a/tests/testthat/_snaps/primary-keys.md +++ b/tests/testthat/_snaps/primary-keys.md @@ -173,7 +173,7 @@ Output $pks # A tibble: 0 x 3 - # ... with 3 variables: table , pk_col , autoincrement + # * 3 variables: table , pk_col , autoincrement $fks # A tibble: 5 x 5 diff --git a/tests/testthat/_snaps/rows-dm.md b/tests/testthat/_snaps/rows-dm.md index 0d2bfb9cc..b0563da7e 100644 --- a/tests/testthat/_snaps/rows-dm.md +++ b/tests/testthat/_snaps/rows-dm.md @@ -289,7 +289,7 @@ Message Result is returned as a dm object with lazy tables. Use `in_place = FALSE` to mute this message, or `in_place = TRUE` to write to the underlying tables. Output - # ... with 4 variables: c , d , e , e1 + # * 4 variables: c , d , e , e1 Code dm_copy %>% pull_tbl(tf_2) %>% arrange_all() Output @@ -308,7 +308,7 @@ Warning: `dm_rows_truncate()` was deprecated in dm 1.0.0. Output - # ... with 4 variables: c , d , e , e1 + # * 4 variables: c , d , e , e1 Code dm_copy %>% dm_get_tables() %>% map(arrange_all) Output @@ -403,7 +403,7 @@ 10 10 J $tf_2 - # ... with 4 variables: c , d , e , e1 + # * 4 variables: c , d , e , e1 $tf_3 f f1 g @@ -429,7 +429,7 @@ 5 e seven F 6 $tf_5 - # ... with 4 variables: ww , k , l , m + # * 4 variables: ww , k , l , m $tf_6 zz n o @@ -441,106 +441,3 @@ 5 1 tree f -# dm_rows_append() works with autoincrement PKs and FKS for selected DBs - - Code - local_dm$t1 - Output - # A tibble: 3 x 2 - a o - - 1 5 a - 2 6 b - 3 7 c - Code - local_dm$t2 - Output - # A tibble: 3 x 3 - c d o - - 1 10 7 c - 2 9 6 b - 3 8 5 a - Code - local_dm$t3 - Output - # A tibble: 3 x 2 - e o - - 1 6 b - 2 5 a - 3 7 c - Code - local_dm$t4 - Output - # A tibble: 3 x 3 - g h o - - 1 1 8 a - 2 2 9 b - 3 3 10 c - Code - filled_dm$t1 - Output - # A tibble: 3 x 2 - a o - - 1 5 a - 2 6 b - 3 7 c - Code - filled_dm$t2 - Output - # A tibble: 3 x 3 - c d o - - 1 10 7 c - 2 9 6 b - 3 8 5 a - Code - filled_dm$t3 - Output - # A tibble: 0 x 2 - # ... with 2 variables: e , o - Code - filled_dm$t4 - Output - # A tibble: 3 x 3 - g h o - - 1 NA 8 a - 2 NA 9 b - 3 NA 10 c - Code - filled_dm_in_place$t1 - Output - # A tibble: 3 x 2 - a o - - 1 1 a - 2 2 b - 3 3 c - Code - filled_dm_in_place$t2 - Output - # A tibble: 3 x 3 - c d o - - 1 1 3 c - 2 2 2 b - 3 3 1 a - Code - filled_dm_in_place$t3 - Output - # A tibble: 0 x 2 - # ... with 2 variables: e , o - Code - filled_dm_in_place$t4 - Output - # A tibble: 3 x 3 - g h o - - 1 1 3 a - 2 2 2 b - 3 3 1 c - diff --git a/tests/testthat/_snaps/zoom.md b/tests/testthat/_snaps/zoom.md index 6dad87cfe..edb1d180d 100644 --- a/tests/testthat/_snaps/zoom.md +++ b/tests/testthat/_snaps/zoom.md @@ -21,20 +21,21 @@ Output # Zoomed table: weather # A tibble: 144 x 15 - origin year month day hour temp dewp humid wind_dir wind_speed wind_g~1 - - 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 NA - 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 NA - 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 NA - 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 NA - 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 NA - 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 20.7 - 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 17.3 - 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 NA - 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 NA - 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 26.5 - # ... with 134 more rows, 4 more variables: precip , pressure , - # visib , time_hour , and abbreviated variable name 1: wind_gust + origin year month day hour temp dewp humid wind_dir wind_speed + + 1 EWR 2013 1 10 0 41 32 70.1 230 8.06 + 2 EWR 2013 1 10 1 39.0 30.0 69.9 210 9.21 + 3 EWR 2013 1 10 2 39.0 28.9 66.8 230 6.90 + 4 EWR 2013 1 10 3 39.9 27.0 59.5 270 5.75 + 5 EWR 2013 1 10 4 41 26.1 55.0 320 6.90 + 6 EWR 2013 1 10 5 41 26.1 55.0 300 12.7 + 7 EWR 2013 1 10 6 39.9 25.0 54.8 280 6.90 + 8 EWR 2013 1 10 7 41 25.0 52.6 330 6.90 + 9 EWR 2013 1 10 8 43.0 25.0 48.7 330 8.06 + 10 EWR 2013 1 10 9 45.0 23 41.6 320 17.3 + # * 134 more rows + # * 5 more variables: wind_gust , precip , pressure , + # visib , time_hour Code nyc_comp() %>% dm_zoom_to(weather) %>% dm_update_zoomed() Output