refactor: rename obikpartitionner crate to obikpartition

Update Cargo manifests, dependency paths, and Rust imports across the workspace to reflect the `obikpartitionner` to `obikpartition` rename. Synchronize architecture and implementation documentation with the new module structure. Fix minor syntax issues in test assertions to ensure compilation compatibility. No behavioral or API changes are introduced.
This commit is contained in:
Eric Coissac
2026-08-20 16:41:22 +02:00
parent f9ef6b8391
commit 9379bbaad8
63 changed files with 80 additions and 80 deletions
+4 -4
View File
@@ -1600,7 +1600,7 @@ dependencies = [
"indicatif",
"ndarray",
"obicompactvec",
"obikpartitionner",
"obikpartition",
"obikseq",
"obilayeredmap",
"obiread",
@@ -1626,7 +1626,7 @@ dependencies = [
"obidebruinj",
"obifastwrite",
"obikindex",
"obikpartitionner",
"obikpartition",
"obikphylo",
"obikrope",
"obikseq",
@@ -1648,7 +1648,7 @@ dependencies = [
]
[[package]]
name = "obikpartitionner"
name = "obikpartition"
version = "0.1.0"
dependencies = [
"cacheline-ef",
@@ -1685,7 +1685,7 @@ dependencies = [
"ndarray",
"obicompactvec",
"obikindex",
"obikpartitionner",
"obikpartition",
"obikseq",
"obilayeredmap",
"obipipeline",
+1 -1
View File
@@ -1,5 +1,5 @@
[workspace]
resolver = "3"
members = ["obikseq", "obiread", "obiskbuilder", "obifastwrite", "obikmer","obikrope","obipipeline", "obikpartitionner","obiskio","obidebruinj","obilayeredmap", "obicompactvec", "obisys", "obikindex", "obitaxonomy", "obikentropy", "obikphylo"]
members = ["obikseq", "obiread", "obiskbuilder", "obifastwrite", "obikmer","obikrope","obipipeline", "obikpartition","obiskio","obidebruinj","obilayeredmap", "obicompactvec", "obisys", "obikindex", "obitaxonomy", "obikentropy", "obikphylo"]
[profile.release]
debug = 1
+1 -1
View File
@@ -129,7 +129,7 @@ pub fn pack_bit_matrix(dir: &Path) -> io::Result<()> {
// A `matrix.pbmx` can already exist here even though columnar data is
// still pending — e.g. copied verbatim from a merge's base source
// before this layer was widened with more genome columns (see
// `obikpartitionner::merge_partition`). Only skip (re-)packing if the
// `obikpartition::merge_partition`). Only skip (re-)packing if the
// existing file already reflects the current column count; otherwise
// the columnar files are newer and must be (re-)packed, overwriting the
// stale one — never silently discarded as "leftover cleanup".
+1 -1
View File
@@ -232,7 +232,7 @@ pub fn pack_compact_int_matrix(dir: &Path) -> io::Result<()> {
// A `matrix.pcmx` can already exist here even though columnar data is
// still pending — e.g. copied verbatim from a merge's base source
// before this layer was widened with more genome columns (see
// `obikpartitionner::merge_partition`). Only skip (re-)packing if the
// `obikpartition::merge_partition`). Only skip (re-)packing if the
// existing file already reflects the current column count; otherwise
// the columnar files are newer and must be (re-)packed, overwriting the
// stale one — never silently discarded as "leftover cleanup".
+1 -1
View File
@@ -5,7 +5,7 @@ edition = "2024"
[dependencies]
obikseq = { path = "../obikseq" }
obikpartitionner = { path = "../obikpartitionner" }
obikpartition = { path = "../obikpartition" }
obitaxonomy = { path = "../obitaxonomy" }
obiskio = { path = "../obiskio" }
obisys = { path = "../obisys" }
+1 -1
View File
@@ -5,7 +5,7 @@ use rayon::prelude::*;
use crate::error::{OKIError, OKIResult};
use crate::index::KmerIndex;
use obikpartitionner::KmerFilter;
use obikpartition::KmerFilter;
impl KmerIndex {
/// Write a CSV table of all indexed kmers to `out`.
+1 -1
View File
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
use std::fs;
use std::path::{Path, PathBuf};
use obikpartitionner::{KmerPartitions, KmerSpectrum, PARTITIONS_SUBDIR};
use obikpartition::{KmerPartitions, KmerSpectrum, PARTITIONS_SUBDIR};
use obisys::{Reporter, Stage, progress_bar};
use rayon::prelude::*;
use tracing::info;
+2 -2
View File
@@ -13,7 +13,7 @@ use crate::index::KmerIndex;
use crate::meta::{GenomeInfo, IndexMeta};
use crate::state::{IndexState, SENTINEL_INDEXED};
pub use obikpartitionner::MergeMode;
pub use obikpartition::MergeMode;
// ── per-partition diagnostic record ──────────────────────────────────────────
@@ -193,7 +193,7 @@ impl KmerIndex {
let block_bits = dst.meta.config.block_bits;
// Pre-build source list once (avoid rebuilding per partition)
let srcs: Vec<(&obikpartitionner::KmerPartitions, usize)> = remaining_sources
let srcs: Vec<(&obikpartition::KmerPartitions, usize)> = remaining_sources
.iter()
.map(|s| (&s.partition, s.meta.genomes.len()))
.collect();
+1 -1
View File
@@ -1,6 +1,6 @@
use std::collections::HashMap;
use obikpartitionner::GroupQuorumFilter;
use obikpartition::GroupQuorumFilter;
use obitaxonomy::{TaxPath, TaxPattern};
use crate::meta::{GenomeInfo, IndexMeta};
+1 -1
View File
@@ -1,6 +1,6 @@
use std::path::Path;
use obikpartitionner::{KmerFilter, MergeMode};
use obikpartition::{KmerFilter, MergeMode};
use obisys::{Reporter, Stage, progress_bar};
use tracing::info;
+6 -6
View File
@@ -1,4 +1,4 @@
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obilayeredmap::{IndexMode, layer::Layer};
use obisys::{Reporter, Stage, progress_bar};
use std::fs;
@@ -71,11 +71,11 @@ impl KmerIndex {
/// Process all layers of one partition's index directory.
fn reindex_partition(
partition: &KmerPartitions
, i: usize
, target: &IndexMode
, block_bits: u,
8) -> OKIResult<()> {
partition: &KmerPartitions,
i: usize,
target: &IndexMode,
block_bits: u8,
) -> OKIResult<()> {
if !partition.index_dir(i).exists() {
return Ok(());
}
+1 -1
View File
@@ -1,6 +1,6 @@
use std::path::Path;
use obikpartitionner::{KmerPartitions, OutputCol};
use obikpartition::{KmerPartitions, OutputCol};
use obisys::{Reporter, Stage, progress_bar};
use tracing::info;
+1 -1
View File
@@ -15,7 +15,7 @@ obifastwrite = { path = "../obifastwrite" }
obidebruinj = { path = "../obidebruinj" }
obipipeline = { path = "../obipipeline" }
obikrope = { path = "../obikrope" }
obikpartitionner = { path = "../obikpartitionner" }
obikpartition = { path = "../obikpartition" }
obisys = { path = "../obisys" }
obiskio = { path = "../obiskio" }
obikindex = { path = "../obikindex", default-features = false }
+1 -1
View File
@@ -2,7 +2,7 @@ use std::path::PathBuf;
use clap::Args;
use obikindex::{KmerIndex, MergeMode};
use obikpartitionner::filter::{MaxTotalCount, MinComplexity, MinTotalCount};
use obikpartition::filter::{MaxTotalCount, MinComplexity, MinTotalCount};
use obisys::Reporter;
use tracing::info;
+1 -1
View File
@@ -1,6 +1,6 @@
use clap::Args;
use obikindex::{GroupFilterParams, IndexMeta, MetaPred};
use obikpartitionner::KmerFilter;
use obikpartition::KmerFilter;
/// CLI args for ingroup/outgroup filtering — embeddable in any command via `#[command(flatten)]`.
#[derive(Args)]
+1 -1
View File
@@ -1,6 +1,6 @@
use std::collections::HashMap;
use obikpartitionner::KmerDesc;
use obikpartition::KmerDesc;
use obikseq::CanonicalKmer;
use obiread::record::SeqRecord;
use obiskbuilder::SuperKmerIter;
+1 -1
View File
@@ -1,7 +1,7 @@
use std::time::Instant;
use obikindex::KmerIndex;
use obikpartitionner::{KmerDesc, QueryHit, QueryStats};
use obikpartition::{KmerDesc, QueryHit, QueryStats};
use obikrope::Rope;
use obikseq::CanonicalKmer;
use obiread::record::parse_chunk;
+1 -1
View File
@@ -3,7 +3,7 @@ use std::path::PathBuf;
use clap::{Args, ValueEnum};
use obikindex::{IndexMeta, KmerIndex};
use obikpartitionner::{AggOp, OutputCol};
use obikpartition::{AggOp, OutputCol};
use obisys::Reporter;
use tracing::info;
+1 -1
View File
@@ -3,7 +3,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicU32, AtomicU64, Ordering};
use std::time::Instant;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obipipeline::{ThrottleGuard, Throttled, throttle};
use obiread::NucPage;
use obisys::spinner;
@@ -1,5 +1,5 @@
[package]
name = "obikpartitionner"
name = "obikpartition"
version = "0.1.0"
edition = "2024"
@@ -197,7 +197,7 @@ impl KmerPartitions {
}
/// Partition `i`'s metadata (layer count, evidence mode) — the single
/// entry point for this, so that callers outside `obikpartitionner`
/// entry point for this, so that callers outside `obikpartition`
/// never need to know it's a `meta.json` loaded via
/// `obilayeredmap::meta::PartitionMeta`, nor handle its own recovery
/// path for indexes built before that file existed (see
@@ -45,7 +45,7 @@ fn query_stats_default_is_zero() {
fn query_partition_with_missing_index_dir_returns_default_stats() {
let tmp = tempfile::tempdir().expect("tempdir");
let partition =
KmerPartitions::create(tmp.path().join("idx"), 2, 21, 9, false.expect("create partition");
KmerPartitions::create(tmp.path().join("idx"), 2, 21, 9, false).expect("create partition");
let mut kmers: HashMap<CanonicalKmer, Vec<KmerDesc>> = HashMap::new();
// Any well-formed canonical k-mer works here — the call must return
@@ -66,7 +66,7 @@ fn query_partition_with_missing_index_dir_returns_default_stats() {
fn query_partition_with_empty_kmers_is_a_noop() {
let tmp = tempfile::tempdir().expect("tempdir");
let partition =
KmerPartitions::create(tmp.path().join("idx"), 2, 21, 9, false.expect("create partition");
KmerPartitions::create(tmp.path().join("idx"), 2, 21, 9, false).expect("create partition");
let kmers: HashMap<CanonicalKmer, Vec<KmerDesc>> = HashMap::new();
let stats = partition
+1 -1
View File
@@ -6,7 +6,7 @@ edition = "2024"
[dependencies]
obikindex = { path = "../obikindex", default-features = false }
obikseq = { path = "../obikseq" }
obikpartitionner = { path = "../obikpartitionner" }
obikpartition = { path = "../obikpartition" }
obiskio = { path = "../obiskio" }
obisys = { path = "../obisys" }
obicompactvec = { path = "../obicompactvec" }
+1 -1
View File
@@ -1,6 +1,6 @@
use std::sync::Arc;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -4,7 +4,7 @@ use std::sync::atomic::Ordering;
use rayon::prelude::*;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obikseq::CanonicalKmer;
use obilayeredmap::MphfLayer;
use obilayeredmap::meta::IndexMode;
+1 -1
View File
@@ -3,7 +3,7 @@ use rayon::prelude::*;
use std::path::Path;
use obicompactvec::{PersistentBitMatrix, PersistentCompactIntMatrix};
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obikseq::CanonicalKmer;
use obilayeredmap::meta::IndexMode;
use obilayeredmap::{Layer, OLMResult};
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -13,7 +13,7 @@ use std::io::{BufWriter, Write};
use std::path::{Path, PathBuf};
use std::sync::Arc;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -29,7 +29,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use rayon::prelude::*;
use obikpartitionner::KmerPartitions;
use obikpartition::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -33,7 +33,7 @@ pub trait LayerData: Sized {
///
/// `obilayeredmap` operates within a single partition's index root; it has
/// no notion of "partition" at all. Turning a partition number into that
/// root is `obikpartitionner::KmerPartition::part_dir`'s job, one layer up
/// root is `obikpartition::KmerPartition::part_dir`'s job, one layer up
/// — callers here only ever name a layer *number*, never build the path
/// themselves.
pub fn layer_dir(root: &Path, i: usize) -> PathBuf {