cave.reader.base_reader module

class cave.reader.base_reader.BaseReader(folder, ta_exec_dir)[source]

Bases: object

Abstract base class to inherit reader from. Reader load necessary objects (scenario, runhistory, trajectory) from files for different formats.

Please note that it is strongly encouraged to build a converter (from BaseConverter ) instead of designing a new reader. Conversion aims to make it easy and feasible to quickly support new file-formats.

classmethod check_for_files(path)[source]
classmethod get_glob_file(folder, fn, raise_on_failure=True)[source]

If a file is not found in the expected path structure, we can check if it’s unique in the subfolders and if so, return it.


Create RunHistory-object from files.


Expects self.folder/scenario.txt with appropriately formatted scenario-information (


Create trajectory (list with dicts as entries)


Create validated runhistory from files, if available.