insightsengineering / teal.reporter

Create and preview reports with Shiny modules
https://insightsengineering.github.io/teal.reporter/
Other
8 stars 8 forks source link

Suppresses the warning message because of partial arg match #233

Closed vedhav closed 7 months ago

vedhav commented 7 months ago

Suppresses the warning message because of partial arg match in the checkmate::assert_names

Example app to test:

options(warnPartialMatchArgs = TRUE)
data <- teal_data()
data <- within(data, {
  library(nestcolor)
  ADSL <- teal.modules.general::rADSL
})
datanames <- c("ADSL")
datanames(data) <- datanames
join_keys(data) <- default_cdisc_join_keys[datanames]
app <- teal::init(
  data = data,
  modules = teal::modules(
    teal.modules.general::tm_a_pca(
      "PCA",
      dat = teal.transform::data_extract_spec(
        dataname = "ADSL",
        select = teal.transform::select_spec(
          choices = teal.transform::variable_choices(
            data = data[["ADSL"]], c("BMRKR1", "AGE", "EOSDY")
          ),
          selected = c("BMRKR1", "AGE"),
          multiple = TRUE
        ),
        filter = NULL
      ),
      ggplot2_args = teal.widgets::ggplot2_args(
        labs = list(subtitle = "Plot generated by PCA Module")
      )
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

# Warning in checkmate::assert_names(names(rmd_yaml_args), subset = c("author",  :
#   partial argument match of 'subset' to 'subset.of'
github-actions[bot] commented 7 months ago

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  -----------------------------------------------------------------------------------
R/AddCardModule.R       144       2  98.61%   162, 199
R/Archiver.R             25       0  100.00%
R/ContentBlock.R         18       2  88.89%   38-44
R/DownloadModule.R      207      49  76.33%   95-101, 143, 168-173, 182-186, 189-193, 201-205, 208-212, 219-223, 226-230, 267-271
R/FileBlock.R            13       0  100.00%
R/NewpageBlock.R          2       0  100.00%
R/PictureBlock.R         30       2  93.33%   15, 79
R/Previewer.R           295      56  81.02%   188, 202, 204-207, 210, 213-221, 330-374
R/RcodeBlock.R           15       0  100.00%
R/Renderer.R            113      37  67.26%   45-60, 121, 129, 138, 140-161
R/ReportCard.R           77       4  94.81%   180, 219, 224, 245
R/Reporter.R             94       1  98.94%   254
R/ResetModule.R          55       0  100.00%
R/SimpleReporter.R       30       0  100.00%
R/TableBlock.R            9       0  100.00%
R/TextBlock.R            13       0  100.00%
R/utils.R               171      80  53.22%   7, 38-97, 99, 102-109, 163, 175-177, 287-296
R/yaml_utils.R           81       2  97.53%   41, 239
R/zzz.R                  14      10  28.57%   2-13, 19
TOTAL                  1406     245  82.57%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 500a77e9b2350eb153b8c2a213249754e7360649

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 7 months ago

Unit Tests Summary

    1 files    18 suites   11s :stopwatch: 204 tests 204 :heavy_check_mark: 0 :zzz: 0 :x: 346 runs  346 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit 500a77e9.

github-actions[bot] commented 7 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Archiver 💚 $3.65$ $-1.10$ $0$ $0$ $0$ $0$

Results for commit cbae153736c131b08224b19c3eb675b6e3473245

♻️ This comment has been updated with latest results.

vedhav commented 7 months ago

Note that a similar warning message also happens in teal inside the checkmate::asswer_class() but it's addressed in 8cba826

Warning in checkmate::assert_class(datasets, class = "FilteredData") :
  partial argument match of 'class' to 'classes'
Warning in checkmate::assert_class(datasets, class = "FilteredData") :
  partial argument match of 'class' to 'classes'
kartikeyakirar commented 7 months ago

Nice job, Vedha! I didn't catch this. It becomes apparent when checking the settings with options(warnPartialMatchArgs = T).