refactor: rename project from obikmer to obiskim
Update the project name, binary, and all associated documentation, scripts, and configuration files from `obikmer` to `obiskim`. This change ensures consistency across the codebase, including lock files, VCF outputs, benchmark targets, and user-facing documentation. - Update `mkdocs.yml` and `.crate-kit/VERSION` to reflect the new project name and version 0.3.4. - Rename all references in `DevDocMD/` documentation, including architecture, implementation, and theory sections, from `obikmer` to `obiskim`. - Update `UserDocMD/` files to use `.obiskim.lock` and `.obiskim.gate` for lock files, and update VCF contig IDs to `obiskim_<partition>_<layer>`. - Modify `benchmark/` scripts and Makefiles to use `obiskim` binary names and `obiskim_dist/` directories for distribution and comparison tasks. - Update `prompts/` files to reference the `obiskim` repository and commands instead of `obikmer`. - Rename temporary directories in `scripts/` smoke tests from `obikmer_*` to `obiskim_*`. - Update `src/obikphylo/src/siblings/algorithms/alignment_vcf.rs` to use `obiskim` in VCF source identifiers and assertions. - Update `src/obiskim/Cargo.toml` version to 1.4.9 and update `src/obiskim/src/cmd/phylo/args/outputs.rs` documentation. - Update `src/obisys/src/lock.rs` to use `.obiskim.lock`, `.obiskim.gate`, and `.obiskim.promote` file names.
This commit is contained in:
1 parent
42d5b881ec
commit
917cb26186
48 files changed
+236
-209
No files matched your search
@@ -1,6 +1,6 @@
|
||||
//! VCF rendering of a [`SnpAlignment`].
|
||||
//!
|
||||
//! One contig per `(partition, layer)` (`obikmer_<partition>_<layer>`), `POS`
|
||||
//! One contig per `(partition, layer)` (`obiskim_<partition>_<layer>`), `POS`
|
||||
//! = the family's `family_idx + 1` inside it: for a given index and sibling
|
||||
//! annex the same family always gets the same virtual coordinates, and
|
||||
//! sorting by `(partition, layer, family_idx)` is what makes the file a
|
||||
@@ -103,12 +103,12 @@ impl SnpAlignment {
|
||||
});
|
||||
|
||||
writeln!(out, "##fileformat=VCFv4.5")?;
|
||||
writeln!(out, "##source=obikmer")?;
|
||||
writeln!(out, "##source=obiskim")?;
|
||||
let mut last = None;
|
||||
for &j in &order {
|
||||
let s = &self.sites[j];
|
||||
if last != Some((s.partition, s.layer)) {
|
||||
writeln!(out, "##contig=<ID=obikmer_{}_{}>", s.partition, s.layer)?;
|
||||
writeln!(out, "##contig=<ID=obiskim_{}_{}>", s.partition, s.layer)?;
|
||||
last = Some((s.partition, s.layer));
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ impl SnpAlignment {
|
||||
CanonicalKmer::from_raw_unchecked(s.family_id).write_family_id_ascii(&mut locus)?;
|
||||
write!(
|
||||
out,
|
||||
"obikmer_{}_{}\t{}\t",
|
||||
"obiskim_{}_{}\t{}\t",
|
||||
s.partition,
|
||||
s.layer,
|
||||
s.family_idx + 1
|
||||
@@ -258,7 +258,7 @@ mod tests {
|
||||
vec![site(0, 0, 4), site(0, 0, 9)],
|
||||
);
|
||||
let f = first_record(&a);
|
||||
assert_eq!(&f[..2], ["obikmer_0_0", "5"]);
|
||||
assert_eq!(&f[..2], ["obiskim_0_0", "5"]);
|
||||
assert_eq!(&f[3..5], ["G", "A"]);
|
||||
assert_eq!(&f[9..], ["1", "0", "0", ".", "."]);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ mod tests {
|
||||
a.write_vcf(&labels, false, &mut out).unwrap();
|
||||
let text = String::from_utf8(out).unwrap();
|
||||
let body: Vec<&str> = text.lines().filter(|l| !l.starts_with('#')).collect();
|
||||
assert!(body[0].starts_with("obikmer_0_2\t8\t"));
|
||||
assert!(body[1].starts_with("obikmer_1_0\t1\t"));
|
||||
assert!(body[0].starts_with("obiskim_0_2\t8\t"));
|
||||
assert!(body[1].starts_with("obiskim_1_0\t1\t"));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "obiskim"
|
||||
version = "1.4.8"
|
||||
version = "1.4.9"
|
||||
edition = "2024"
|
||||
license = "CECILL-2.1"
|
||||
repository = "https://forge.metabarcoding.org/obi/obiskim"
|
||||
|
||||
@@ -30,7 +30,7 @@ pub struct AlignArgs {
|
||||
/// Write the pseudo-alignment in VCF format
|
||||
///
|
||||
/// Writes `PREFIX_alignment.vcf`. Each scanned index layer is a contig
|
||||
/// named `obikmer_<partition>_<layer>`; `POS` is the position of the
|
||||
/// named `obiskim_<partition>_<layer>`; `POS` is the position of the
|
||||
/// family within the layer and `ID` is the masked canonical k-mer of the
|
||||
/// family. Implies --pseudo-alignment; can be combined with --fasta to
|
||||
/// get both formats.
|
||||
|
||||
@@ -25,10 +25,10 @@ use tracing::info;
|
||||
/// # How it is built
|
||||
///
|
||||
/// Each mode is one OS advisory file lock (`flock` on Unix, `LockFileEx` on
|
||||
/// Windows) on `.obikmer.lock`, so a crash releases it with no stale-lock
|
||||
/// Windows) on `.obiskim.lock`, so a crash releases it with no stale-lock
|
||||
/// cleanup. On top of that, **every transition** (acquire, release into
|
||||
/// another mode, promote, demote) happens while holding a *gate* — a second
|
||||
/// lock file, `.obikmer.gate`, taken for the length of one non-blocking
|
||||
/// lock file, `.obiskim.gate`, taken for the length of one non-blocking
|
||||
/// attempt and never while waiting. A blocked request therefore releases the
|
||||
/// gate, sleeps, and tries again (polling, 20 ms growing to 500 ms), instead
|
||||
/// of sleeping in the kernel while holding it. Because nobody else can touch
|
||||
@@ -51,9 +51,9 @@ pub enum LockMode {
|
||||
Exclusive,
|
||||
}
|
||||
|
||||
const LOCK_FILE: &str = ".obikmer.lock";
|
||||
const GATE_FILE: &str = ".obikmer.gate";
|
||||
const CLAIM_FILE: &str = ".obikmer.promote";
|
||||
const LOCK_FILE: &str = ".obiskim.lock";
|
||||
const GATE_FILE: &str = ".obiskim.gate";
|
||||
const CLAIM_FILE: &str = ".obiskim.promote";
|
||||
const POLL_MIN: Duration = Duration::from_millis(20);
|
||||
const POLL_MAX: Duration = Duration::from_millis(500);
|
||||
|
||||
@@ -172,7 +172,7 @@ impl DirLock {
|
||||
/// run in between and the caller must re-check what it relied on.
|
||||
///
|
||||
/// Gapless promotion is available to one promoter at a time (it holds
|
||||
/// `.obikmer.promote` while it waits for the other readers to leave).
|
||||
/// `.obiskim.promote` while it waits for the other readers to leave).
|
||||
/// A second concurrent promoter releases its shared lock instead — two
|
||||
/// promoters each keeping theirs while waiting for the other's would
|
||||
/// wait for ever. An exclusive lock is returned unchanged.
|
||||
|
||||
Reference in new issue
Block a user