ndexbio / ndex2-client

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

NiceCXNetwork.update_to() documentation says returning empty string instead of network URL #82

Closed coleslaw481 closed 3 years ago

coleslaw481 commented 3 years ago

For NiceCXNetwork.update_to() method, the documentation says the URL for the network is returned, but during invocation an empty string is returned. The swagger documentation for the REST call also states the url should be returned: http://openapi.ndextools.org/#/Network/put_network__networkid_

To replicate the issue:

from ndex2.nice_cx_network import NiceCXNetwork

ndexuser = 'REPLACE WITH NDEX USERNAME'
ndexpass = 'REPLACE WITH NDEX PASSWORD'

net = NiceCXNetwork()
net.set_name('hi')
net.create_node('foo')
net_url = net.upload_to(None, ndexuser, ndexpass)
net_id = net_url[net_url.rindex('/')+1:]

net.update_to(net_id, None, ndexuser, ndexpass)

Check if the issue is the REST server or the python code.

coleslaw481 commented 3 years ago

Messaged Jing to look into this on the NDEx server code

coleslaw481 commented 3 years ago

Jing said the method this call is using should NOT return anything. For this ticket, just update the documentation for the update_to() method to say call will return empty string

coleslaw481 commented 3 years ago

Fixed in branch3.4.0