Repository navigation
Rename function: matlab.palette() → palette_matlab() - #318
Conversation
GegznaV
left a comment
There was a problem hiding this comment.
- If user-visible changes are introduced, they must be properly described in the
NEWS.mdfile. Did you readCONTRIBUTION.md? - Please avoid committing files that are not related to the issue. I mean
hyperSpec_0.100.0.zipthis time. Please, remove this file and do not include it in the future. - Some tests do not pass on the old release of R (v.3.6). I'm not sure what is the reason.
- There are 3 renamed functions, so it would have been better if there were 3 separate commits (you will not fix this now, but adhere to this guideline in the future).
- The short commit messages should be self-explanatory, Not, e.g., "Resolve #299", but e.g., "Rename function: matlab.palette() → palette_matlab()" (you will not fix it now, but keep that in mind for the future).
This reverts commit a5a3494.
|
I think, most of the parts in this PR are OK. |
bryanhanson
left a comment
There was a problem hiding this comment.
Regarding the unit tests in palette_matlab.R my own opinion is that testing this sort of thing is unnecessary. Either the palettes exist, or they don't. The tests in this PR verify that one entry in the palette is the expected one, but I can't imagine a situation where this would change, so I'm not really sure what we are trying to defend against. If it were up to me I'd simply remove the unit tests for this function.
GegznaV
left a comment
There was a problem hiding this comment.
There is some general feedback on unit tests.
|
|
||
| hySpc.testthat::test(palette_alois) <- function() { | ||
| context("palette_alois") | ||
| test_that("test palette alois", { |
There was a problem hiding this comment.
The whole line should be as a fluent and logical sentence.
|
|
||
| hySpc.testthat::test(palette_matlab) <- function() { | ||
| context("palette_matlab") | ||
| test_that("test palette matlab", { |
There was a problem hiding this comment.
The whole line should be as a fluent and logical sentence
Some palettes depand on other functions of "R". And, e.g., in version 4.0 "R" changed some default colors. |
GegznaV
left a comment
There was a problem hiding this comment.
Please, add a new line at the end of files, where needed.
| alois <- palette_alois() | ||
| expect_equal(alois[1], "#000000") | ||
| expect_equal(alois[2], "#00000C")}) | ||
| } No newline at end of file |

In the development version of hyperSpec, I found 3 functions/objects that define color palettes.
Based on the suggestions, I rename all palette objects (prefix palette_)
Resolve #299