helix/dna/cmd/
dataset.rs

1use clap::Args;
2use std::path::PathBuf;
3
4#[derive(Args)]
5pub struct DatasetArgs {
6    /// Files to process
7    #[arg(short, long)]
8    files: Vec<PathBuf>,
9
10    /// Output file path (defaults to stdout if not specified)
11    #[arg(short, long)]
12    output: Option<PathBuf>,
13
14    /// Format (defaults to json)
15    #[arg(long)]
16    format: Option<String>,
17}
18
19pub async fn run(args: DatasetArgs) -> anyhow::Result<()> {
20    use crate::mds::dataset::{dataset_command, DatasetAction};
21
22    let action = DatasetAction::Process {
23        files: args.files,
24        output: args.output,
25        format: args.format,
26        algorithm: None,
27        validate: false,
28    };
29
30    dataset_command(action, false).await.map_err(|e| anyhow::anyhow!("Dataset command failed: {}", e))?;
31    Ok(())
32}