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

fix scheduled tests #201

Closed
wants to merge 21 commits into from
Closed

fix scheduled tests #201

wants to merge 21 commits into from

Conversation

shajoezhu
Copy link
Contributor

Pull Request

Fixes #nnn

Copy link
Contributor

github-actions bot commented Jan 21, 2025

Unit Tests Summary

  1 files   11 suites   17s ⏱️
110 tests  81 ✅ 29 💤 0 ❌
219 runs  178 ✅ 41 💤 0 ❌

Results for commit 82c4311.

♻️ This comment has been updated with latest results.

@shajoezhu shajoezhu added the sme label Jan 21, 2025
@shajoezhu shajoezhu changed the title update fix scheduled tests Jan 22, 2025
@@ -3,6 +3,7 @@ library(dplyr)
# h_get_diagnostics ----
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the test skip check is added to every test in the file you could add it to the top of the file instead so it only needs to check once (this also applies to the other test files)!

Suggested change
# h_get_diagnostics ----
skip_if_not_installed("TMB")
# h_get_diagnostics ----

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am testing this, i think this tmb package should be imported. rather than suggests actually. if true, I will remove all these lines

@danielinteractive
Copy link
Collaborator

Do you really need the TMB conditions? mmrm needs TMB of course, but that should be resolved automatically through package dependencies, or not?

@shajoezhu
Copy link
Contributor Author

import dont work either, after reading this more carefully

Error: processing vignette 'introduction.Rmd' failed with diagnostics:
.onLoad failed in loadNamespace() for 'TMB', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/github/home/R/x86_64-pc-linux-gnu-library/4.5/TMB/libs/TMB.so':
  libomp.so.5: cannot open shared object file: No such file or directory

it's issue with omp, I will flag this with rhub about there image.

@shajoezhu
Copy link
Contributor Author

ii also raised an issue at r-hub/containers#85

This reverts commit 2a9b55f.
@pawelru
Copy link
Contributor

pawelru commented Jan 22, 2025

Hi. I can see that this is passing without any adjustments to the workflow thus I reverted my changes. This is green now: https://github.com/insightsengineering/tern.mmrm/actions/runs/12907163492/job/35990040546

@@ -98,7 +98,7 @@ h_get_diagnostics <- function(fit) {
#'
#' @export
#'
#' @examples
#' @examplesIf requireNamespace("TMB")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the standard applied in other packages is require(). Both are fully functional and this is just for consistency

Suggested change
#' @examplesIf requireNamespace("TMB")
#' @examplesIf require("TMB", quietly = TRUE)

@@ -3,6 +3,7 @@ library(dplyr)
# h_get_diagnostics ----

test_that("h_get_diagnostics works as expected", {
testthat::skip_if_not(requireNamespace("TMB"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a dedicated function for this - also easier to follow

Suggested change
testthat::skip_if_not(requireNamespace("TMB"))
testthat::skip_if_not_installed("TMB")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TMB seem to be installed, but loading was off.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in such case I would do skip-if-not-installed followed by explicit library to signal that the loading is what we are looking for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmb is in suggests though, it should implicitly included by mmrm package, and not by us. again, I think this is an image issue. i don't think this pr is good, and it is not solving the real issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmb is in suggests though, it should implicitly included by mmrm package

Then all is needed is just skip if not installed. Following nosuggest logic, the package should remain fully functional without suggested pacakge

and not by us

Partially true - see above. I would say mmrm should specify the version - not here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmrm has specified it's version. we can ignore that line

@shajoezhu
Copy link
Contributor Author

Hi. I can see that this is passing without any adjustments to the workflow thus I reverted my changes. This is green now: https://github.com/insightsengineering/tern.mmrm/actions/runs/12907163492/job/35990040546

I m rerunning this on main, and see if it works

Signed-off-by: Joe Zhu <[email protected]>
@pawelru
Copy link
Contributor

pawelru commented Feb 14, 2025

Hey @shajoezhu - I just ran the rhub tests on that branch and it is all passing: https://github.com/insightsengineering/tern.mmrm/actions/runs/13334754421

@shajoezhu
Copy link
Contributor Author

Hey @shajoezhu - I just ran the rhub tests on that branch and it is all passing: https://github.com/insightsengineering/tern.mmrm/actions/runs/13334754421

hi @pawelru , yes, it is. let's have a catch-up next week. I think the branch's fix is trying to hide the problem rather than solving a real issue, I might be over thinking, but lets have a chat before merging this

@shajoezhu
Copy link
Contributor Author

good. this PR is not needed. as main is passing. it is not our issue!

@shajoezhu shajoezhu closed this Feb 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2025
@danielinteractive
Copy link
Collaborator

yay! one of the many CRAN cases where waiting is best

@shajoezhu
Copy link
Contributor Author

I agree! @danielinteractive :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants