Skip to main content

Crate dspk_hub

Crate dspk_hub 

Source
Expand description

Verified download and local cache of published artifacts: data files and model weights that dspk crates use but do not ship (licences, size).

  • Artifact: what to fetch — id, family, file name, URI (hf://, gh://, zenodo://, https://, file://, see providers), expected SHA-256 and size.
  • Hub: Hub::pull downloads into the HubCache and verifies hash and size before the file is committed (an artifact without a hash is refused); Hub::status reads the cache index; Hub::verify re-hashes.
  • catalog: which artifacts exist, where they come from and whom to credit, as data only. Each domain is a feature (synapse: electrophysiology artifacts such as Kilosort4’s universal templates); pull fetches a catalog entry by id.

The crate depends on no other dspk crate: the catalogs describe files, the crates that read them (sorters, models) live elsewhere. All network access of the workspace’s libraries is here.

Re-exports§

pub use cache::ArtifactStatus;
pub use cache::CachedArtifactRecord;
pub use cache::HubCache;
pub use cache::HubCacheIndex;
pub use cache::compute_file_sha256;
pub use catalog::Catalog;
pub use catalog::CatalogEntry;
pub use catalog::Credit;
pub use catalog::CreditCode;
pub use catalog::CreditPaper;
pub use download::DownloadOutcome;
pub use download::RemoteLinkCheck;
pub use download::download_and_verify;
pub use providers::ProviderKind;
pub use providers::resolve_gh_uri;
pub use providers::resolve_hf_uri;
pub use providers::resolve_weights_uri;
pub use providers::resolve_zenodo_uri;

Modules§

cache
Local cache of downloaded artifacts (~/.cache/dspk/hub/ or DSPK_HUB_DIR): models/<family>/<slug>/<file> plus an index.json recording each installed file’s hash and size, so status checks never re-read the files (HubCache::verify does).
catalog
Catalogs of published artifacts, as data: what each file is, where it is downloaded from, how it is verified (SHA-256, size) and whom to credit.
download
Model weight downloader with streaming SHA-256 verification and remote link inspection.
providers
URI resolvers converting shorthand provider URIs (hf://, gh://, zenodo://, https://, file://) into direct downloadable URLs.

Structs§

Artifact
A published file to fetch and verify.
ArtifactReport
Local state and integrity of one artifact.
Hub
Downloads into and reads from a HubCache.

Functions§

pull
Downloads (unless installed) and verifies catalog entry id of Catalog::load_default into the default cache (Hub::from_env_or_default), returning its local path.