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

Support new board manifest _pins.yaml #174

Open
juliasilge opened this issue Nov 21, 2022 · 2 comments
Open

Support new board manifest _pins.yaml #174

juliasilge opened this issue Nov 21, 2022 · 2 comments
Assignees

Comments

@juliasilge
Copy link
Member

In rstudio/pins-r#661 we added support for a manifest file. In pins for Python, we now need to:

  • not identify the new _pins.yaml file at the root of the board as a pin
  • allow folks to write a manifest file from Python

The first one is high priority as we plan to not release pins for R until this gets implemented. The second is low priority and we can wait on it until whatever is a good time.

@juliasilge
Copy link
Member Author

    @juliasilge it appears adding a `pins.txt` file as a manifest breaks `pin_search` on python pins. The reason is that in the python version `pin_list()` returns the filename, and `pin_search` attempts to retrieve metadata for every pin as part of search.

Here's the relevant R pins pins_search code fetching metadata (which works fine with the manifest file).

wdyt is a good move here? I can modify pins-python to ignore pins.txt files, but I'm wondering what the right way sequence is for releasing..

edit: how I tested

Using an .env file with credentials filled in from .env.dev.

In python:

from dotenv import load_dotenv
load_dotenv()
from pins import board_s3
from pins.tests.helpers import BoardBuilder

bb = BoardBuilder("s3")
board = bb.create_tmp_board("pins/tests/pins-compat")

# list path to temporary pins bucket, for copying into R
board.board

Switching to R:

board <- board_s3(<bucket_from_above>, prefix="<prefix_from_above>/")

# note that this also prints a warning
board %>% board_manifest()

Back in python:

board.pin_search("abc")

Originally posted by @machow in rstudio/pins-r#661 (comment)

@machow
Copy link
Collaborator

machow commented Dec 20, 2022

v0.7.3 shouldn't identify _pins.yaml as a pin. Still need to add an analogue to R pin's write_board_manifest()

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

No branches or pull requests

2 participants