Data folder and init¶
dpc_radar.local ¶
Where the library keeps its data on disk, and :func:init, which fills it.
The folder is, in this order:
- the one the caller passes;
$DATA_ROOT/dpc-radar:DATA_ROOTis the root shared with Limen and the other libraries of agent-engineering-studio, each in a folder of its own;$XDG_CACHE_HOME/dpc-radar, or~/.cache/dpc-radar.
Inside it:
merging/: the «Merging» frames, as :func:dpc_radar.archive.archivewrites them and :class:~dpc_radar.archive.MergingArchivereads them;it_dpc_sri/: the IT-DPC-SRI Zarr store, as :func:dpc_radar.history.mirrorwrites it and :class:~dpc_radar.history.SriHistoryreads it. About 51 GB: :func:initdownloads it only when asked.
InitReport
dataclass
¶
What one :func:init run did: the «Merging», and the history if it was asked.
default_directory ¶
default_directory() -> Path
The library's folder when the caller names none: see the module.
merging_directory ¶
merging_directory(directory: Path | None = None) -> Path
Where the «Merging» frames live, under directory or the default folder.
history_directory ¶
history_directory(directory: Path | None = None) -> Path
Where the IT-DPC-SRI store lives, under directory or the default folder.
init
async
¶
init(directory: Path | None = None, *, days: int = 2, history: bool = False, client: AsyncClient | None = None, retries: int = 3, concurrency: int = 32, now: datetime | None = None) -> InitReport
Download what the library needs to work offline into directory.
The «Merging» frames of the last days (about 35 MB a day) into
merging/; with history, the IT-DPC-SRI store (2010-2025, about
51 GB) into it_dpc_sri/, concurrency files at a time.
Safe to run again: a file on disk is not downloaded twice, and one the
source no longer has is written down and not asked again. Files are
written as .part and renamed. A file that fails is counted in the
report and retried on the next run; a disk that cannot be written raises.
client is used for every request and left open; retries=0 leaves
the retrying to the caller.