Skip to content

Commit a938c9a

Browse files
adthrasherclaymcleoda-frantz
authored
feat: create template input JSONs (#113)
Co-authored-by: Clay McLeod <clay.l.mcleod@gmail.com> Co-authored-by: Andrew Frantz <andrew.frantz@stjude.org> Co-authored-by: Ari Frantz <ari.frantz@stjude.org>
1 parent 2bbba79 commit a938c9a

File tree

7 files changed

+556
-7
lines changed

7 files changed

+556
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
* Added tab completions for `sprocket` commands ([#105](https://github.com/stjude-rust-labs/sprocket/pull/105)).
1313
* Added `shellcheck` to Dockerfile ([#114](https://github.com/stjude-rust-labs/sprocket/pull/114)).
14+
* Introduced the `inputs` subcommand ([#113](https://github.com/stjude-rust-labs/sprocket/pull/113)).
1415

1516
## 0.12.2 - 05-05-2025
1617

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ nonempty = "0.11.0"
2828
pest = { version = "2.7.14", features = ["pretty-print"] }
2929
pretty_assertions = "1.4.1"
3030
serde = "1.0.219"
31-
serde_json = "1.0.140"
31+
serde_json = { version = "1.0.140", features = ["preserve_order"] }
32+
serde_yaml_ng = "0.10.0"
3233
tokio = { version = "1.41.0", features = ["full"] }
3334
tokio-util = "0.7.15"
3435
toml = "0.8.22"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@
3232

3333
- **`sprocket analyzer`** runs Sprocket as a LSP server, which is useful for IDE integration.
3434
- **`sprocket check`** performs static analysis on a document or directory of documents.
35+
- **`sprocket completions`** generates shell completions for Sprocket.
3536
- **`sprocket config`** prints configuration values.
3637
- **`sprocket explain`** explains validation and lint rules supported by Sprocket.
3738
- **`sprocket format`** formats a document or directory of documents.
39+
- **`sprocket inputs`** writes template input file (JSON or YAML) for a task or workflow.
3840
- **`sprocket lint`** performs static analysis on a document or directory of documents with additional linting rules enabled (effectively a shortcut for `check --lint`).
3941
- **`sprocket run`** runs a task or workflow.
4042
- **`sprocket validate`** validates a set of inputs read from files or on the command line against a task or workflow.
41-
- **`sprocket completions`** generates shell completions for Sprocket.
4243

4344
## Guiding Principles
4445

src/commands.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub mod completions;
88
pub mod config;
99
pub mod explain;
1010
pub mod format;
11+
pub mod inputs;
1112
pub mod run;
1213
pub mod validate;
1314

@@ -34,6 +35,9 @@ pub enum Commands {
3435
#[clap(alias = "fmt")]
3536
Format(format::Args),
3637

38+
/// Writes the inputs schema for a WDL document.
39+
Inputs(inputs::Args),
40+
3741
/// Lints a document or a directory containing documents.
3842
Lint(check::LintArgs),
3943

0 commit comments

Comments
 (0)