pecan icon indicating copy to clipboard operation
pecan copied to clipboard

Don't use `testthat` inside of functions

Open Aariq opened this issue 2 years ago • 2 comments

Bug Description

The testthat package is made for unit testing, not use inside of functions. testhat functions appear in at least a couple of places:

  • check_ed_metheader()
  • check_ed_metfile()

These should be replaced with calls to stopifnot() or something from the assert or assertthat packages

Aariq avatar Jul 25 '22 22:07 Aariq

Other places:

  • PEcAn.atmosphere::check_met_input_file()
  • PEcAn.atmosphere::check_unit()

Aariq avatar Aug 22 '22 21:08 Aariq

Partially fixed by #3016

Aariq avatar Aug 25 '22 21:08 Aariq

Hi @Aariq , can I please work on this issue?

Sarthakaga15 avatar Jan 18 '23 15:01 Sarthakaga15

Hi @Aariq , can I please work on this issue?

Just be sure to look at #3067 so you're not duplicating efforts. I think most of the stragglers are being handled in that PR.

Aariq avatar Jan 19 '23 00:01 Aariq

@Sarthakaga15 there's one more instance that you can work on, in ./models/ed/R/write_ed_veg.R. if you need any further help on this, let me know.

moki1202 avatar Jan 19 '23 16:01 moki1202