Skip to content

Should board_folder use caching by default? #326

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

Open
nathanjmcdougall opened this issue Apr 21, 2025 · 2 comments
Open

Should board_folder use caching by default? #326

nathanjmcdougall opened this issue Apr 21, 2025 · 2 comments

Comments

@nathanjmcdougall
Copy link
Contributor

From the docs, I got the impression that pins.board_folder with a shared network drive would include caching:

Note that when the data lives elsewhere, pins takes care of downloading and caching so that it's only re-downloaded when needed.

But this doesn't seem to be the case:

return board("file", path, versioned, cache=None, allow_pickle_read=allow_pickle_read)

I am working around this by using pins.board directly:

board = pins.board("file", "Z:\\my-team\pins")

But I am wondering whether this behaviour (of caching network drive boards) should be default. If not, should it be better documented?

@juliasilge
Copy link
Member

What we say in the R package vignette is:

pin_read() and pin_download() automatically cache remote pins: they maintain a local copy of the data (so it's fast) but always check that it's up-to-date (so your analysis doesn't use stale data).

I guess we are leaning on a specific meaning for the adjective "remote" there, and we have had some confusion about the situation with a shared network drive, though, which the code in pins mostly treats as a local filesystem.

See some discussions in:

@nathanjmcdougall
Copy link
Contributor Author

That makes sense, thanks.

What I propose for the documentation might just be a new example here:

```python
board = board_local() # share data across R sessions on the same computer
board = board_folder("~/Dropbox") # share data with others using dropbox
board = board_folder("Z:\\my-team\pins") # share data using a shared network drive
board = board_connect() # share data with Posit Connect
```

to the effect of

board = pins.board("file", "Z:\\my-team\pins") # share data using a shared network drive with caching

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