Skip to content

Commit

Permalink
tweak the nested module name extraction: use extractModName
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliot McIntire committed Jun 5, 2024
1 parent 222aad7 commit f17d2ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/setupProject.R
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ setupProject <- function(name, paths, modules, packages,
modulePackages <- setupModules(name, paths, modulesSUB, inProject = inProject, useGit = useGit,
gitUserName = gitUserName, updateRprofile = updateRprofile,
overwrite = overwrite, envir = envirCur, verbose = verbose)
modules <- Require::extractPkgName(basename(names(modulePackages)))
modules <- extractModName(names(modulePackages))
names(modules) <- names(modulePackages)

if (missing(packages))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-setupProject.R
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ test_that("test setupProject - nested modulePath scfm B_bDP", {
})
)

expect_false(any(grepl("@", out$modules)))
expect_true(all(names(out) %in% c("modules", "paths", "params", "times")))
expect_true(all(fs::path_has_parent(out$paths$modulePath, getwd())))

Expand Down

0 comments on commit f17d2ef

Please sign in to comment.