From 609b921035cc7e886cd2b0ee7020d9a40f95e7c2 Mon Sep 17 00:00:00 2001 From: GuillaumeG Date: Tue, 17 Sep 2024 18:02:30 +0200 Subject: [PATCH] `doe_synbio` update version (#195) * feat(tools): doe_synbio, update newer version * fix(tools): icfree, package name and test 2 of sampler * chore(gihub): add style for R lint and update skipping files * fix(tools): doe_synbio, add default value to not block shed_update --- .github/styler.R | 36 +++++++++ .gitignore | 1 + tools/doe_synbio/macros.xml | 1 - tools/doe_synbio/optdoe.xml | 2 +- tools/doe_synbio/sampler.xml | 78 +++++++++++++++++-- .../sampler/output/sampling.test-3.tsv | 4 + .../sampler/output/sampling.test-4.tsv | 5 ++ 7 files changed, 117 insertions(+), 10 deletions(-) create mode 100755 .github/styler.R create mode 100644 tools/doe_synbio/test-data/sampler/output/sampling.test-3.tsv create mode 100644 tools/doe_synbio/test-data/sampler/output/sampling.test-4.tsv diff --git a/.github/styler.R b/.github/styler.R new file mode 100755 index 00000000..c5c0cb5d --- /dev/null +++ b/.github/styler.R @@ -0,0 +1,36 @@ +#!/usr/bin/env Rscript + +library("argparse") +library("styler") + +parser <- ArgumentParser(description = "Call styler") +parser$add_argument("dir", + metavar = "DIR", type = "character", + help = "File to parse" +) +parser$add_argument("--dry", + choices = c("off", "on"), default = "on" +) +args <- parser$parse_args() + +file_info <- file.info(args$dir) +is_directory <- file_info$isdir + +if (is_directory) { + captured_output <- capture.output({ + result <- style_dir(args$dir, indent_by = 4, dry = args$dry, recursive = TRUE) + }) +} else { + captured_output <- capture.output({ + result <- style_file(args$dir, indent_by = 4, dry = args$dry) + }) +} + +n <- nrow(subset(result, changed == TRUE)) +if (n > 0) { + if (args$dry == "off") { + print(paste("Changed", n, "files")) + } else { + stop(paste("Linting failed for", n, "files")) + } +} diff --git a/.gitignore b/.gitignore index 9bfb4d39..da400fd2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules tool_test_output.html tool_test_output.json .hg_archival.txt +*.swp diff --git a/tools/doe_synbio/macros.xml b/tools/doe_synbio/macros.xml index 11595e04..c89095dd 100644 --- a/tools/doe_synbio/macros.xml +++ b/tools/doe_synbio/macros.xml @@ -1,6 +1,5 @@ 0 - MIT diff --git a/tools/doe_synbio/optdoe.xml b/tools/doe_synbio/optdoe.xml index 53eb750c..2fe63e7e 100644 --- a/tools/doe_synbio/optdoe.xml +++ b/tools/doe_synbio/optdoe.xml @@ -1,4 +1,4 @@ - + Combine selected genetic parts and enzyme variants for the desired pathways macros.xml diff --git a/tools/doe_synbio/sampler.xml b/tools/doe_synbio/sampler.xml index e8ffd5e5..50662dd1 100644 --- a/tools/doe_synbio/sampler.xml +++ b/tools/doe_synbio/sampler.xml @@ -1,28 +1,63 @@ - + Generate Latin Hypercube Samples for given components. macros.xml - 2.4.0 + 2.5.0 - icfree-ml + icfree 0 + --fixed_values '#echo json.dumps(components)#' + #end if ]]> - +
- + + + + + + + + + + + + ^(\d+(\.\d+)?)(,\d+(\.\d+)?)*$ + + + + + + + + + + + @@ -50,15 +85,42 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + +