Utilities
The bioverse.utilities package provides shared infrastructure used across
adapters, datasets, benchmarks, and transforms:
Configuration (
bioverse.utilities.config) — default paths (dataset_path,raw_path,benchmarks_path), random seed, worker count, and scratch storage. Override via environment variables such asBIOVERSE_ROOT.I/O (
bioverse.utilities.io) — shard serialization, parallel processing helpers, logging utilities, and theIteratorWithLengthwrapper used throughout the loader pipeline.Arrays & geometry (
bioverse.utilities.array,bioverse.utilities.geometry,bioverse.utilities.align) — Awkward Array helpers, structural alignment, and coordinate math.Constants & requirements — shared enumerations and optional-dependency checks.
Most users interact with utilities indirectly through config paths and the CLI. Extension authors may import these modules when building custom adapters or transforms.
- class bioverse.utilities.io.IteratorWithLength(iterator: Iterator, length: int | None = None)[source]
Bases:
IteratorIterator wrapper that exposes
__len__for progress tracking.
- class bioverse.utilities.io.LRUCache(size: int = 5)[source]
Bases:
OrderedDictLeast-recently-used cache for shard loading.