rstudio / pins-r

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

`pin_write()` does not always return fully qualified path as documented #647

Closed juliasilge closed 2 years ago

juliasilge commented 2 years ago

As @jonthegeek points out in #646 object_write() does not always return the path. Sometimes it returns the object.

juliasilge commented 2 years ago

Wait, is this wrong? It does always return the path, doesn't it?

https://github.com/rstudio/pins-r/blob/b8ea052113fb40ebfbf72b6ef98b8b21ba51489a/R/pin-read-write.R#L135

Maybe we should write a couple of tests of what pin_write() returns.

jonthegeek commented 2 years ago

Huh, I think I misread it. I thought it was returning what the sub-function returns, but it ignores that... so I think you're all set!

juliasilge commented 2 years ago

We actually are testing this, via the local_pin() function:

https://github.com/rstudio/pins-r/blob/b8ea052113fb40ebfbf72b6ef98b8b21ba51489a/R/testthat.R#L2

That function is called in all the tests that run across boards, including the metadata tests like test_api_meta(). We are definitely good to go. 👍

github-actions[bot] commented 1 year 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.