ProtoLife / daptics-api

API documentation and clients for the daptics.ai design of experiments engine
https://daptics.ai
GNU General Public License v3.0
1 stars 1 forks source link

Make daptics.options a property (non-destructive setter) #51

Closed pzingg closed 2 months ago

pzingg commented 2 months ago

Changed the DapticsClient.options instance variable into a @property. Setting the options property to a dict value makes sure to only update the internal _options dict, and discards any keys not in the internal _options dictionary created on __init__. Also added set_options and set_option methods to give an alternate way to update options. Updated test_login.py to explain the three ways to set options.

Resolves #50

nhpackard commented 2 months ago

Seems to fix the KeyError generated by clobbering of options.

Still has version error not yet fixed on this branch.