pbs-assess / pacea

An R package to house Pacific Region ecosystem data to help facilitate an ecosystem approach to fisheries.
Other
14 stars 0 forks source link

Extra test for month_match() would take coverage to 100% for this file #43

Closed andrew-edwards closed 11 months ago

andrew-edwards commented 11 months ago

https://app.codecov.io/gh/pbs-assess/pacea/blob/main/R%2Fplot-pacea-st.R

Line 182 has is the only one not covered by a test. I can't quite figure out what a test should be (or if the line is even needed?). Presumably (in general) a line is not needed if you can't come up with a test that uses it?!

I think you said the other missing coverage is generally unavoidable, though roms_average() has none, so hopefully you can add something in?

andrew-edwards commented 11 months ago

Thanks. I also mentioned roms_average() which would be good if possible.

travistai2 commented 11 months ago

Hmm, I didn't write that function. I wrote the spatial mean function in the 'area-mean.R' file, with the function area_mean(). I believe you wrote the spatial_average() function in the file roms_average.R.

andrew-edwards commented 11 months ago

Hmm... yes, sorry. Looks like I created it (copied from your earlier vignette maybe?) then renamed, and that's it in the git history. I think it's superceded by your new function anyway, yes? So we can delete it. I searched the whole repo and it's not mentioned anywhere else.