FolderProjectIo¶
- class glotaran.builtin.io.folder.folder_plugin.FolderProjectIo(format_name: str)[source]¶
Bases:
glotaran.io.interface.ProjectIoInterface
Project Io plugin to save result data to a folder.
There won’t be a serialization of the Result object, but simply a markdown summary output and the important data saved to files.
Initialize a Project IO plugin with the name of the format.
- Parameters
format_name (str) – Name of the supported format an instance uses.
Methods Summary
Create a Model instance from the specs defined in a file (NOT IMPLEMENTED).
Create a ParameterGroup instance from the specs defined in a file (NOT IMPLEMENTED).
Create a Result instance from the specs defined in a file (NOT IMPLEMENTED).
Create a Scheme instance from the specs defined in a file (NOT IMPLEMENTED).
Save a Model instance to a spec file (NOT IMPLEMENTED).
Save a ParameterGroup instance to a spec file (NOT IMPLEMENTED).
Save the result to a given folder.
Save a Scheme instance to a spec file (NOT IMPLEMENTED).
Methods Documentation
- load_model(file_name: str) → Model¶
Create a Model instance from the specs defined in a file (NOT IMPLEMENTED).
- load_parameters(file_name: str) → ParameterGroup¶
Create a ParameterGroup instance from the specs defined in a file (NOT IMPLEMENTED).
- Parameters
file_name (str) – File containing the parameter specs.
- Returns
ParameterGroup instance created from the file.
- Return type
- load_result(result_path: str) → Result¶
Create a Result instance from the specs defined in a file (NOT IMPLEMENTED).
- load_scheme(file_name: str) → Scheme¶
Create a Scheme instance from the specs defined in a file (NOT IMPLEMENTED).
- Parameters
file_name (str) – File containing the parameter specs.
- Returns
Scheme – Scheme instance created from the file.
.. # noqa (DAR202)
.. # noqa (DAR401)
- save_parameters(parameters: ParameterGroup, file_name: str)¶
Save a ParameterGroup instance to a spec file (NOT IMPLEMENTED).
- Parameters
parameters (ParameterGroup) – ParameterGroup instance to save to specs file.
file_name (str) – File to write the parameter specs to.
- save_result(result: Result, result_path: str) → list[str][source]¶
Save the result to a given folder.
Returns a list with paths of all saved items. The following files are saved: * result.md: The result with the model formatted as markdown text. * optimized_parameters.csv: The optimized parameter as csv file. * {dataset_label}.nc: The result data for each dataset as NetCDF file.
- Parameters
- Returns
List of file paths which were created.
- Return type
- Raises
ValueError – If
result_path
is a file.