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

[Bug]: Quality Control tab fails in RNA-seq app when testthat package is not installed #179

Open
3 tasks done
vedhav opened this issue Aug 12, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@vedhav
Copy link
Contributor

vedhav commented Aug 12, 2024

What happened?

Both the stable and dev deployments of RNA-seq app show an error when testthat package is not available.

Screenshot 2024-08-12 at 7 29 48 PM Screenshot 2024-08-12 at 7 29 59 PM

It originates from the expect_proportion call from the hermes package

Before running the reprex please make sure that testthat is not installed.

library(checkmate)

check_proportion <- function(x, null.ok = FALSE) {
  ok <- test_number(x, lower = 0, upper = 1)
  if (!ok) {
    return("Must be a 'proportion': number between 0 and 1")
  }
  return(TRUE)
}

expect_proportion <- makeExpectationFunction(check_proportion)
expect_proportion(0.25)
#> Loading required namespace: testthat
#> Error in makeExpectation(x, res, info, label): Package 'testthat' is required for checkmate's 'expect_*' extensions with backend 'testthat'

Created on 2024-08-12 with reprex v2.1.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@vedhav vedhav added the bug Something isn't working label Aug 12, 2024
@averissimo
Copy link
Contributor

averissimo commented Aug 13, 2024

It's strange that hermes has an expect_* call in the app as that should only be done during tests.

If that's the case, then controlo_quality function body should use assertions and not expectations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants