gemseo.post.base_post_settings module#
Settings for post-processing.
- Settings BasePostSettings(*, save=True, show=False, file_path='', directory_path='', file_name='', file_extension='', fig_size=(11.0, 11.0))[source]#
Bases:
BaseModel
The settings common to all the post-processing classes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
save (bool) --
By default it is set to True.
show (bool) --
By default it is set to False.
-
By default it is set to "".
directory_path (Path | str) --
By default it is set to "".
file_name (str) --
By default it is set to "".
file_extension (str) --
By default it is set to "".
fig_size (tuple[Annotated[float, Gt(gt=0)], Annotated[float, Gt(gt=0)]]) --
By default it is set to (11.0, 11.0).
- Return type:
None
- directory_path: Path | str = ''#
The path of the directory to save the figures. If empty, use the current working directory.
- fig_size: tuple[PositiveFloat, PositiveFloat] = (11.0, 11.0)#
The width and height of the figure in inches, e.g. (w, h).
- file_extension: str = ''#
A file extension, e.g. 'png', 'pdf', 'svg', ... If empty, use a default file extension.
- file_name: str = ''#
The name of the file to save the figures. If empty, use a default one generated by the post-processing.
- file_path: Path | str = ''#
The path of the file to save the figures. If the extension is missing, use
file_extension
. If empty, create a file path fromdirectory_path
,file_name
andfile_extension
.
- model_post_init(context, /)#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) -- The BaseModel instance.
context (Any) -- The context.
- Return type:
None