update
update(
self ,
progress: Literal[‘standard’, ‘basic’, None, False] = standard,
client: dascore.constants.ExecutorType | None[ExecutorType, None] = None,
paths: collections.abc.Sequence[collections.abc.Sequence[str | pathlib._local.Path[str, Path]], None] = None,
retry_unreadable: bool = False,
on_error: Literal[‘warn’, ‘raise’, ‘ignore’] = warn,
)-> ‘Self’
Updates the contents of the spool, return the updated spool.
Only root spools can update. Directory roots re-index, single-file roots rescan, and in-memory roots are already current. Derived spools raise; update their root and reapply the operations. Spools reading an index read-only (see spool) raise.
Parameters
| Parameter | Description |
|---|---|
| progress |
Controls the progress bar. “standard” produces the standard progress bar. “basic” is a simplified version with lower refresh rates, best for high-latency environments, and None (or False) disables the progress bar. |
| client |
Optional executor with an ordered map method. Directoryupdates scan batches of changed sources in its workers; index writes stay in the calling thread. None keeps scanning serial. The caller owns the executor and may reuse it across updates. Single-file and in-memory spools do not use it. |
| paths |
Files or directories inside a directory spool, absolute or relative to it. Only these are walked: new and changed sources under them are scanned and missing ones dropped, so naming newly written files (or the folder they land in) avoids walking the whole archive, and a new index can be built one folder at a time. A source moved out of them disappears until it is named or a full update runs; None, the default, walks everything and catches removals and moves elsewhere. Paths outside the spool, hidden, or inside an indexed source raise ValueError. An index DASCore rebuilt, or whose first update never finished, ignores paths with a warning and walks everything. Other spools ignore it. |
| retry_unreadable |
If True, a directory spool also rescans walked sources that gave no patches, whether no reader claimed them or their scan failed, so a reader fix takes effect. Otherwise these are rescanned only once they change. Other spools ignore it. |
| on_error |
What a directory spool does about a source that looks like fiber data but cannot be read (damaged, truncated, inaccessible, an unsupported version, or a reader error): “warn” (the default) skips it with a warning, “raise” raises a ScanError, and “ignore” skipsit silently. A raise leaves new and changed sources unrecorded, so the next update scans them again. Skipped sources are listed by get_unread_sources.Other spools ignore it. |
Process pools can parallelize HDF5 scans, whose h5py calls are serialized within one process. Reusing a pool avoids paying its startup cost on every update. Each worker opens its own sources and uses the configuration active when update was called. Warnings raised in a worker process, or in a thread where warning filters are context-local (free-threaded builds), are replayed in the caller so its filters apply; other threads warn directly under the process-wide filters. Missing optional dependencies are handled per batch, so an unreadable batch can raise even if other batches contain readable files. The caller is responsible for executor support and initialization. Use one writer and no concurrent readers while updating a directory spool.