From 98d97439f6609fde2091261781f363951fb52634 Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 24 Oct 2025 10:37:15 -0500 Subject: [PATCH 1/4] make TestDataGenerator.randomBoolean() static --- src/org/labkey/test/tests/component/GridPanelTest.java | 2 +- src/org/labkey/test/util/TestDataGenerator.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/labkey/test/tests/component/GridPanelTest.java b/src/org/labkey/test/tests/component/GridPanelTest.java index f6ae5bf96c..23c661bbbc 100644 --- a/src/org/labkey/test/tests/component/GridPanelTest.java +++ b/src/org/labkey/test/tests/component/GridPanelTest.java @@ -165,7 +165,7 @@ private void createSmallSampleType() throws IOException, CommandException FILTER_INT_COL.getName(), TestDataGenerator.randomInt(1, INT_MAX), FILTER_STRING_COL.getName(), stringSets.get(setIndex++), FILTER_DATE_COL.getName(), sampleSetDataGenerator.randomDateString(DateUtils.addWeeks(new Date(), -25), new Date()), - FILTER_BOOL_COL.getName(), sampleSetDataGenerator.randomBoolean()) + FILTER_BOOL_COL.getName(), TestDataGenerator.randomBoolean()) ); } diff --git a/src/org/labkey/test/util/TestDataGenerator.java b/src/org/labkey/test/util/TestDataGenerator.java index bdb3d5220c..205883f2f0 100644 --- a/src/org/labkey/test/util/TestDataGenerator.java +++ b/src/org/labkey/test/util/TestDataGenerator.java @@ -469,7 +469,7 @@ private Supplier getDefaultDataSupplier(PropertyDescriptor propertyDescr case "double": return () -> randomDouble(0, 20); case "boolean": - return this::randomBoolean; + return TestDataGenerator::randomBoolean; case "date": case "datetime": return () -> randomDateString(DateUtils.addWeeks(new Date(), -39), new Date()); @@ -797,7 +797,7 @@ public String randomDateString(String dateFormat, Date min, Date max) return new SimpleDateFormat(dateFormat).format(date); } - public boolean randomBoolean() + public static boolean randomBoolean() { return ThreadLocalRandom.current().nextBoolean(); } From 6324de729bef4ccdd5d78d7d188c774bbf750ac7 Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 24 Oct 2025 10:38:10 -0500 Subject: [PATCH 2/4] BiologicsAssayFilesTest to optionally add a no-op transform script to assay designs to test import with and without them --- data/qc/noopTransform.R | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 data/qc/noopTransform.R diff --git a/data/qc/noopTransform.R b/data/qc/noopTransform.R new file mode 100644 index 0000000000..e227b420da --- /dev/null +++ b/data/qc/noopTransform.R @@ -0,0 +1,9 @@ +library(Rlabkey); + +run.props = labkey.transform.readRunPropertiesFile("${runInfo}"); +run.data.file = labkey.transform.getRunPropertyValue(run.props, "runDataFile"); +run.output.file = run.props$val3[run.props$name == "runDataFile"]; + +run.data = read.delim(run.data.file, header=TRUE, sep="\t", quote="", check.names=FALSE); +run.data$TransformType = "${transformOperation}"; +write.table(run.data, file=run.output.file, sep="\t", na="", row.names=FALSE, quote=FALSE); \ No newline at end of file From 0c7fcb775c91f284b3d6a2d46db80d2345d3a4fe Mon Sep 17 00:00:00 2001 From: cnathe Date: Mon, 27 Oct 2025 15:45:54 -0500 Subject: [PATCH 3/4] replace Rlabkey package usage --- data/qc/noopTransform.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/qc/noopTransform.R b/data/qc/noopTransform.R index e227b420da..498ab24f78 100644 --- a/data/qc/noopTransform.R +++ b/data/qc/noopTransform.R @@ -1,8 +1,8 @@ -library(Rlabkey); - -run.props = labkey.transform.readRunPropertiesFile("${runInfo}"); -run.data.file = labkey.transform.getRunPropertyValue(run.props, "runDataFile"); -run.output.file = run.props$val3[run.props$name == "runDataFile"]; +all.lines = readLines("${runInfo}") +runDataFile.line = grep("^runDataFile", all.lines, value = TRUE); +runDataFile.props <- strsplit(runDataFile.line, "\t")[[1]] +run.data.file = runDataFile.props[2]; +run.output.file = runDataFile.props[4]; run.data = read.delim(run.data.file, header=TRUE, sep="\t", quote="", check.names=FALSE); run.data$TransformType = "${transformOperation}"; From d3f46b1a527334fad76e7466f071cf04a1a0ec3d Mon Sep 17 00:00:00 2001 From: cnathe Date: Tue, 28 Oct 2025 14:26:35 -0500 Subject: [PATCH 4/4] noopTransform.R to quote and escape column headers in output --- data/qc/noopTransform.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/qc/noopTransform.R b/data/qc/noopTransform.R index 498ab24f78..6db94994da 100644 --- a/data/qc/noopTransform.R +++ b/data/qc/noopTransform.R @@ -6,4 +6,4 @@ run.output.file = runDataFile.props[4]; run.data = read.delim(run.data.file, header=TRUE, sep="\t", quote="", check.names=FALSE); run.data$TransformType = "${transformOperation}"; -write.table(run.data, file=run.output.file, sep="\t", na="", row.names=FALSE, quote=FALSE); \ No newline at end of file +write.table(run.data, file=run.output.file, sep="\t", na="", row.names=FALSE, quote=TRUE, qmethod="double"); \ No newline at end of file