directory_creator module¶
Tools for the creation of directories.
- class gemseo.utils.directory_creator.DirectoryCreator(root_directory='', directory_naming_method=DirectoryNamingMethod.NUMBERED)[source]¶
Bases:
object
A class to create directories.
- Parameters:
root_directory (str | Path) –
The path to the root directory, wherein unique directories will be created. If empty, use the current working directory.
By default it is set to “”.
directory_naming_method (DirectoryNamingMethod) –
The method to create the directory names.
By default it is set to “NUMBERED”.
- class gemseo.utils.directory_creator.DirectoryNamingMethod(value)[source]¶
Bases:
StrEnum
The method to generate directory names.
- NUMBERED = 'NUMBERED'¶
The generated directories are named by an integer i+1, i+2, i+3 etc, where
i
is the maximum value of the already existing directories.
- UUID = 'UUID'¶
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 working directory. This is multi-process safe.