Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
readme = "README.md"
# Own version (decoupled from workspace.version): data-beans evolves its CLI /
# QC API independently of the shared utility crates.
version = "0.8.0"
version = "0.8.1"
rust-version = "1.91"
# Ship only the sources, README and license: nothing else in the working tree
# (data stores, saved name lists, scratch files) can end up on crates.io.
Expand Down
2 changes: 1 addition & 1 deletion src/alg/collapse_data/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ fn optimize_block(
for _opt_iter in 0..num_iter {
#[cfg(debug_assertions)]
{
debug!("iteration: {}", &_opt_iter);
debug!("iteration: {}", _opt_iter);
}

update_mu(&mut mu_adj_param, &delta_gb);
Expand Down
8 changes: 4 additions & 4 deletions src/aux/ontology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ impl Ontology {
}
TermClause::IsObsolete(b) => obsolete = obsolete || *b,
TermClause::IsA(parent) => is_a.push(parent.to_string().trim().into()),
TermClause::Relationship(rel, target) => {
if rel.to_string().trim() == "part_of" {
part_of.push(target.to_string().trim().into());
}
TermClause::Relationship(rel, target)
if rel.to_string().trim() == "part_of" =>
{
part_of.push(target.to_string().trim().into());
}
_ => {}
}
Expand Down
6 changes: 3 additions & 3 deletions src/handlers/builders/from_fragments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub fn run_build_from_fragments(args: &FromFragmentsArgs) -> anyhow::Result<()>
resolve_backend_file(&effective_output, Some(args.backend.clone()))?;

if std::path::Path::new(backend_file.as_ref()).exists() {
info!("Removing existing backend file: {}", &backend_file);
info!("Removing existing backend file: {}", backend_file);
remove_file(&backend_file)?;
}

Expand Down Expand Up @@ -1110,8 +1110,8 @@ mod tests {
///////////////////////////////////////////////////////////////

fn run_pair_and_compare(args_serial: FromFragmentsArgs, args_parallel: FromFragmentsArgs) {
let out_serial = format!("{}.zarr", &args_serial.output);
let out_parallel = format!("{}.zarr", &args_parallel.output);
let out_serial = format!("{}.zarr", args_serial.output);
let out_parallel = format!("{}.zarr", args_parallel.output);
run_build_from_fragments(&args_serial).unwrap();
run_build_from_fragments(&args_parallel).unwrap();
let a = open_sparse_matrix(&out_serial, &SparseIoBackend::Zarr).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/builders/from_mtx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub fn run_build_from_mtx(args: &FromMtxArgs) -> anyhow::Result<()> {
if std::path::Path::new(backend_file.as_ref()).exists() {
info!(
"This existing backend file '{}' will be deleted",
&backend_file
backend_file
);
remove_file(&backend_file)?;
}
Expand Down
24 changes: 12 additions & 12 deletions src/handlers/merging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ pub fn run_merge_backend(args: &MergeBackendArgs) -> anyhow::Result<()> {
if std::path::Path::new(backend_file.as_ref()).exists() {
info!(
"This existing backend file '{}' will be deleted",
&backend_file
backend_file
);
remove_file(&backend_file)?;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ pub fn run_merge_backend(args: &MergeBackendArgs) -> anyhow::Result<()> {

info!(
"Successfully created a sparse backend file: {}",
&backend_file
backend_file
);

let batch_map = column_names
Expand All @@ -407,7 +407,7 @@ pub fn run_merge_backend(args: &MergeBackendArgs) -> anyhow::Result<()> {
.collect::<HashMap<_, _>>();

if args.do_squeeze {
info!("Squeeze the backend data {}", &backend_file);
info!("Squeeze the backend data {}", backend_file);
let squeeze_args = RunSqueezeArgs {
// Squeezing in place on a path the caller already resolved: the
// zip decision was made there, so nothing is re-zipped here.
Expand Down Expand Up @@ -459,7 +459,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {

if let Some(base) = std::path::Path::new(&dir).file_stem() {
let base = base.to_str().expect("invalid base name").to_string();
info!("Searching relevant files within: {}", &base);
info!("Searching relevant files within: {}", base);
let batch_name = Some(base);

if let Ok(this_dir) = std::fs::read_dir(&dir) {
Expand All @@ -482,7 +482,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
}

if let (Some(m), Some(r), Some(c), Some(b)) = (mtx, row, col, batch_name) {
info!("Build {} from {}, {}, {} ", &b, &m, &r, &c);
info!("Build {} from {}, {}, {} ", b, m, r, c);
mtx_files.push(m);
row_files.push(r);
col_files.push(c);
Expand All @@ -491,7 +491,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
}
}

info!("Searching subdir within: {}", &dir);
info!("Searching subdir within: {}", dir);

let mut sub_dir_vec = std::fs::read_dir(&dir)?
.filter_map(Result::ok)
Expand All @@ -507,7 +507,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {

if let Some(base) = std::path::Path::new(&sub_dir).file_stem() {
let base = base.to_str().expect("invalid base name").to_string();
info!("searching {} ...", &base);
info!("searching {} ...", base);

let batch_name = Some(base);

Expand All @@ -516,7 +516,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
if let Some(_path) = x?.path().to_str() {
let _path = _path.to_string();

info!("Found: {}", &_path);
info!("Found: {}", _path);

if _path.ends_with(args.mtx_file_name.as_ref()) {
mtx = Some(_path.into_boxed_str());
Expand All @@ -530,7 +530,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
}

if let (Some(m), Some(r), Some(c), Some(b)) = (mtx, row, col, batch_name) {
info!("Build {} from {}, {}, {} ", &b, &m, &r, &c);
info!("Build {} from {}, {}, {} ", b, m, r, c);
mtx_files.push(m);
row_files.push(r);
col_files.push(c);
Expand Down Expand Up @@ -655,7 +655,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
if std::path::Path::new(&backend_file).exists() {
info!(
"This existing backend file '{}' will be deleted",
&backend_file
backend_file
);
remove_file(&backend_file)?;
}
Expand Down Expand Up @@ -701,7 +701,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {

info!(
"Successfully created a sparse backend file: {}",
&backend_file
backend_file
);

let batch_map = column_names
Expand All @@ -710,7 +710,7 @@ pub fn run_merge_mtx(args: &MergeMtxArgs) -> anyhow::Result<()> {
.collect::<HashMap<_, _>>();

if args.do_squeeze {
info!("Squeeze the backend data {}", &backend_file);
info!("Squeeze the backend data {}", backend_file);
let squeeze_args = RunSqueezeArgs {
// Squeezing in place on a path the caller already resolved: the
// zip decision was made there, so nothing is re-zipped here.
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/transformation/squeeze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ fn run_merge_then_squeeze(
let (backend, backend_file) = resolve_backend_file(&effective_output, Some(backend))?;

if std::path::Path::new(backend_file.as_ref()).exists() {
info!("Removing existing output file: {}", &backend_file);
info!("Removing existing output file: {}", backend_file);
remove_file(&backend_file)?;
}

Expand All @@ -289,7 +289,7 @@ fn run_merge_then_squeeze(
merged_data.register_column_names_vec(&column_names);
merged_data.set_metadata(&meta::common_metadata(&metas))?;

info!("Created merged file: {}", &backend_file);
info!("Created merged file: {}", backend_file);

// Step 4: Squeeze the merged result
info!(
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/transformation/subset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn subset_columns(args: &SubsetColumnsArgs) -> anyhow::Result<()> {
drop(data);

if args.do_squeeze {
info!("Squeeze the backend data {}", &output_file);
info!("Squeeze the backend data {}", output_file);
let squeeze_args = build_squeeze_args(
output_file.clone(),
args.column_nnz_cutoff,
Expand Down Expand Up @@ -270,7 +270,7 @@ pub fn subset_rows(args: &SubsetRowsArgs) -> anyhow::Result<()> {
drop(data);

if args.do_squeeze {
info!("Squeeze the backend data {}", &output_file);
info!("Squeeze the backend data {}", output_file);
let squeeze_args = build_squeeze_args(
output_file.clone(),
args.column_nnz_cutoff,
Expand Down
4 changes: 2 additions & 2 deletions src/hdf5_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ pub fn resolve_backend_file(
`hdf5` feature; writing Zarr instead ({} -> {}). Pass \
`--zip=true` (or use a `.zarr.zip` output path) for a zipped \
archive.",
&backend_file,
&new_path
backend_file,
new_path
);
return Ok((SparseIoBackend::Zarr, new_path.into_boxed_str()));
}
Expand Down
Loading
Loading