Skip to content

Conversation

@isabelizimm
Copy link
Collaborator

@isabelizimm isabelizimm commented Nov 17, 2023

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.

@isabelizimm
Copy link
Collaborator Author

context["data_preview"] = json.dumps({})

# do not show r code if not round-trip friendly
if meta.type in ["joblib"]:
Copy link
Collaborator Author

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

Copy link
Member

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@isabelizimm isabelizimm merged commit f656dcc into main Nov 20, 2023
@isabelizimm isabelizimm deleted the preview-in-connect branch November 20, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add R code to Connect preview HTML

3 participants