emodpy_hiv.plotting.helpers module#

emodpy_hiv.plotting.helpers.get_filenames(dir_or_filename: str, file_prefix: str, file_extension: str | None = None)[source]#

Get a list of filenames from a directory or a single file. If a directory is provided, it will list all files in that directory and in any subdirectory. If a file is provided, it will check if it matches the prefix and extension.

This should handle the situation where the user provides a directory that only contains a list of files, say from emodpy_workflow’s download command. This should also plot the files in a directory that contains subdirectories created by the DownloadAnalyzer where each subdirectory contains the reports from a simulation. Finally, this should also handle getting all of the files in a suite or experiment directory created when using SLURM or Container platform for the running of EMOD - the actual directories where the simulations are run.

Parameters:
  • dir_or_filename (string, required) – Directory or filename to search.

  • file_prefix (string, required) – Prefix to filter files by.

  • file_extension (string, optional) – Extension to filter files by.

Returns:

List of filenames that match the criteria.