Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use testthat inside of functions #2987

Closed
Aariq opened this issue Jul 25, 2022 · 5 comments · Fixed by #3094
Closed

Don't use testthat inside of functions #2987

Aariq opened this issue Jul 25, 2022 · 5 comments · Fixed by #3094

Comments

@Aariq
Copy link
Collaborator

Aariq commented Jul 25, 2022

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
Copy link
Collaborator Author

Aariq commented Aug 22, 2022

Other places:

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

@Aariq
Copy link
Collaborator Author

Aariq commented Aug 25, 2022

Partially fixed by #3016

@Sarthakaga15
Copy link
Contributor

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

@Aariq
Copy link
Collaborator Author

Aariq commented Jan 19, 2023

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.

@moki1202
Copy link
Collaborator

@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.

github-merge-queue bot pushed a commit that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants