-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PG loop argument wrapper #36
PG loop argument wrapper #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just a few minor things.
tests/testthat/test_arguments.R
Outdated
@@ -26,11 +26,16 @@ test_that("Test for arguments names", { | |||
args <- names(cluster(w = matrix(1))) | |||
test_args <- c(test_args, args) | |||
|
|||
# Test | |||
# Test prox argumetns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "arguments"
R/moma_arguments.R
Outdated
@@ -275,3 +275,16 @@ cluster <- function(w = NULL, ADMM = FALSE, | |||
class(arglist) <- "moma_sparsity" | |||
return(arglist) | |||
} | |||
|
|||
moma_pg_setting <- function(EPS = 1e-10, MAX_ITER = 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a fan of putting the ...
as the first argument for functions like this and throwing an error if length(list(...)) != 0
- that forces users to specify all arguments by name instead of relying on position. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's genius! Added.
R/moma_arguments.R
Outdated
@@ -275,3 +275,16 @@ cluster <- function(w = NULL, ADMM = FALSE, | |||
class(arglist) <- "moma_sparsity" | |||
return(arglist) | |||
} | |||
|
|||
moma_pg_setting <- function(EPS = 1e-10, MAX_ITER = 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly settings
(plural) would be a better name.
c5ac406
to
d6c6f35
Compare
d6c6f35
to
3f81cf8
Compare
There's a lot of style churn in the test files. Is this formatting stuff not included in #33 or something else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think it was because Anyway current format in tests files is good. |
No description provided.