tracts.doc_utils.prepare_example_outputs_for_docs#

prepare_example_outputs_for_docs(output_dir_name, image_patterns=('*.png',), table_suffix='_optimal_parameters.txt')#

Copy example outputs into the matching Sphinx-Gallery output directory.

This helper is designed for documentation examples executed by Sphinx-Gallery. It assumes the current working directory is the example directory (e.g. example/3pops_sexbiased/ASW), which is the usual Sphinx-Gallery behavior.

Parameters:
  • output_dir_name (str) – Name of the local output directory generated by the example, e.g. "output_one_pulse".

  • image_patterns (Iterable[str]) – File patterns for images to copy.

  • table_suffix (str) – Suffix used to identify the optimal-parameters text file.

Returns:

Dictionary containing: - "destination_dir" - "table_file" if found

Return type:

dict[str, Path]