refactor: rename obikmer to obiskim

Rename the `obikmer` binary, crate, and documentation to `obiskim`. This change updates all references in source code, build scripts, CI workflows, and user documentation to reflect the new tool name.

- Move `src/obikmer` to `src/obiskim`, renaming the package and binary in `Cargo.toml` and updating `main.rs` and `cli.rs` to use the new name.
- Update `src/Cargo.toml` and `src/Cargo.lock` to replace the `obikmer` workspace member with `obiskim`.
- Update `Makefile` targets (`build`, `release`, `debug`, `profile-build`) and variables (`CARGO_TOML`, `bump-version`) to build and manage `obiskim`.
- Update `.gitea/workflows/release.yml` to build and upload `obiskim` artifacts for Linux and macOS.
- Rename all files in `src/obiskim/src/cmd/` from `obikmer` to `obiskim` paths, updating error messages and help text in `index/mod.rs`, `phylo/args/mod.rs`, and `phylo/tnt.rs`.
- Update documentation in `UserDocMD/` (including `index.md`, `installation.md`, `architecture.md`, and usage guides) to reference `obiskim` commands and behavior.
- Update `benchmark/` scripts and Python verification tools to use `obiskim` binary paths and arguments.
- Update `scripts/` (including `smoke_test_*.sh`, `bench_merge_oracle.sh`, and Docker debug scripts) to test and build `obiskim`.
- Update comments and error messages in library crates (`obicompactvec`, `obifastwrite`, `obikentropy`, `obikfilter`, `obikindex`, `obikindexer`, `obikphylo`, `obikselect`, `obikseq`, `obiread`, `obisys`) to reference `obiskim`.
This commit is contained in:
Eric Coissac committed 2026-12-01 18:15:13 +01:00
1 parent a71e59d6f0
commit 42d5b881ec
106 files changed
+223 -223

No files matched your search

+12 -12
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# smoke_test_index.sh — end-to-end smoke test of `obikmer index` + `obikmer query`
# smoke_test_index.sh — end-to-end smoke test of `obiskim index` + `obiskim query`
#
# The unit/integration test suite never exercises obikmer's real,
# The unit/integration test suite never exercises obiskim's real,
# file-driven CLI path (every test builds indexes by calling library APIs
# directly — see DevDocMD/implementation/partition_layer_cache.md, "(3)
# done"/"(6) done": a green `cargo test --workspace` has twice missed a
@@ -9,14 +9,14 @@
# substitute for hand-rolling that check each time.
#
# What it does:
# 1. builds `obikmer` (debug, via `cargo run`)
# 1. builds `obiskim` (debug, via `cargo run`)
# 2. generates a small deterministic random FASTA
# 3. runs `obikmer index` on it
# 3. runs `obiskim index` on it
# 4. picks a real k-mer from the source sequence, avoiding low-complexity
# substrings (a homopolymer run tripped up an earlier manual run of
# this check — it gets rejected by query's own entropy filter, which
# looks like a bug but isn't one)
# 5. runs `obikmer query` and checks the k-mer round-trips
# 5. runs `obiskim query` and checks the k-mer round-trips
# 6. prints total-kmers-indexed and a clear PASS/FAIL, exit code matches
#
# Usage:
@@ -74,12 +74,12 @@ EOF
# ── 2. build + run index ────────────────────────────────────────────────────
cd "$REPO_ROOT/src"
INDEX_LOG="$WORK/index.log"
if ! cargo run -q -p obikmer --bin obikmer -- \
if ! cargo run -q -p obiskim --bin obiskim -- \
index -k "$K" -m "$M" --theta 0 -p "$PARTITIONS" \
-o "$WORK/out.idx" "$WORK/test.fasta" > "$INDEX_LOG" 2>&1
then
cat "$INDEX_LOG" >&2
fail "obikmer index exited non-zero"
fail "obiskim index exited non-zero"
fi
N_KMERS="$(grep -o '[0-9]* total kmers indexed' "$INDEX_LOG" | grep -o '^[0-9]*' || true)"
@@ -108,11 +108,11 @@ QUERY_LOG="$WORK/query.log"
FOUND=0
for QUERY_KMER in "${CANDIDATES[@]}"; do
printf ">q1\n%s\n" "$QUERY_KMER" > "$WORK/query.fasta"
if ! cargo run -q -p obikmer --bin obikmer -- \
if ! cargo run -q -p obiskim --bin obiskim -- \
query "$WORK/out.idx" "$WORK/query.fasta" > "$QUERY_LOG" 2>&1
then
cat "$QUERY_LOG" >&2
fail "obikmer query exited non-zero"
fail "obiskim query exited non-zero"
fi
if grep -q '"kmer_count":1' "$QUERY_LOG"; then
FOUND=1
@@ -129,12 +129,12 @@ fi
# them empty (no layer 0 on disk) — must still build; (b) an NCBI-style
# `.fna.gz` name must be read, not silently skipped (it used to be
# taken for a directory and ignored, yielding an empty index).
count_kmers() { # $1 = output index dir, rest = obikmer index args
count_kmers() { # $1 = output index dir, rest = obiskim index args
local out="$1"; shift
local log="$WORK/regress.log"
( cd "$REPO_ROOT/src" && cargo run -q -p obikmer --bin obikmer -- \
( cd "$REPO_ROOT/src" && cargo run -q -p obiskim --bin obiskim -- \
index -k "$K" -m "$M" --theta 0 -o "$out" "$@" ) > "$log" 2>&1 \
|| { cat "$log" >&2; fail "obikmer index $* exited non-zero"; }
|| { cat "$log" >&2; fail "obiskim index $* exited non-zero"; }
grep -o '[0-9]* total kmers indexed' "$log" | grep -o '^[0-9]*' || echo 0
}