rstudio / pins-r

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

Better directory detection semantics and zip behavior (if we keep it) #413

Closed colearendt closed 3 years ago

colearendt commented 3 years ago

Current / legacy pins behavior:

However,

I had to change this (saved_model is a directory):

library(pins)
library(keras)

# Pin it on RStudio Connect
pins::board_register_rsconnect()
pins::pin(
  "saved_model",
  "peptide_model",
  "Peptide Prediction Model",
  "rsconnect",
  zip = TRUE
)

To this:

library(pins)
library(keras)
# Pin it on RStudio Connect
pins::board_register_rsconnect()
local_zipfile <- zip::zip("model.zip", "saved_model")
pins::pin(
  local_zipfile,
  "peptide_model",
  "Peptide Prediction Model",
  "rsconnect"
)
hadley commented 3 years ago

My thought is that each pin should be one "thing", but that thing might be a directory. I'm not sure how much work this will be; I think it's mostly testing it and fixing all the places that I assumed that a pin would be a file.

hadley commented 3 years ago

Superseded by #427, I think.

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.