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

Upgrade testthat to 3rd edition #65

Open
3 tasks
nikolas-burkoff opened this issue Jul 29, 2022 · 4 comments
Open
3 tasks

Upgrade testthat to 3rd edition #65

nikolas-burkoff opened this issue Jul 29, 2022 · 4 comments
Labels

Comments

@nikolas-burkoff
Copy link

nikolas-burkoff commented Jul 29, 2022

From https://github.com/insightsengineering/coredev-tasks/issues/154

To-Do:

  • Add >= 3.0.0 to testthat version in DESC file
  • Add to DESC file:
Config/testthat/edition: 3
Config/testthat/parallel: true
  • Fix all errors and warnings in tests -> for example using the above tern has 37 failures and 1118 passes (with 150 warnings)
  • Update testthat/testthat.R at the moment locally it runs ParallelReporter (using default_reporter() which is also parallel seems nicer to me) and on CI it uses JunitReporter which is not parallelizable - do we want it parallel there?

Repos:

@donyunardi
Copy link

Update: teal, teal.slice, and teal.transform already have testthat (>= 3.1.5)

@nikolas-burkoff
Copy link
Author

@donyunardi note there is a difference between using a testthat version and a testthat edition https://testthat.r-lib.org/articles/third-edition.html

@donyunardi
Copy link

Thanks Nik.
I think we should try from the least risky teal package first and use that as learning experience before we moves to the bigger one.

@pawelru pawelru removed the sme label Aug 8, 2023
@averissimo
Copy link

Example of steps needed for teal.data

  • Add Config/testthat/edition: 3 to DESCRIPTION
  • Migrate 15 instances of expect_is as the function is deprecated (in favor of checkmate::expect_r6 or testthat::expect_type)
    • Should be 0 instances once TealData is removed
  • Deprecation warnings are detected and should be recognized in tests
    • Should be 0 instances once TealData is removed

Some of the immediate benefits of this transition (taken from duplicated issue)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants