perda.analyzer.run_collection_factory#

perda.analyzer.run_collection_factory.from_directory(directory, pattern='*.csv', recursive=False)[source]#

Build a RunCollection from every matching log file in a directory.

Parameters:
  • directory (Path | str) – Directory to scan.

  • pattern (str, optional) – Filename glob pattern to match. Default is “*.csv”.

  • recursive (bool, optional) – Search subdirectories as well. Default is False.

Returns:

Collection of the matching runs, ordered chronologically.

Return type:

RunCollection

Examples

>>> col = from_directory("csv_files", recursive=True)
perda.analyzer.run_collection_factory.from_paths(paths)[source]#

Build a RunCollection from an explicit list of log files.

Parameters:

paths (Sequence[Path | str]) – Paths to the log files. Duplicates are removed.

Returns:

Collection of the given runs, ordered chronologically.

Return type:

RunCollection

Examples

>>> col = from_paths(["logs/practice.csv", "logs/endurance.csv"])