From 8689fdb53fbf6cc1d61e667ee7f96d7dcdfb3459 Mon Sep 17 00:00:00 2001 From: Jordan Mark Barbone Date: Sat, 15 Jun 2024 11:21:42 -0400 Subject: [PATCH 1/3] fix parquet issue on windows --- R/write.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/R/write.R b/R/write.R index ea8b2e8a..94c5edba 100644 --- a/R/write.R +++ b/R/write.R @@ -394,10 +394,12 @@ mark_write_arrow <- function( feather = { read <- arrow::read_feather write <- arrow::write_feather + clean <- function() NULL }, parquet = { read <- arrow::read_parquet write <- arrow::write_parquet + clean <- base::gc } ) @@ -406,9 +408,14 @@ mark_write_arrow <- function( con <- file(temp, open = "wb", encoding = "UTF-8") on.exit({ co <- utils::capture.output(read(temp, as_data_frame = FALSE)) + # Something weird was happening after reading the parquet object on + # windows; fs::file_delete() was throwing an EPERM error but file.remove() + # wasn't. Adding an explicit gc() seems to do the trick... + clean() co <- grep("See $metadata", co, value = TRUE, invert = TRUE, fixed = TRUE) co <- co[nzchar(co)] writeLines(co) + safe_close(con) safe_fs_delete(temp) }) } From 7b9b4cc51d385f211708ac5361bb802be23c36f0 Mon Sep 17 00:00:00 2001 From: Jordan Mark Barbone Date: Sat, 15 Jun 2024 11:29:59 -0400 Subject: [PATCH 2/3] Create .gitattributes --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..99cda562 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text eol=lf + From 524a8c84ec21743e343f555f3a3cbdef3655a133 Mon Sep 17 00:00:00 2001 From: Jordan Mark Barbone Date: Sat, 15 Jun 2024 11:30:49 -0400 Subject: [PATCH 3/3] bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6c437934..e8ede596 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mark Type: Package Title: Miscellaneous, Analytic R Kernels -Version: 0.8.0.9001 +Version: 0.8.0.9002 Authors@R: person(given = "Jordan Mark", family = "Barbone",