ocean-tracking-network / glatos

9 stars 4 forks source link

`convert_otn_to_att` test expects "NA" to be a factor level. #240

Closed mhpob closed 2 months ago

mhpob commented 3 months ago

A convert_otn_to_att test is failing after a refactor of the convert_sex helper function. I personally think the new output is correct and the blue_shark_att object is wrong, but wanted to check in.

See tests of #238 for further info, but in short: blue_shark_att has a factor column with levels of "FEMALE" and "NA" and the test is expecting this. However, NA is not considered a level after refactoring (as is usual in R), resulting in a factor column with one level ("FEMALE") and some correctly-missing values.

Is it the desire to have a missing value be considered a factor level? If so, I'll mess with the refactoring. If not, then blue_shark_att will have to be rebuilt using the new function. I can do this and fold it into the PR, but didn't want to plow ahead without permission.

jdpye commented 3 months ago

Maybe the tests could be re-designed a bit to account for and expect the missing values where sex was not determined. Updating the object to reflect what should be makes good sense to me.

jdpye commented 3 months ago

Ah, the object isn't bad, just the processing was producing something unexpected. I understand now.

mhpob commented 3 months ago

Closed by #238.