phenotypic.sdk_.store_publication_token#

phenotypic.sdk_.store_publication_token(store: Path, *, root_directory: HeldDirectory | None = None) → str | None[source]#

Return the root-last token for a PhenoTypic-published store.

PhenoTypic promotes an immutable store by replacing zarr.json last. Its root bytes and file identity therefore identify the complete generation without touching every chunk on GPFS. Inode and ctime close the gap where a byte-identical replacement preserves the old mtime. A generic third-party store has no such publication contract and returns None so the caller uses the conservative recursive snapshot fallback.

Parameters:
  • store (Path) – Published store path. Used for ordinary path-based inspection.

  • root_directory (HeldDirectory | None) – Optional held directory for the store root. When given, zarr.json is read through that held identity so a route can keep validation and serving bound to one directory generation.

Returns:

The publication token, or None when the protocol is not declared.

Return type:

str | None

Changed in version 0.19.0: root_dir_fd (a POSIX file descriptor) is replaced by root_directory, a held directory from phenotypic.sdk_._identity_io. Passing root_dir_fd now raises TypeError. The descriptor form could not be supported on Windows, where the store route needs the same identity binding.