The .BaseEnum class enables the specification of options which were previously defined using class attributes. It enables backward compatibility, as the user can either provide the Enum member or its name as a string. The conversion is then made implicitly.
- class gemseo.utils.base_enum.BaseEnum(value)[source]¶
A base Enum class that can be compared to strings.
- classmethod get_member_from_name(value)[source]¶
Return an Enum member from a name or a member.
This class method returns an Enum member either from the name of the member or the member itself. It enables backward compatibility with the use of class attributes for options.
- class gemseo.utils.base_enum.CallableEnum(value)[source]¶
Enum whose value is callable.
- class gemseo.utils.base_enum.CamelCaseEnum(value)[source]¶
Enum that are represented as the camel case of the key name.
- class gemseo.utils.base_enum.MetaEnum(cls, bases, classdict, **kwds)[source]¶
An enum metaclass to subclass the membership operator.
Return a type’s method resolution order.