Skip to content
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

Add optional url field to _BaseVersion #154

Closed
machow opened this issue Sep 9, 2022 · 4 comments
Closed

Add optional url field to _BaseVersion #154

machow opened this issue Sep 9, 2022 · 4 comments

Comments

@machow
Copy link
Collaborator

machow commented Sep 9, 2022

Currently, R pins adds a url field to the meta$local result of pin_meta for these boards:

  • board_rsconnect
  • board_url

Let's add an optional URL field high up in the version hierarchy, so that boards can tack it on as supplemental info. This is used by vetiver R in its rapidoc API spec.

@isabelizimm
Copy link
Collaborator

isabelizimm commented Oct 28, 2022

When the url is added (probably in a local data structure like R), can we add the GUID too? R currently stores this as well. And, as a plus, it would get rstudio/vetiver-python#96 nearly solved 😄

@machow
Copy link
Collaborator Author

machow commented Nov 1, 2022

Some examples:

R S3

image

R RSC

image

python RSC

Note that python pins includes version directly in metadata (rather than in metadata$local). VersionRaw only contains a version field (whereas Version includes version, created, and hash).

from dotenv import load_dotenv
load_dotenv()
from pins import board_rsconnect
board = board_rsconnect("https://colorado.rstudio.com/rsc")
board.pin_meta("mtcars3")
Meta(
    title='mtcars3: a pinned 32 x 11 DataFrame', description=None, created='20220624T122220Z', 
    pin_hash='3b134bae183b50c9', file='mtcars3.csv', file_size=1333, type='csv', api_version=1, 
    version=VersionRaw(version='58083'), name='michael.chow/mtcars3', user={}
)

@isabelizimm
Copy link
Collaborator

possibility to use lru cache to achieve this? rather than _user_name_cache

@isabelizimm
Copy link
Collaborator

implemented in #167

@github-project-automation github-project-automation bot moved this from In Progress to Done in MLOps with vetiver 🏺 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants