Open laufran opened 4 months ago
The inconsistency with some arguments having underscores between words, and others lacking it doesn't make it easy
I agree with that, but I think at this point it would cause more problems to change argument names than to keep them as they are
I haven't received any errors indicating that I've supplied an unrecognized keyword argument
Any R-function with the ...
(ellipsis) argument has that problem. That argument is used to pass arbitrary keyword arguments on to other functions, which can be very useful, but the downside is that you won't be notified about misspelled arguments. I just saw that there is a package called ellipsis
which tries to address that problem. I'll look into it, maybe I'll use it to fix the problem in the next release!
Simply echoing the argument values actually used would be helpful. Otherwise the user has no way to double-check what values were used. Printing extra log information should not break existing code, right?
I added checks to find_graphs()
and other functions using ...
. They should now throw errors if unused arguments are passed to them!
Hi there,
While running
find_graphs
, I've had some minor typos while specifying keyword arguments (e.g. givingnum_admix
instead ofnumadmix
,num_start
instead ofnumstart
. The inconsistency with some arguments having underscores between words, and others lacking it doesn't make it easy). I haven't received any errors indicating that I've supplied an unrecognized keyword argument, nor do I receive some kind of log, or confirmation of what argument values I'm running under to the REPL. It's only due to my double checking that I've realized my typos. This seems like it could be a large problem, especially if there's a typo in a critical argument likenumadmix
, that there's no error or warning that the user is supplying an unknown keyword argument.For reference, I'm running
admixtools
2.0.0 commit 669f4ff and I'm running a command like so:in this case, where it should be
numstart
, notnum_start
.