Skip to content

Commit 905f2dd

Browse files
committed
modify testing protocols
1 parent d4c6e2d commit 905f2dd

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

man/immApex-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-onehotEncoder.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ numpy_installed <- reticulate::py_module_available("numpy")
66

77
# 2. If not installed, skip everything:
88
if (!keras_installed || !numpy_installed) {
9-
test_that("Skipping generateSequences tests", {
9+
test_that("Skipping onehotEncoder tests", {
1010
skip("Required Python modules (Keras, NumPy) are not available.")
1111
})
1212
} else {

tests/testthat/test-propertyEncoder.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ numpy_installed <- reticulate::py_module_available("numpy")
66

77
# 2. If not installed, skip everything:
88
if (!keras_installed || !numpy_installed) {
9-
test_that("Skipping generateSequences tests", {
9+
test_that("Skipping propertyEncoder tests", {
1010
skip("Required Python modules (Keras, NumPy) are not available.")
1111
})
1212
} else {

tests/testthat/test-sequenceDecoder.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ numpy_installed <- reticulate::py_module_available("numpy")
66

77
# 2. If not installed, skip everything:
88
if (!keras_installed || !numpy_installed) {
9-
test_that("Skipping generateSequences tests", {
9+
test_that("Skipping sequenceDecoder tests", {
1010
skip("Required Python modules (Keras, NumPy) are not available.")
1111
})
1212
} else {

tests/testthat/test-tokenizeSequences.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ numpy_installed <- reticulate::py_module_available("numpy")
66

77
# 2. If not installed, skip everything:
88
if (!keras_installed || !numpy_installed) {
9-
test_that("Skipping generateSequences tests", {
9+
test_that("Skipping tokenizeSequences tests", {
1010
skip("Required Python modules (Keras, NumPy) are not available.")
1111
})
1212
} else {

tests/testthat/test-variationalSequences.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# 1. Check module availability once.
33
keras_installed <- reticulate::py_module_available("keras")
44
numpy_installed <- reticulate::py_module_available("numpy")
5+
keras3_installed <- packageVersion("keras3") < "1.2.0"
56

67
# 2. If not installed, skip everything:
7-
if (!keras_installed || !numpy_installed) {
8-
test_that("Skipping generateSequences tests", {
8+
if (!keras_installed || !numpy_installed || !keras3_installed) {
9+
test_that("Skipping variationalSequences tests", {
910
skip("Required Python modules (Keras, NumPy) are not available.")
1011
})
1112
} else {

vignettes/immApex.Rmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author:
44
- name: Nick Borcherding
55
email: ncborch@gmail.com
66
affiliation: Washington University in St. Louis, School of Medicine, St. Louis, MO, USA
7-
date: "December 24th, 2024"
7+
date: "Feburary 25, 2025"
88
output:
99
BiocStyle::html_document:
1010
toc_float: true
@@ -23,10 +23,11 @@ set.seed(42)
2323
# Check Python modules once at the start
2424
keras_installed <- reticulate::py_module_available("keras")
2525
numpy_installed <- reticulate::py_module_available("numpy")
26+
keras3_installed <- packageVersion("keras3") < "1.2.0"
2627
2728
# If not installed, skip evaluation of all subsequent chunks
2829
knitr::opts_chunk$set(
29-
eval = keras_installed && numpy_installed
30+
eval = keras_installed && numpy_installed && keras3_installed
3031
)
3132
```
3233

@@ -107,7 +108,7 @@ Parameters for ```variationalSequences()``
107108
* **disable.eager.execution** Disable the eager execution parameter for tensorflow.
108109
* **sequence.dictionary** The letters to use in sequence mutation (default are all amino acids)
109110

110-
```{r tidy = FALSE, eval = reticulate::py_module_available("keras") && reticulate::py_module_available("numpy")}
111+
```{r tidy = FALSE}
111112
variational.sequences <- variationalSequences(sequences,
112113
encoder = "onehotEncoder",
113114
number.of.sequences = 100,

0 commit comments

Comments
 (0)