gemseo / utils

Hide inherited members

run_folder_manager module

Tools for unique run folder name generation.

class gemseo.utils.run_folder_manager.FoldersIter(value)

Bases: StrEnum

An enumeration.

class gemseo.utils.run_folder_manager.RunFolderManager(output_folder_basepath='', folders_iter=FoldersIter.NUMBERED)[source]

Bases: object

Class generating unique names for run folders.

  • output_folder_basepath (str | Path) –

    The path the root folder of the run folders. If "" is passed then use the current working directory.

    By default it is set to “”.

  • folders_iter (FoldersIter) –

    The type of unique identifiers for the output folders. If NUMBERED, the generated output folders will be f"output_folder_basepath{i+1}", where i is the maximum value of the already existing f"output_folder_basepath{i}" folders. Otherwise, a unique number based on the UUID function is generated. This last option shall be used if multiple MDO processes are run in the same work folder.

    By default it is set to “NUMBERED”.


Generate a unique folder path for the run folder.

Returns: A unique Path to be used as run folder.

Return type: