Skip to content

Commit

Permalink
Merge branch 'main' into validate-paramstr
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes authored Oct 8, 2024
2 parents 5502afd + e3b28ff commit d31b163
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/utils/buildutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ impl BuildParamsSet {
ksizes.push(base_param.ksize); // Use the default ksize if none were specified.
}

// Create a BuildParams for each ksize and add to the set
for &k in &ksizes {
let mut param = base_param.clone();
param.ksize = k;
Expand All @@ -261,6 +262,14 @@ impl BuildParamsSet {

Ok(set)
}

pub fn get_params(&self) -> &HashSet<BuildParams> {
&self.params
}

pub fn into_vec(self) -> Vec<BuildParams> {
self.params.into_iter().collect()
}
}

#[derive(Debug, Default, Clone, Getters, Setters, Serialize)]
Expand Down Expand Up @@ -904,6 +913,7 @@ mod tests {
);
}


#[test]
fn test_valid_params_str() {
let params_str = "k=31,abund,dna";
Expand Down

0 comments on commit d31b163

Please sign in to comment.