This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Load package for interactive development
devtools::load_all()
# Run all tests
devtools::test()
# Run a single test file
testthat::test(filter = "board_folder")
# Generate documentation from roxygen comments
devtools::document()
# Run R CMD check (CI runs with error-on: "note")
devtools::check()pins is an R package for publishing data, models, and other R objects to various storage backends called "boards". Pins can be versioned and include metadata. There is also a companion pins for Python package with cross-language compatibility.
The core abstraction is the board - a storage location for pins. All boards inherit from pins_board and implement S3 methods:
pin_store()- save a pin to the boardpin_fetch()- retrieve a pin from the boardpin_meta()- get pin metadatapin_list()- list all pins on a boardpin_exists()- check if a pin existspin_delete()- remove a pinpin_versions()- list versions of a pinpin_version_delete()- delete a specific version
Board implementations in R/board_*.R:
board_folder()/board_temp()/board_local()- local filesystemboard_connect()- Posit Connectboard_s3()- AWS S3 (and S3-compatible storage)board_gcs()- Google Cloud Storageboard_azure()- Azure Blob Storageboard_url()- read-only board from URLsboard_databricks()- Databricks Volumesboard_ms365()- Microsoft 365 (OneDrive/SharePoint)board_gdrive()- Google Drive
The package has two API versions:
- v1 (modern): Uses
pin_read()/pin_write()- preferred - v0 (legacy): Uses
pin_get()/pin()- deprecated, files inR/legacy_*.R
New board implementations should use new_board_v1().
Supported serialization types: rds, json, csv, parquet, arrow, qs2
Test helpers in R/testthat.R provide standard test suites for board implementations:
test_api_basic()- core pin operationstest_api_versioning()- version managementtest_api_meta()- metadata handlingtest_api_manifest()- board manifest files
Board test files call these helpers, e.g., test_api_basic(board_temp()).
R/pin-read-write.R- main user-facing functionsR/board.R- board base class and utilitiesR/testthat.R- shared test infrastructure and error constructorsR/meta.RandR/pin-meta.R- metadata handlingR/versions.RandR/pin_versions.R- version management