From 9c9b28bc3d6c9809b9376759639b8559c81c572d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 19 Aug 2025 12:07:58 +0100 Subject: [PATCH] chore: cleanup unnecessary lintr comments --- .lintr | 1 - design/design_signature_module.Rmd | 4 ++-- tests/testthat/test-adtteSpec.R | 4 ---- tests/testthat/test-assaySpec.R | 4 ---- tests/testthat/test-barplot.R | 4 ---- tests/testthat/test-boxplot.R | 4 ---- tests/testthat/test-experimentSpec.R | 4 ---- tests/testthat/test-forest.R | 4 ---- tests/testthat/test-geneSpec.R | 9 ++++----- tests/testthat/test-km.R | 4 ---- tests/testthat/test-pca.R | 9 ++++----- tests/testthat/test-quality.R | 4 ---- tests/testthat/test-sampleVarSpec.R | 4 ---- tests/testthat/test-scatterplot.R | 4 ---- tests/testthat/test-volcanoplot.R | 4 ---- 15 files changed, 10 insertions(+), 57 deletions(-) diff --git a/.lintr b/.lintr index 34473d27..3377b646 100644 --- a/.lintr +++ b/.lintr @@ -1,5 +1,4 @@ linters: linters_with_defaults( line_length_linter = line_length_linter(120), - cyclocomp_linter = NULL, object_usage_linter = NULL ) diff --git a/design/design_signature_module.Rmd b/design/design_signature_module.Rmd index c663d3e9..3689f6fa 100644 --- a/design/design_signature_module.Rmd +++ b/design/design_signature_module.Rmd @@ -16,11 +16,11 @@ library(checkmate) ## Objectives -We need a shiny module that captures the gene signature logic. We might also need additional functions and classes which capture reused functionality. +We need a shiny module that captures the gene signature logic. We might also need additional functions and classes which capture reused functionality. ## Hermes Interface -### Helpers +### Helpers ```{r} shorten_list <- function(x) { diff --git a/tests/testthat/test-adtteSpec.R b/tests/testthat/test-adtteSpec.R index 6ad128bb..5acc80f0 100644 --- a/tests/testthat/test-adtteSpec.R +++ b/tests/testthat/test-adtteSpec.R @@ -178,8 +178,6 @@ test_that("adtteSpecInput creates expected HTML", { expect_class(result, "shiny.tag") }) -# nolint start - test_that("adtteSpecServer module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -242,5 +240,3 @@ test_that("adtteSpecServer module works as expected in the test app", { app$click(ns_fp("ADTTE-filter-ADTTE_PARAMCD-remove")) app$stop() }) - -# nolint end diff --git a/tests/testthat/test-assaySpec.R b/tests/testthat/test-assaySpec.R index 382b5e7d..3ddcfd64 100644 --- a/tests/testthat/test-assaySpec.R +++ b/tests/testthat/test-assaySpec.R @@ -9,8 +9,6 @@ test_that("assaySpecInput creates expected HTML", { expect_class(result, "shiny.tag") }) -# nolint start - # assaySpecServer ---- test_that("assaySpecServer module works as expected in the test app", { skip_if_covr() @@ -54,5 +52,3 @@ test_that("assaySpecServer module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-barplot.R b/tests/testthat/test-barplot.R index 436eb420..88e2c317 100644 --- a/tests/testthat/test-barplot.R +++ b/tests/testthat/test-barplot.R @@ -19,8 +19,6 @@ test_that("ui_g_barplot creates expected HTML", { # tm_g_barplot ---- -# nolint start - test_that("barplot module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -97,5 +95,3 @@ test_that("barplot module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-boxplot.R b/tests/testthat/test-boxplot.R index 12fe891b..8f505de1 100644 --- a/tests/testthat/test-boxplot.R +++ b/tests/testthat/test-boxplot.R @@ -15,8 +15,6 @@ test_that("ui_g_boxplot creates expected HTML", { # tm_g_boxplot ---- -# nolint start - test_that("boxplot module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -64,5 +62,3 @@ test_that("boxplot module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-experimentSpec.R b/tests/testthat/test-experimentSpec.R index a1e35945..31a2a6ab 100644 --- a/tests/testthat/test-experimentSpec.R +++ b/tests/testthat/test-experimentSpec.R @@ -89,8 +89,6 @@ test_that("h_gene_data does not fail when object does not contain any genes", { expect_identical(result, expected) }) -# nolint start - test_that("experimentSpec module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -170,5 +168,3 @@ test_that("experimentSpec module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-forest.R b/tests/testthat/test-forest.R index 9a17519c..a914b863 100644 --- a/tests/testthat/test-forest.R +++ b/tests/testthat/test-forest.R @@ -19,8 +19,6 @@ test_that("ui_g_forest_tte creates expected HTML", { # tm_g_forest_tte ---- -# nolint start - test_that("forest_tte module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -68,5 +66,3 @@ test_that("forest_tte module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-geneSpec.R b/tests/testthat/test-geneSpec.R index c9bec629..18672e4b 100644 --- a/tests/testthat/test-geneSpec.R +++ b/tests/testthat/test-geneSpec.R @@ -32,8 +32,6 @@ test_that("h_parse_genes correctly returns empty data frame when no genes match" # geneSpecServer ---- -# nolint start - test_that("geneSpec module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -80,7 +78,10 @@ test_that("geneSpec module works as expected in the test app", { ns_fp <- active_module_filter_panel_ns(app) app$set_inputs(!!ns_fp("MAE-MAE-hd1-row_to_add") := "chromosome", allow_no_input_binding_ = TRUE) app$set_inputs(!!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection") := c("1", "2")) - app$set_inputs(!!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection_open") := FALSE, allow_no_input_binding_ = TRUE) + app$set_inputs( + !!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection_open") := FALSE, + allow_no_input_binding_ = TRUE + ) app$wait_for_idle() # Confirm that gene selection was not changed. @@ -122,5 +123,3 @@ test_that("geneSpec module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-km.R b/tests/testthat/test-km.R index 6d7cdd8c..f5894db7 100644 --- a/tests/testthat/test-km.R +++ b/tests/testthat/test-km.R @@ -20,8 +20,6 @@ test_that("ui_g_km creates expected HTML", { # tm_g_km ---- -# nolint start - test_that("km module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -66,5 +64,3 @@ test_that("km module works as expected in the test app", { ) app$stop() }) - -# nolint end diff --git a/tests/testthat/test-pca.R b/tests/testthat/test-pca.R index d4955428..13863337 100644 --- a/tests/testthat/test-pca.R +++ b/tests/testthat/test-pca.R @@ -14,8 +14,6 @@ test_that("ui_g_pca creates HTML", { # pca Server ---- -# nolint start - test_that("pca module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -65,7 +63,10 @@ test_that("pca module works as expected in the test app", { ns_fp <- active_module_filter_panel_ns(app) app$set_inputs(!!ns_fp("MAE-MAE-hd1-row_to_add") := "chromosome", allow_no_input_binding_ = TRUE) app$set_inputs(!!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection") := character()) - app$set_inputs(!!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection_open") := FALSE, allow_no_input_binding_ = TRUE) + app$set_inputs( + !!ns_fp("MAE-hd1-MAE_chromosome_hd1_subset-inputs-selection_open") := FALSE, + allow_no_input_binding_ = TRUE + ) app$wait_for_idle() res <- app$get_value(output = ns("test_pca")) @@ -231,5 +232,3 @@ test_that("pca module works as expected in the test app", { expect_identical(res, 2500L) app$stop() }) - -# nolint end diff --git a/tests/testthat/test-quality.R b/tests/testthat/test-quality.R index e51968b1..d710fea7 100644 --- a/tests/testthat/test-quality.R +++ b/tests/testthat/test-quality.R @@ -16,8 +16,6 @@ test_that("ui_g_quality creates expected HTML", { # tm_g_quality ---- -# nolint start - test_that("quality module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -81,5 +79,3 @@ test_that("quality module works as expected in the test app", { ) app$stop() }) - -# nolint end diff --git a/tests/testthat/test-sampleVarSpec.R b/tests/testthat/test-sampleVarSpec.R index 71ad14f0..8ef6fade 100644 --- a/tests/testthat/test-sampleVarSpec.R +++ b/tests/testthat/test-sampleVarSpec.R @@ -166,8 +166,6 @@ test_that("sampleVarSpecServer only gives factor columns in col_data_vars when c ) }) -# nolint start - test_that("sampleVarSpec module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -224,5 +222,3 @@ test_that("sampleVarSpec module works as expected in the test app", { expect_match(res, "< 18/>= 18 \n 5 ") app$stop() }) - -# nolint end diff --git a/tests/testthat/test-scatterplot.R b/tests/testthat/test-scatterplot.R index e3321ae6..83912ea6 100644 --- a/tests/testthat/test-scatterplot.R +++ b/tests/testthat/test-scatterplot.R @@ -19,8 +19,6 @@ test_that("ui_g_scatterplot creates expected HTML", { # tm_g_scatterplot ---- -# nolint start - test_that("scatterplot module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -102,5 +100,3 @@ test_that("scatterplot module works as expected in the test app", { app$stop() }) - -# nolint end diff --git a/tests/testthat/test-volcanoplot.R b/tests/testthat/test-volcanoplot.R index aa82ab48..4cc18484 100644 --- a/tests/testthat/test-volcanoplot.R +++ b/tests/testthat/test-volcanoplot.R @@ -14,8 +14,6 @@ test_that("ui_g_volcanoplot creates expected HTML", { # tm_g_volcanoplot ---- -# nolint start - test_that("volcanoplot module works as expected in the test app", { skip_if_covr() skip_if_too_deep(5) @@ -57,5 +55,3 @@ test_that("volcanoplot module works as expected in the test app", { expect_snapshot(cat(res)) app$stop() }) - -# nolint end