-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
bb00e33
commit 609b921
Showing
7 changed files
with
117 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ node_modules | |
tool_test_output.html | ||
tool_test_output.json | ||
.hg_archival.txt | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tools/doe_synbio/test-data/sampler/output/sampling.test-3.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Hela lysate,Access prot 50%,Reaction mix,RNA 1ug/uL | ||
10.0,165.0,257.5,20.0 | ||
10.0,325.0,192.5,20.0 | ||
10.0,310.0,305.0,20.0 |
5 changes: 5 additions & 0 deletions
5
tools/doe_synbio/test-data/sampler/output/sampling.test-4.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Hela lysate,Access prot 50%,Reaction mix,RNA 1ug/uL | ||
200.0,80.0,120.0,20.0 | ||
200.0,80.0,40.0,100.0 | ||
500.0,120.0,40.0,60.0 | ||
300.0,80.0,120.0,20.0 |