feat: add benchmark pipeline, expose APIs, and enforce strict paths
Introduces a Make-based orchestration for simulating, indexing, merging, filtering, and verifying k-mer counts and presence. Exposes internal builder and iterator APIs publicly, enforces mandatory leading slashes for predicate patterns, registers the `obitaxonomy` crate, and updates tooling configurations alongside documentation.
This commit is contained in:
1 parent
280ca1f5a3
commit
c694e1f2b0
42 files changed
+2585
-84
No files matched your search
@@ -49,6 +49,11 @@ impl MetaPred {
|
||||
if values.iter().any(|v| v.is_empty()) {
|
||||
return Err(format!("empty value in predicate: {s}"));
|
||||
}
|
||||
if matches!(op, PredOp::Matches | PredOp::NotMatches) {
|
||||
if let Some(v) = values.iter().find(|v| !v.starts_with('/')) {
|
||||
return Err(format!("path predicate value must start with '/': {v:?} in predicate: {s}"));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Self { key, op, values })
|
||||
}
|
||||
@@ -72,16 +77,12 @@ impl MetaPred {
|
||||
|
||||
/// True if `value` is equal to `pattern` or is a descendant of it in a `/`-separated hierarchy.
|
||||
///
|
||||
/// - Absolute pattern (`/a/b`): `value` must start with `/a/b` at a segment boundary.
|
||||
/// - Bare segment (`b`): `value` must contain `b` as an exact segment anywhere.
|
||||
/// Both `value` and `pattern` must start with `/`.
|
||||
/// `value` matches if it equals `pattern` exactly or starts with `pattern` followed by `/`.
|
||||
fn path_matches(value: &str, pattern: &str) -> bool {
|
||||
if pattern.starts_with('/') {
|
||||
value == pattern
|
||||
|| (value.starts_with(pattern)
|
||||
&& value[pattern.len()..].starts_with('/'))
|
||||
} else {
|
||||
value.split('/').any(|seg| seg == pattern)
|
||||
}
|
||||
value == pattern
|
||||
|| (value.starts_with(pattern)
|
||||
&& value[pattern.len()..].starts_with('/'))
|
||||
}
|
||||
|
||||
// ── Three-value group evaluation ──────────────────────────────────────────────
|
||||
|
||||
Reference in new issue
Block a user