Closed nealrichardson closed 7 months ago
Yeah, thanks for bringing this back up; you absolutely can roundtrip a pin through R and Python, as long as you use a file format that is amenable (i.e. not RDS, not joblib, etc).
We did talk about this when we first started the Python package. The main challenge, as I remember it, is running the Python board_deparse()
from R and vice versa. Right now, it is pretty simple. Here is what Python would need to do for R:
but we are tracking changes that need to be made in #726. Also doesn't look so bad for what R would need to do for Python.
We had other concerns at the time about trying to stay consistent with different versions of the R and Python packages but I am not so worried about that now, as that basic read/write interface is pretty solid. Also, we would need to check the metadata before generating the HTML to know if this file can be read from the other language.
We've got this implemented in the R package now and I have opened up rstudio/pins-python#222 to get it done in Python.
This is now merged into both the Python and R packages and will be in the next releases of each. Thanks again for surfacing this @nealrichardson! 🙌
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.
If you make a pin with the R package, you get https://github.com/rstudio/pins-r/blob/main/inst/preview/index.html created with it, which tells the Connect user how to load the data. But it only has R code there, even though you can totally use pins-python to read it (right?)
It would be nice if the code example was tabbed and had Python and R example code. (Assuming you agree, there should also be the same done to pins-python, https://github.com/rstudio/pins-python/blob/main/pins/rsconnect/html/index.html is Python only).