rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Some functions do not work with S3 #447

Closed laurivaltteri closed 3 years ago

laurivaltteri commented 3 years ago
> aws.s3::put_bucket("testing-pins-dev", location_constraint = NULL)
[1] TRUE
> test_board <- pins::board_s3(
+     bucket = "testing-pins-dev",
+     host = "s3.my-cloud-host.com",
+     key = aws.signature::locate_credentials()$key,
+     secret = aws.signature::locate_credentials()$secret
+ )
> test_board %>% pins::pin_write(dplyr::as_tibble(iris))
Guessing `name = 'dplyr-as-tibble-iris'`
Guessing `type = 'rds'`
Error in UseMethod("pin_store") : 
  no applicable method for 'pin_store' applied to an object of class "c('pins_board_datatxt', 'pins_board')"
> pins::pin(dplyr::as_tibble(iris), board = test_board)
> test_board %>% pins::pin_download('dplyr-as-tibble-iris')
Error in UseMethod("pin_fetch") : 
  no applicable method for 'pin_fetch' applied to an object of class "c('pins_board_datatxt', 'pins_board')"
> pins::pin_get("dplyr-as-tibble-iris", board = test_board)
# A tibble: 150 x 5
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
<dbl>       <dbl>        <dbl>       <dbl> <fct>  
    1          5.1         3.5          1.4         0.2 setosa 
2          4.9         3            1.4         0.2 setosa 
3          4.7         3.2          1.3         0.2 setosa 
4          4.6         3.1          1.5         0.2 setosa 
5          5           3.6          1.4         0.2 setosa 
6          5.4         3.9          1.7         0.4 setosa 
7          4.6         3.4          1.4         0.3 setosa 
8          5           3.4          1.5         0.2 setosa 
9          4.4         2.9          1.4         0.2 setosa 
10          4.9         3.1          1.5         0.1 setosa 
# … with 140 more rows
> test_board %>% pins::pin_list()
Error in UseMethod("pin_list") : 
    no applicable method for 'pin_list' applied to an object of class "c('pins_board_datatxt', 'pins_board')"
> test_board %>% pins::pin_delete("dplyr-as-tibble-iris")
> 
> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.5 (2021-03-31)
 os       Ubuntu 20.04.2 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Etc/UTC                     
 date     2021-05-06                  

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package       * version   date       lib source                       
 askpass         1.1       2019-01-13 [1] RSPM (R 4.0.3)               
 assertthat      0.2.1     2019-03-21 [1] RSPM (R 4.0.3)               
 aws.s3          0.3.21    2020-04-07 [1] RSPM (R 4.0.3)               
 aws.signature   0.6.0     2020-06-01 [1] RSPM (R 4.0.3)               
 base64enc       0.1-3     2015-07-28 [1] RSPM (R 4.0.3)               
 cli             2.4.0     2021-04-05 [1] RSPM (R 4.0.4)               
 crayon          1.4.1     2021-02-08 [1] RSPM (R 4.0.3)               
 curl            4.3       2019-12-02 [1] RSPM (R 4.0.3)               
 DBI             1.1.1     2021-01-15 [1] RSPM (R 4.0.3)               
 digest          0.6.27    2020-10-24 [1] RSPM (R 4.0.3)               
 dplyr           1.0.5     2021-03-05 [1] RSPM (R 4.0.3)               
 ellipsis        0.3.1     2020-05-15 [1] RSPM (R 4.0.3)               
 fansi           0.4.2     2021-01-15 [1] RSPM (R 4.0.3)               
 filelock        1.0.2     2018-10-05 [1] RSPM (R 4.0.0)               
 fs              1.5.0     2020-07-31 [1] RSPM (R 4.0.3)               
 generics        0.1.0     2020-10-31 [1] RSPM (R 4.0.3)               
 glue            1.4.2     2020-08-27 [1] RSPM (R 4.0.3)               
 httr            1.4.2     2020-07-20 [1] RSPM (R 4.0.3)               
 jsonlite        1.7.2     2020-12-09 [1] RSPM (R 4.0.3)               
 lifecycle       1.0.0     2021-02-15 [1] RSPM (R 4.0.3)               
 magrittr      * 2.0.1     2020-11-17 [1] RSPM (R 4.0.3)               
 mime            0.10      2021-02-13 [1] RSPM (R 4.0.3)               
 openssl         1.4.3     2020-09-18 [1] RSPM (R 4.0.3)               
 pillar          1.6.0     2021-04-13 [1] RSPM (R 4.0.4)               
 pins            0.99.9000 2021-05-06 [1] Github (rstudio/pins@bdaf1da)
 pkgconfig       2.0.3     2019-09-22 [1] RSPM (R 4.0.3)               
 purrr           0.3.4     2020-04-17 [1] RSPM (R 4.0.3)               
 R6              2.5.0     2020-10-28 [1] RSPM (R 4.0.3)               
 rappdirs        0.3.3     2021-01-31 [1] RSPM (R 4.0.3)               
 rlang           0.4.10    2020-12-30 [1] RSPM (R 4.0.3)               
 rstudioapi      0.13      2020-11-12 [1] RSPM (R 4.0.3)               
 sessioninfo     1.1.1     2018-11-05 [1] RSPM (R 4.0.3)               
 tibble          3.1.0     2021-02-25 [1] RSPM (R 4.0.3)               
 tidyselect      1.1.0     2020-05-11 [1] RSPM (R 4.0.3)               
 utf8            1.2.1     2021-03-12 [1] RSPM (R 4.0.3)               
 vctrs           0.3.7     2021-03-29 [1] RSPM (R 4.0.4)               
 withr           2.4.1     2021-01-26 [1] RSPM (R 4.0.3)               
 xml2            1.3.2     2020-04-23 [1] RSPM (R 4.0.3)               
 yaml            2.2.1     2020-02-01 [1] RSPM (R 4.0.3)               

[1] /usr/local/lib/R/site-library
[2] /usr/local/lib/R/library
hadley commented 3 years ago

Because that board doesn't support the new API yet.

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.