gemseo.utils.name_generator module#
Tool to generate names.
- class NameGenerator(naming_method=Naming.NUMBERED)[source]#
Bases:
BaseNameGenerator
A class to generate names.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
naming_method (Naming) --
The method to create the names.
By default it is set to "NUMBERED".
- generate_name()#
Generate a name.
If the
naming_method
strategy isNUMBERED
, the successive names are generated by an integer 1, 2, 3 etc. 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 working directory, since it is multiprocess safe.- Returns:
A name.
- Return type:
str | None