populse_mia.data_manager.project_properties¶
Mia Saved Projects Module
This module provides the SavedProjects class, which manages the persistence and retrieval of user-saved projects in the Mia software. It handles the following operations:
Loading saved projects from a YAML configuration file (saved_projects.yml).
Adding, removing, and updating project paths in the configuration.
Serializing and saving the project list back to the YAML file.
The module ensures compatibility with multiple YAML parser versions and gracefully handles missing or corrupted configuration files by creating a default structure.
Classes
Handles all saved projects in the software. |
- class populse_mia.data_manager.project_properties.SavedProjects[source]¶
Bases:
objectHandles all saved projects in the software.
Contains:
Methods:
addSavedProject: Adds a new saved project.
loadSavedProjects: Loads saved projects from ‘saved_projects.yml’.
removeSavedProject: Removes a project from the config file.
saveSavedProjects: Saves projects to ‘saved_projects.yml’.
- addSavedProject(newPath)[source]¶
Adds a project path or moves it to the front if it exists.
- Parameters:
newPath – (str) Path of the new project.
- Returns:
(list) Updated project paths list.
- loadSavedProjects()[source]¶
Loads saved projects from ‘saved_projects.yml’, or creates a default file if missing.
- Returns:
(dict): Loaded project paths.