Skip to content

Commit c992b9d

Browse files
committed
fix file path issue in add_to_gitignore
1 parent fc5ac90 commit c992b9d

File tree

7 files changed

+14
-988
lines changed

7 files changed

+14
-988
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.Rhistory
33
.RData
44
.Ruserdata
5+
*.gz

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: sketchy
22
Type: Package
33
Title: Create Custom Research Compendiums
4-
Version: 1.0.4
4+
Version: 1.0.5
55
Maintainer: Marcelo Araya-Salas <marcelo.araya@ucr.ac.cr>
66
Description: Provides functions to create and manage research compendiums for data analysis. Research compendiums are a standard and intuitive folder structure for organizing the digital materials of a research project, which can significantly improve reproducibility. The package offers several compendium structure options that fit different research project as well as the ability of duplicating the folder structure of existing projects or implementing custom structures. It also simplifies the use of version control.
77
License: GPL (>= 2)

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
sketchy 1.0.5
2+
=========================
3+
4+
### BUG FIXES
5+
6+
* Problem with directory path in Windows OS in `add_to_gitignore()`
7+
18
sketchy 1.0.4
29
=========================
310

R/add_to_gitignore.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232

3333
add_to_gitignore <- function(add.to.gitignore = FALSE, cutoff = NULL, extension = NULL, path = "."){
3434

35+
# ensure the path is in the correct format for your system
36+
path <- normalizePath(path)
37+
3538
if (is.null(cutoff) & is.null(extension))
3639
.stop("'cutoff' and/or 'extension' must be supplied")
3740

@@ -60,7 +63,7 @@ add_to_gitignore <- function(add.to.gitignore = FALSE, cutoff = NULL, extension
6063
files_found <- file_size_df$file.path[file_size_df$file_size_Mb > cutoff]
6164

6265
# remove project directory
63-
files_found <- gsub(path, "", files_found)
66+
files_found <- basename(files_found)
6467

6568
# remove ./
6669
files_found <- gsub("^./", "", files_found)

examples/analysis_template_quarto.html

Lines changed: 0 additions & 985 deletions
This file was deleted.

sketchy_1.0.4.tar.gz

-38.9 KB
Binary file not shown.

testing/testing-checking sketchy function nov-2020.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ rm(list = setdiff(ls(), c(lsf.str(), "FUN")))
343343
# rm(i)
344344
345345
#tests
346-
repo_name <- "repoQ"
346+
repo_name <- "repoQX"
347347
348348
data("compendiums")
349349
load("~/Dropbox/R_package_testing/sketchy/R/sysdata.rda")

0 commit comments

Comments
 (0)