From 12c86c91fc7383f06513acee41e64ed770c337c4 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Fri, 13 Mar 2026 10:01:13 -0400 Subject: [PATCH 1/3] ci: skip databricks tests on fork PRs --- .github/workflows/ci.yml | 4 ++-- pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 506dfd3..60c52a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,8 +123,8 @@ jobs: python -m pip install -e .[test] - name: Run tests run: | - # TODO: better way to disable all cloud backend tests? - pytest pins -m 'not fs_rsc and not fs_s3 and not fs_gcs and not fs_abfs and not skip_on_github' + # Skip all tests requiring credentials, which aren't available on fork PRs. + pytest pins -m 'not fs_rsc and not fs_s3 and not fs_gcs and not fs_abfs and not fs_dbc and not skip_on_github' build-docs: diff --git a/pyproject.toml b/pyproject.toml index 330dd5d..bfa260d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,6 +87,10 @@ universal = 1 [tool.pytest.ini_options] markers = [ "fs_file: mark test to only run on local filesystem", + # NOTE: if you add a new marker here for a backend that requires credentials, + # be sure to exclude it from the test command in .github/workflows/ci.yml + # in the "test-fork" job, to avoid failing tests where GitHub Actions + # secrets aren't available. "fs_s3: mark test to only run on AWS S3 bucket filesystem", "fs_gcs: mark test to only run on Google Cloud Storage bucket filesystem", "fs_abfs: mark test to only run on Azure Datalake filesystem", From f91593d493169aa12d433649fe8c1901a6f20e79 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Fri, 13 Mar 2026 10:19:01 -0400 Subject: [PATCH 2/3] Trim whitespace and update all actions/checkout to v6 --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/code-checks.yml | 4 ++-- .github/workflows/cross-compat.yml | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60c52a5..e8cb2c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: # ignore doctests pytest_opts: "-k pins/tests" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: "3.10" @@ -112,7 +112,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.pull_request.head.repo.fork }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: "3.10" @@ -131,7 +131,7 @@ jobs: name: "Build Docs" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: "3.10" @@ -234,7 +234,7 @@ jobs: if: github.event_name == 'release' needs: [build-docs, tests] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index a6cd6b9..664b0ca 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -13,7 +13,7 @@ jobs: name: "Run pre-commit" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 - uses: pre-commit/action@v3.0.1 @@ -21,7 +21,7 @@ jobs: name: "Run Pyright" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v4 with: python-version: 3.13 # Use the maximum version supported by python-pins diff --git a/.github/workflows/cross-compat.yml b/.github/workflows/cross-compat.yml index 3955b82..8884caa 100644 --- a/.github/workflows/cross-compat.yml +++ b/.github/workflows/cross-compat.yml @@ -22,7 +22,7 @@ jobs: name: "Check cross lib compatibility" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install libcurl on Linux run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev diff --git a/pyproject.toml b/pyproject.toml index bfa260d..14e62a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,9 +87,9 @@ universal = 1 [tool.pytest.ini_options] markers = [ "fs_file: mark test to only run on local filesystem", - # NOTE: if you add a new marker here for a backend that requires credentials, + # NOTE: if you add a new marker here for a backend that requires credentials, # be sure to exclude it from the test command in .github/workflows/ci.yml - # in the "test-fork" job, to avoid failing tests where GitHub Actions + # in the "test-fork" job, to avoid failing tests where GitHub Actions # secrets aren't available. "fs_s3: mark test to only run on AWS S3 bucket filesystem", "fs_gcs: mark test to only run on Google Cloud Storage bucket filesystem", From d421b548e033e8fd4a728fd300a02ef97ff86bd3 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Fri, 13 Mar 2026 10:23:10 -0400 Subject: [PATCH 3/3] Use native pipe in R integration tests --- script/ci-compat-check/dump_r_pins.R | 4 ++-- script/ci-compat-check/validate_py_to_r.R | 10 +++++----- script/stage_r_pins.R | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/script/ci-compat-check/dump_r_pins.R b/script/ci-compat-check/dump_r_pins.R index 7deff31..d85ed06 100644 --- a/script/ci-compat-check/dump_r_pins.R +++ b/script/ci-compat-check/dump_r_pins.R @@ -1,5 +1,5 @@ library(pins) -args <- commandArgs(trailingOnly=TRUE) +args <- commandArgs(trailingOnly = TRUE) board <- board_folder(args[1]) -board %>% pin_write(mtcars, "mtcars", type="csv") +board |> pin_write(mtcars, "mtcars", type = "csv") diff --git a/script/ci-compat-check/validate_py_to_r.R b/script/ci-compat-check/validate_py_to_r.R index 1106796..ff5b14b 100644 --- a/script/ci-compat-check/validate_py_to_r.R +++ b/script/ci-compat-check/validate_py_to_r.R @@ -1,6 +1,6 @@ library(pins) -args <- commandArgs(trailingOnly=TRUE) +args <- commandArgs(trailingOnly = TRUE) # create board ---- @@ -13,13 +13,13 @@ board_r <- board_folder(args[2]) cat("Checking mtcars pin\n") -res_mtcars <- board_py %>% pin_read("mtcars") -stopifnot(all.equal(res_mtcars, datasets::mtcars, check.attributes=FALSE)) +res_mtcars <- board_py |> pin_read("mtcars") +stopifnot(all.equal(res_mtcars, datasets::mtcars, check.attributes = FALSE)) -meta_mtcars_py <- board_py %>% pin_meta("mtcars") +meta_mtcars_py <- board_py |> pin_meta("mtcars") cat("\nPython meta:\n\n") print(meta_mtcars_py) -meta_mtcars_r <- board_r %>% pin_meta("mtcars") +meta_mtcars_r <- board_r |> pin_meta("mtcars") cat("\nR meta:\n\n") print(meta_mtcars_r) diff --git a/script/stage_r_pins.R b/script/stage_r_pins.R index 6391d52..9be4f9c 100644 --- a/script/stage_r_pins.R +++ b/script/stage_r_pins.R @@ -3,22 +3,22 @@ library(pins) df <- data.frame(x = 1:2, y = c("a", "b")) df_v2 <- data.frame(x = 1:2, y = c("a", "b"), z = 3:4) -#board <- board_s3("ci-pins", prefix = "r-pins-test") -board <- board_folder("pins/tests/pins-compat", versioned=TRUE) +# board <- board_s3("ci-pins", prefix = "r-pins-test") +board <- board_folder("pins/tests/pins-compat", versioned = TRUE) -all_pins <- board %>% pin_list() -board %>% pin_delete(all_pins) +all_pins <- board |> pin_list() +board |> pin_delete(all_pins) # write two versions of df as CSV ---- -board %>% pin_write(df, "df_csv", type="csv") +board |> pin_write(df, "df_csv", type = "csv") Sys.sleep(2) -board %>% pin_write(df_v2, "df_csv", type="csv") +board |> pin_write(df_v2, "df_csv", type = "csv") # write two versions of df as arrow ---- -board %>% pin_write(df, "df_arrow", type="arrow") +board |> pin_write(df, "df_arrow", type = "arrow") # write two versions of df as RDS ---- -board %>% pin_write(df, "df_rds", type="rds") +board |> pin_write(df, "df_rds", type = "rds") # write unversioned pin as CSV -board %>% pin_write(df, "df_unversioned", versioned=FALSE) +board |> pin_write(df, "df_unversioned", versioned = FALSE)