rstudio / rstudio/pins-python

Support multiple values for `type`, at least for reading

Open
#337 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.compatibility .new-behavior
Dominant language
Python
Stars
59
Forks
11
PR merge metrics
No merged PRs in 30d

Description

In https://github.com/rstudio/pins-r/pull/877, we are adding support for reading and writing multiple values for type, as outlined in https://github.com/rstudio/pins-r/issues/788.

In R, it will look like:

board |>
  pin_write(account_information, 
            name = "account_information", 
            type = c("parquet", "csv"))

You can see an example pin that has multiple types at https://pub.demo.posit.team/content/d97baef7-228e-4eee-8e45-79bd8aaeca71; let me know if you have trouble accessing that.

I think the minimum support we'd want on the Python side is being able to read one of these, something like this with a new optional type:

board.pin_read("hadley/sales-summary", type = "parquet")

Full support would look like reading and writing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the board.pin_read entry point and compare it with the example pin linked in the issue, then trace how its type value is consumed. Done means the agreed Python-side scope—at minimum reading a selected type, or full read/write support if chosen—works with a pin containing multiple types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.