-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds
wdl-grammar gauntlet
for testing grammar parsing
- Loading branch information
1 parent
b713131
commit 0c92cfd
Showing
35 changed files
with
4,827 additions
and
876 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version = "v1" | ||
|
||
[[repositories]] | ||
organization = "PacificBiosciences" | ||
name = "HiFi-human-WGS-WDL" | ||
|
||
[[repositories]] | ||
organization = "biowdl" | ||
name = "tasks" | ||
|
||
[[repositories]] | ||
organization = "stjudecloud" | ||
name = "workflows" | ||
|
||
[[repositories]] | ||
organization = "chanzuckerberg" | ||
name = "czid-workflows" | ||
|
||
[[ignored_errors]] | ||
document = "biowdl/tasks:bedtools.wdl" | ||
error = """ | ||
--> 29:67 | ||
| | ||
29 | String memory = \"~{512 + ceil(size([inputBed, faidx], \"MiB\"))}MiB\" | ||
| ^--- | ||
| | ||
= expected WHITESPACE or OPTION""" | ||
|
||
[[ignored_errors]] | ||
document = "biowdl/tasks:bowtie.wdl" | ||
error = """ | ||
--> 40:58 | ||
| | ||
40 | String memory = \"~{5 + ceil(size(indexFiles, \"GiB\"))}GiB\" | ||
| ^--- | ||
| | ||
= expected WHITESPACE or OPTION""" | ||
|
||
[[ignored_errors]] | ||
document = "stjudecloud/workflows:template/task-templates.wdl" | ||
error = """ | ||
--> 17:25 | ||
| | ||
17 | Int memory_gb = <> | ||
| ^--- | ||
| | ||
= expected WHITESPACE, COMMENT, or expression""" |
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 was deleted.
Oops, something went wrong.
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,38 @@ | ||
//! Subcommands for the `wdl-grammar` command-line tool. | ||
use log::debug; | ||
|
||
pub mod create_test; | ||
pub mod gauntlet; | ||
pub mod parse; | ||
|
||
/// An error common to any subcommand. | ||
#[derive(Debug)] | ||
pub enum Error { | ||
/// An input/output error. | ||
InputOutput(std::io::Error), | ||
} | ||
|
||
impl std::fmt::Display for Error { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
Error::InputOutput(err) => write!(f, "i/o error: {err}"), | ||
} | ||
} | ||
} | ||
|
||
impl std::error::Error for Error {} | ||
|
||
/// A [`Result`](std::result::Result) with an [`Error`]. | ||
type Result<T> = std::result::Result<T, Error>; | ||
|
||
/// Gets lines of input from STDIN. | ||
pub fn get_contents_stdin() -> Result<String> { | ||
debug!("Reading from STDIN..."); | ||
|
||
Ok(std::io::stdin() | ||
.lines() | ||
.collect::<std::result::Result<Vec<_>, _>>() | ||
.map_err(Error::InputOutput)? | ||
.join("\n")) | ||
} |
Oops, something went wrong.