SavedSettings#
- class stellarphot.settings.SavedSettings(_testing_path=None, _create_path=True)[source]#
Bases:
objectHandle loading and saving of settings files from disk.
- Parameters:
- _testing_pathPath, optional
Path to use for testing purposes. If not provided, the default path is used.
- _create_pathbool, optional
If True, the directory where settings files are stored is created if it does not exist. If False, the directory is not created, which is useful for testing.
Attributes Summary
Cameras stored in the settings.
Observatories stored in the settings.
Passband maps stored in the settings.
Path to the directory where settings files are stored.
Methods Summary
add_item(item)Add an item to the settings.
delete([confirm, delete_settings_folder])Delete all settings files.
delete_item(item[, confirm])Delete an item from the settings.
get_items(item_type)Get the items of a given type.
Attributes Documentation
- cameras#
Cameras stored in the settings.
- observatories#
Observatories stored in the settings.
- passband_maps#
Passband maps stored in the settings.
- settings_path#
Path to the directory where settings files are stored.
Methods Documentation
- add_item(item)[source]#
Add an item to the settings.
- Parameters:
- itemCamera | Observatory | PassbandMap
The item to add.
- delete(confirm=False, delete_settings_folder=False)[source]#
Delete all settings files.
- Parameters:
- confirmbool, optional
If True, the files are deleted. If False, a ValueError is raised.
- delete_settings_folderbool, optional
If True, the directory where settings files are stored is deleted. If False, only the settings files are deleted.