Skip to content

Commit

Permalink
expose -w piscem workdir parameter for simpleaf index
Browse files Browse the repository at this point in the history
  • Loading branch information
DongzeHE committed Sep 21, 2024
1 parent 82b96d1 commit 2413add
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/simpleaf_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,16 @@ pub struct IndexOpts {
)]
pub hash_seed: u64,

/// working directory where temporary files should be placed
#[arg(
long = "work-dir",
conflicts_with = "use_piscem",
help_heading = "Piscem Index Options",
default_value = "./workdir.noindex",
display_order = 5
)]
pub work_dir: PathBuf,

/// path to output directory (will be created if it doesn't exist)
#[arg(short, long, display_order = 1)]
pub output: PathBuf,
Expand Down
4 changes: 3 additions & 1 deletion src/simpleaf_commands/indexing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ pub fn build_ref_and_index(af_home_path: &Path, opts: IndexOpts) -> anyhow::Resu
.arg("-s")
.arg(&ref_seq)
.arg("--seed")
.arg(opts.hash_seed.to_string());
.arg(opts.hash_seed.to_string())
.arg("-w")
.arg(opts.work_dir);

// if the user requested to overwrite, then pass this option
if opts.overwrite {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/workflow_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ pub fn initialize_workflow<T: AsRef<Path>>(
// Each SimpleafWorkflow represents a json
/// Simpleaf Workflow record
pub struct SimpleafWorkflow {
pub af_home_path: PathBuf,
// pub af_home_path: PathBuf,

// This command queue contains all commands that need to be run
pub cmd_queue: Vec<CommandRecord>,
Expand Down Expand Up @@ -995,7 +995,7 @@ impl WorkflowLog {
/// It can be either a simpleaf command or an external command.
pub struct CommandRecord {
pub step: u64,
pub active: bool,
// pub active: bool,
pub program_name: ProgramName,
pub cmd: WFCommand,
//pub simpleaf_cmd: Option<Commands>,
Expand Down

0 comments on commit 2413add

Please sign in to comment.