-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect preview html: include Python code too? #796
Comments
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 Lines 365 to 367 in f6c6f50
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).
The text was updated successfully, but these errors were encountered: