arlmet.archives.SyncResult#

class arlmet.archives.SyncResult(downloaded=list(), adopted=list(), unchanged=list(), mismatched=list(), failed=list(), dry_run=False)[source]#

What Archive.sync() did, as lists of local file paths.

Variables:
  • downloaded (list[pathlib.Path]) – Files fetched this run and checked against NOAA’s MD5: the ones missing locally and the ones NOAA has corrected since they were checked (replaced in place).

  • adopted (list[pathlib.Path]) – Files already in the folder that were read this run (new to the manifest, or changed since it recorded them) and whose MD5 is NOAA’s.

  • unchanged (list[pathlib.Path]) – Files the manifest records as NOAA’s, with the size and modification time it recorded: not read.

  • mismatched (list[pathlib.Path]) – Files already in the folder whose MD5 is not NOAA’s (or that cannot be read). Reported on every run, from the manifest without reading them, and left alone until NOAA’s file changes.

  • failed (list[pathlib.Path]) – Files that could not be fetched or whose download did not match NOAA’s MD5. Nothing is left under these paths but what was there before (the reason is logged).

  • dry_run (bool) – True when nothing was changed. downloaded then lists what a real run would fetch, and adopted the files it would read and check; mismatched and failed are empty.

Examples

>>> from arlmet.archives import SyncResult
>>> SyncResult(dry_run=True)
SyncResult(downloaded=0, adopted=0, unchanged=0, mismatched=0, failed=0, dry_run=True)