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 failing weekly build for OSPSuite-R 3.6 #1174

Closed
rwmcintosh opened this issue Jan 6, 2023 · 5 comments
Closed

Fix failing weekly build for OSPSuite-R 3.6 #1174

rwmcintosh opened this issue Jan 6, 2023 · 5 comments

Comments

@rwmcintosh
Copy link
Member

The weekly build has been failing for some time. The error message is below:

   --- re-building 'data-combined.Rmd' using rmarkdown
   Quitting from lines 121-134 (data-combined.Rmd)
   Error: processing vignette 'data-combined.Rmd' failed with diagnostics:
   Insufficient values in manual scale. 2 needed but only 1 provided.
   --- failed re-building 'data-combined.Rmd'

Working on a separate issue where the 4.1 version was failing I added this line to the appveyor.yml file:

R_CHECK_ARGS: --no-multiarch --no-manual --as-cran

That probably also needs to be added in the file appveyor-3.6.yml

@rwmcintosh
Copy link
Member Author

@Yuri05 @PavelBal @Sergei-Vavilov-esqLABS FYI.

I assume this package is needed for v11 update 1

@rwmcintosh rwmcintosh added this to the Version 11 Update 1 milestone Jan 6, 2023
@PavelBal
Copy link
Member

PavelBal commented Jan 6, 2023

Cannot reproduce with R4, and don't have R3. @Yuri05 could you debug?

@Yuri05
Copy link
Member

Yuri05 commented Jan 6, 2023

I assume this package is needed for v11 update 1

3.6 build is used for the tests only. The error comes from plotIndividualTimeProfile(dataCombined = myDataCombined) in data-combined.Rmd vignette:

grafik

The line 133 is the only problematic one; all other calls to plotIndividualTimeProfile work (also in the plotting vignette).

I hope we can drop the 3.6 support in few months. For now we could:

  • just disable the vignette building in the 3.6 build
  • OR: put try catch around the problematic line (can be removed as soon as 3.6 should not be officially supported anymore)
  • OR; put version check (>=4) around this line
  • OR: try to fix

@Yuri05
Copy link
Member

Yuri05 commented Jan 6, 2023

@PavelBal

in R3, the following code

library(ospsuite)
simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)
simResults <- runSimulation(sim)
outputPath <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
obsData <- lapply(c("ObsDataAciclovir_1.pkml", "ObsDataAciclovir_2.pkml", "ObsDataAciclovir_3.pkml"), function(x) loadDataSetFromPKML(system.file("extdata", x, package = "ospsuite")))
names(obsData) <- lapply(obsData, function(x) x$name)
myDataCombined <- DataCombined$new()
myDataCombined$addSimulationResults(simulationResults = simResults, quantitiesOrPaths = outputPath, names = "Aciclovir Plasma" )
myDataCombined$addDataSets(obsData$`Vergin 1995.Iv`)
plotIndividualTimeProfile(dataCombined = myDataCombined)

produces the error

Error in `f()`:
! Insufficient values in manual scale. 2 needed but only 1 provided.
Run `rlang::last_error()` to see where the error occurred.
     x
  1. +-base (local) `<fn>`(x)
  2. \-ggplot2:::print.ggplot(x)
  3.   +-ggplot2::ggplot_build(x)
  4.   \-ggplot2:::ggplot_build.ggplot(x)
  5.     \-base::lapply(data, scales_map_df, scales = npscales)
  6.       \-ggplot2 (local) FUN(X[[i]], ...)
  7.         +-base::unlist(...)
  8.         \-base::lapply(scales$scales, function(scale) scale$map_df(df = df))
  9.           \-ggplot2 (local) FUN(X[[i]], ...)
 10.             \-scale$map_df(df = df)
 11.               \-ggplot2 (local) f(..., self = self)
 12.                 \-base::lapply(aesthetics, function(j) self$map(df[[j]]))
 13.                   \-ggplot2 (local) FUN(X[[i]], ...)
 14.                     \-self$map(df[[j]])
 15.                       \-ggplot2 (local) f(..., self = self)
 16.                         \-self$palette(n)
 17.                           \-ggplot2 (local) f(...)
 18.                             \-rlang::abort(glue("Insufficient values in manual scale. {n} needed but only {length(values)} provided."))
 19.                               \-rlang:::signal_abort(cnd, .file)
 20.                                 \-base::stop(fallback)

@PavelBal
Copy link
Member

PavelBal commented Jan 9, 2023

@Yuri05 this is an issue with TLF (something new has been introduced?). Trying to re-build the vignettes of the TLF package with R3.6 results in:

--- re-building 'plot-time-profile.Rmd' using rmarkdown
Quitting from lines 432-460 (plot-time-profile.Rmd) 
Error: processing vignette 'plot-time-profile.Rmd' failed with diagnostics:
Insufficient values in manual scale. 2 needed but only 1 provided.
--- failed re-building 'plot-time-profile.Rmd'

I am closing this issue and opening another in TLF repo.

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

No branches or pull requests

3 participants