src/core/simulation/base_simulation.py
def validate_constants(cls, field_value: Union[str, Path, Constants]) -> Constants:
        """
        Validates the user-input constants value and transforms in case it's a filepath (str, Path).

        Args:
            field_value (Union[str, Path, Constants]): Value given by the user representing Constants.

        Raises:
            NotImplementedError: When the input value does not have any converter.

        Returns:
            Constants: Validated constants value.
        """
        if isinstance(field_value, Constants):
            return field_value
        if isinstance(field_value, str):
            field_value = Path(field_value)
        if isinstance(field_value, Path):
            return Constants.from_input_file(field_value)
        raise NotImplementedError(f"Validator not available for {type(field_value)}")

        Validates the user-input constants value and transforms in case it's a filepath (str, Path).

        Args:
            field_value (Union[str, Path, Constants]): Value given by the user representing Constants.

        Raises:
            NotImplementedError: When the input value does not have any converter.

        Returns:
            Constants: Validated constants value.
        
Validates the user-input constants value and transforms in case it's a filepath (str, Path).
Validates the user - input constants value and transforms in case it ' s a filepath ( str Path ) .
def validate_constants(cls, field_value: Union[str, Path, Constants]) -> Constants:
        if isinstance(field_value, Constants):
            return field_value
        if isinstance(field_value, str):
            field_value = Path(field_value)
        if isinstance(field_value, Path):
            return Constants.from_input_file(field_value)
        raise NotImplementedError(f"Validator not available for {type(field_value)}")
def validate_constants ( cls , field_value : Union [ str , Path , Constants ] ) -> Constants : if isinstance ( field_value , Constants ) : return field_value if isinstance ( field_value , str ) : field_value = Path ( field_value ) if isinstance ( field_value , Path ) : return Constants . from_input_file ( field_value ) raise NotImplementedError ( f"Validator not available for {type(field_value)}" )
Validates the user-input constants value and transforms in case it's a filepath (str, Path).
Validates the user - input constants value and transforms in case it ' s a filepath ( str Path ) .
"""
        Validates the user-input constants value and transforms in case it's a filepath (str, Path).

        Args:
            field_value (Union[str, Path, Constants]): Value given by the user representing Constants.

        Raises:
            NotImplementedError: When the input value does not have any converter.

        Returns:
            Constants: Validated constants value.
        """
Validated constants value.
Validated constants value .
Constants
When the input value does not have any converter.
When the input value does not have any converter .
NotImplementedError
cls
field_value
Union[str, Path, Constants]
Value given by the user representing Constants.
Value given by the user representing Constants .