-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: preview r code in connect to read pin #223
Conversation
View it on Connect: https://colorado.posit.co/rsc/content/4a580f0f-91f2-40cc-a060-d2e2a5b090a4/ |
@@ -1123,6 +1123,12 @@ def prepare_pin_version(self, pin_dir_path, x, name: "str | None", *args, **kwar | |||
# TODO(compat): set display none in index.html | |||
context["data_preview"] = json.dumps({}) | |||
|
|||
# do not show r code if not round-trip friendly | |||
if meta.type in ["joblib"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type options are "csv", "arrow", "parquet", "joblib", or "json". we will hide the R code if the pin is of joblib
type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
parity to https://github.com/rstudio/pins-r/pull/806/files
closes #222
on preview in Posit Connect, users should be able to see how to load the data in R and Python if applicable.