polaris.analysis.publish.publish
- polaris.analysis.publish.publish(fragment_filenames, output_path, logger=None, thumbnail_size=(320, 240), thumbnail_format='jpeg', thumbnail_quality=75)[source]
Publish every product the fragments describe into the staging tree
Products are published by symlink from the step that owns them, so that each file has exactly one owner, Polaris’s output checking continues to work, and the staging tree is a view rather than a second source of truth.
- Parameters:
fragment_filenames (list of str) – The manifest fragments to publish, one per step that makes products. Every such step writes one, empty if it made nothing, which is what lets a step declare them as inputs and have Polaris check them. A fragment that is not on disk is nonetheless reported here rather than raising, so that this is usable on a list nothing has checked; the
publishstep does not rely on it, since a declared input that is missing stops it before it runs.output_path (str) – The root of the staging tree
logger (logging.Logger, optional) – A logger for reporting what was published, which steps published nothing, and what was missing
thumbnail_size (tuple of int, optional) – The bounding box in pixels each thumbnail is scaled to fit inside
thumbnail_format ({'jpeg', 'webp'}, optional) – The format thumbnails are written in
thumbnail_quality (int, optional) – The compression quality of thumbnails, from 1 to 100
- Returns:
published (list of dict) – One entry per published product, as written to the merged manifest
missing (list of str) – The paths that are not on disk: first the fragments that were named but never written, then the files a fragment named. Both are reported rather than silently omitted, and neither appears in the merged manifest, which is what defines the published set. A fragment that was never written is only worth a message, since whoever called this may not have had it checked; a fragment that promised a file that is not there is worth a warning.