romainbrette / holypipette

Holy Pipette
GNU General Public License v3.0
4 stars 0 forks source link

Configuration management #18

Open romainbrette opened 7 years ago

romainbrette commented 7 years ago

We need to be able to save/load configuration. This includes hardware configuration and calibration.

A simple organization would be that each configurable object (calibratedunit etc) should have a save/load method which would output a dictionary of variables, that a global method would then insert in a configuration file.

Perhaps the config file could take the form of Python code? (the initialization script)

romainbrette commented 6 years ago

As a starting point, each relevant object could have save_configuration and load_configuration methods, which would simply provide and load from a dictionary.

romainbrette commented 6 years ago

Proposition above is implemented. Now we should move this to an actual text config file.

romainbrette commented 6 years ago

One issue: the program is also saving images (of pipette).

romainbrette commented 3 years ago

Currently we use pickle on config_manipulator.cfg in the home folder. This should be moved to yaml, and we should make a special folder, so that we can also save images. The problem is the dictionary actually stores the images. So instead the images should be moved to a folder, so there's some reorganization to do.

romainbrette commented 3 years ago

Each relevant object (stage, units, microscope) has a save_configuration method. Then saving to file is done in the interface, but there is no general system. load_configuration is called at initialization, through the connect method. The file name can be passed to the interface.