ctreffe / alfred

Alfred - A library for rapid experiment development
MIT License
10 stars 1 forks source link

Add method set_additional_data() to the Experiment class #51

Closed ctreffe closed 3 years ago

ctreffe commented 4 years ago

Currently, users who wish to add data to the additional_data dictionary have to go through the experiment's data_manager and access add_aditional_data(). It would be much easier to work with additional data if we provided a method to access the dictionary directly from the Experiment object. Therefore, I propose that we add a new method set_additional_data() which links to the method within the DataManager class (see issue #49 regarding the proposed name of the new method).

ctreffe commented 4 years ago

Also, we should add a get_additional_data() method to the Experiment class. This would be a shortcut to find_experiment_data_by_uid() from the DataManager class.

jobrachem commented 3 years ago

In alfred3 v2.0, the additional data dictionary is available through:

It can be used just like any normal dictionary, using square-bracket syntax for accessing and setting values.