ndexbio / ndex2-client

NDEx2 Client
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Need safe wrapper for set_network_properties #70

Closed coleslaw481 closed 3 years ago

coleslaw481 commented 4 years ago

Copy of JIRA issue UD-209

I think we need to provide a "safe" wrapper for the set_network_properties(network_id, network_properties) method like the one that I wrote a few weeks ago. The raw method is very hard to use correctly AND creates confusing bugs... this is an accident waiting to happen where somebody using the client can easily mess up a network pretty badly...

coleslaw481 commented 3 years ago

To make this method safer, the new version should only accept dict objects and then check data being set to verify it conforms NDEx specifications. Also method should catch cases where user attempts to update name, description, or version and forbid it by raising an Exception. Since this is a breaking change. Bumping to 4.0.0 milestone