neurodata / ndstore

code for storing neurodata images and image annotations
http://neurodata.io
Apache License 2.0
38 stars 12 forks source link

[ingest]: getProjDB argument #370

Closed alexbaden closed 8 years ago

alexbaden commented 8 years ago

Looks like getProjDB expects the token for a project, not the project name...

(from ndproj/ndproject.py)

class NDProject:

  def __init__(self, token_name ) : 

In webservices/ndwsingest.py, there are a few instances where the getProjDB method is called...

  def getProjDB(project_name):
    """Return a the kvengine object"""

    pr = NDProject(project_name)

There's a bit of obfuscation, but I believe the project object always operates on token, not project name.

@kunallillaney can you confirm? If so, let's merge this, fix the rest of the issues in web services, and write a test that uses a project with a non-matching token (which is where this issue came up).

@Aeusman I think you wrote the ndwsingest code, right? Wanna take a look and confirm I didn't mess any of your stuff up?

Thanks!

kunallillaney commented 8 years ago

@alexbaden "I believe the project object always operates on token, not project name" is incorrect. You can fetch a project object based on the project name or the token name aka it has 2 constructors. @Aeusman did not write any of this code. This is all me and that is meant to be that way for a reason and is tested. This code is part of creating channels via RESTful interfaces.

alexbaden commented 8 years ago

https://github.com/neurodata/ndstore/issues/371

kunallillaney commented 8 years ago

Issue has been fixed and pushed. Tests have been updates as a proof of concept.