Skip to content

Conversation

@gemenerik
Copy link
Member

This pull request introduces the ParamFileManager class, which is responsible for reading and writing parameter configurations from a file. This functionality is helpful for persisting parameter states across different sessions, allowing users to save, load and share parameter configurations as needed.

Key changes include:

  1. New ParamFileManager class: This class provides static methods for reading and writing parameter configurations to a file. It uses the YAML format for file storage, providing human-readable files and supporting complex data structures.

  2. Support for PersistentParamState objects: The write method of ParamFileManager supports PersistentParamState objects. It extracts the is_stored, default_value, and stored_value attributes of these objects and writes them to the file.

  3. Robust file reading: The read method of ParamFileManager includes checks for file type and version, raising exceptions if these fields are missing or unsupported. It also includes error handling for YAML parsing errors.

This implementation provides a solid foundation for parameter file management. Future work may include extending support to other parameter types, improving error handling, and integrating this functionality into the broader system.

@gemenerik gemenerik marked this pull request as ready for review March 14, 2024 14:54
@tobbeanton tobbeanton merged commit a77b402 into master Mar 25, 2024
@gemenerik gemenerik deleted the rik/persistentparameterfilestorage branch March 25, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants