Skip to content

Commit

Permalink
Dev (#57)
Browse files Browse the repository at this point in the history
* Hotfix: configs not being detected
* Bumped patch number
  • Loading branch information
Thomas-Caspar-Fischer committed Jul 31, 2023
1 parent ae54fd0 commit 26fe963
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: statR
Title: statR
Version: 2.3.1
Version: 2.3.2
Authors@R: as.person(c(
"Andrea Schnell <andrea.schnell@statistik.ji.zh.ch> [aut]",
"Michelle Donzallaz <michelle.donzallaz@statistik.ji.zh.ch> [aut]",
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# statR 2.3.2

## Bugfix
* Fixed a problem where user configurations were not being applied properly

# statR 2.3.1

## Bugfixes

* Fixed a problem with user configurations on Windows systems

# statR 2.3.0
Expand Down
9 changes: 6 additions & 3 deletions R/user_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ readUserConfig <- function(name = "default") {
# config_file <- paste0(config_path, name)

config_path <- system.file("extdata/config", package = "statR")
config_file <- paste0(c(config_path, "name"), collapse = "/")
config_file <- paste0(c(config_path, name), collapse = "/")


if (file.exists(config_file)) {
config <- yaml::read_yaml(config_file)
Expand Down Expand Up @@ -56,7 +57,8 @@ readUserConfig <- function(name = "default") {
writeUserConfig <- function(name, config_list) {
# config_path <- system.file("extdata/config/", package = "statR")
config_path <- system.file("extdata/config", package = "statR")
config_file <- paste0(c(config_path, "name"), collapse = "/")
config_file <- paste0(c(config_path, name), collapse = "/")


config_list[["statR_config_name"]] <- name
# yaml::write_yaml(config_list, paste0(config_path, name))
Expand All @@ -83,7 +85,8 @@ setActiveConfig <- function(name, persistent = FALSE) {
# config_path <- system.file("extdata/config/", package = "statR")
# config_file <- paste0(config_path, name)
config_path <- system.file("extdata/config", package = "statR")
config_file <- paste0(c(config_path, "name"), collapse = "/")
config_file <- paste0(c(config_path, name), collapse = "/")



if (getActiveConfigName() != name & file.exists(config_file)) {
Expand Down

0 comments on commit 26fe963

Please sign in to comment.