Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -123,15 +123,15 @@ 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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a little Claude-research on this and didn't see a better way obviously, not one that wouldn't just be moving this bookkeeping somewhere else. So I opted for adding more explicit reminder comments.

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:
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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ 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

pyright:
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions script/ci-compat-check/dump_r_pins.R
Original file line number Diff line number Diff line change
@@ -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")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary because of rstudio/pins-r@a6de973, the latest version of pins doesn't include magrittr

board |> pin_write(mtcars, "mtcars", type = "csv")
10 changes: 5 additions & 5 deletions script/ci-compat-check/validate_py_to_r.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library(pins)

args <- commandArgs(trailingOnly=TRUE)
args <- commandArgs(trailingOnly = TRUE)


# create board ----
Expand All @@ -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)
18 changes: 9 additions & 9 deletions script/stage_r_pins.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading