polaris.provenance.write

polaris.provenance.write(work_dir, tasks, config=None, machine=None, baseline_dir=None)[source]

Write a file with provenance, such as the git version, conda packages, command, and tasks, to the work directory.

This function overwrites any existing provenance file in the work directory rather than appending, so the provenance reflects the most recent call to Polaris that used this work directory.

Parameters:
  • work_dir (str) – The path to the work directory where the tasks will be set up

  • tasks (dict) – A dictionary describing all of the tasks and their steps

  • config (polaris.config.PolarisConfigParser, optional) – Configuration options for this task, a combination of user configs and the defaults for the machine and component

  • machine (str, optional) – The machine on which Polaris is being run

  • baseline_dir (str, optional) – The path to the baseline work directory, if any