Closed richelbilderbeek closed 4 years ago
I have fixed most of @lintr-bot comments (see the short list of comments at https://github.com/thijsjanzen/nLTT/commit/e92e53a40f16c0cc4c3344820701e2a08a6da756), except some cyclomatic complexity issues that I do not have the time for, and that I also don't think are relevant right now - furthermore, the ABC and MCMC code exists mainly as a repository for the code used in the original nLTT paper. Fixing the cyclomatic complexity for these functions would force a re-write, and break continuity: the new less cyclomatic code would no longer resemble the code used for the paper.
Perhaps we can # nolint these functions?
Well done!
I see your point about the ABC functions.
Using # nolint
is a slippery slope, so if these functions are not part of the nLTT functionality, I would prefer to move them, for example either to scripts/paper.R
or a repo like thijsjanzen/nltt_paper
.
Well, in the end, you are the owner here, feel free to ignore my opinion. :+1:
Well done!
I see your point about the ABC functions.
Using
# nolint
is a slippery slope, so if these functions are not part of the nLTT functionality, I would prefer to move them, for example either toscripts/paper.R
or a repo likethijsjanzen/nltt_paper
.Well, in the end, you are the owner here, feel free to ignore my opinion. 👍
I see your point, and I think nolinting the entire file is not really desirable.
On the other hand, moving it to scripts also seems undesirable, because this causes exclusion from the PDF manual, and breaks all tests of this code. Similarly, moving to another repo also makes it harder for users to find this code, and that should be avoided.
For now, it seems we'll have to live with these two mentions of @lintr-bot.
Nah, I know a trick to exclude linting from files... just you wait for the magic to happen :rainbow:
Oops, committed on master :pray:
Works, only four messages left:
R/get_average_nltt_matrix.R:14:1: style: functions should have cyclomatic complexity of less than 15, this has 16.
get_average_nltt_matrix <- function(
^
R/nltt_diff_exact_extinct.R:47:1: style: functions should have cyclomatic complexity of less than 15, this has 23.
nltt_diff_exact_extinct <- function(
^
R/nltts_plot.R:19:1: style: functions should have cyclomatic complexity of less than 15, this has 17.
nltts_plot <- function(
^
R/stretch_nltt_matrix.R:22:1: style: functions should have cyclomatic complexity of less than 15, this has 16.
stretch_nltt_matrix <- function(
I suggest to let the author of each function simplify it. AFAICS, two are mine and two are of the DAISIE team.
After fixing this, @thijsjanzen, can we put an enforced lint on the package (as done, for example, here)?
I suggest to let the author of each function simplify it. AFAICS, two are mine and two are of the DAISIE team.
After fixing this, @thijsjanzen, can we put an enforced lint on the package (as done, for example, here)?
Agreed! Juicy!
I will fix my functions this Saturday, after that I'll contact the other authors: no need to rush.
I will fix my functions this Saturday, after that I'll contact the other authors: no need to rush.
Then, why not fix it on Monday? It's weekend after all! No rush at all needed here, these issues are very, very minor.
Hi both! Sounds like a great plan, I'll work on it 👍
OK, here is the distribution of labor:
get_average_nltt_matrix
nltt_diff_exact_extinct
nltts_plot
stretch_nltt_matrix
Done! Also a clean lint is enforced now :+1:
Hi @thijsjanzen,
as can be seen in Pull Request #51, our friend @lintr-bot still has some suggestions to improve nLTT even more. Me and @Neves-P both try to get a clean lint, but we may not see everything anymore die to many suggestions in the ABC part of the code.
Would be great if you'd clean up your part of the code!
No rush, but it would make people and bots happy :+1:
Cheers, Richel