Skip to content

Commit

Permalink
Merge pull request #14 from appukuttan-shailesh/master
Browse files Browse the repository at this point in the history
Two Fixes: Boolean as String changed; Valid values dict removed from API calls
  • Loading branch information
apdavison authored Apr 12, 2018
2 parents fab4cb2 + 762ea1a commit 031cf3b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hbp_validation_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _configure_app_collab(self, config_data):
"species":"",
"test_type":""
},
"only_if_new":"False",
"only_if_new":False,
"url":"https://validation-v1.brainsimulation.eu/parametersconfiguration-model-catalog/parametersconfigurationrest/"
}
"""
Expand Down Expand Up @@ -706,7 +706,7 @@ def add_test(self, name="", alias=None, version="", author="", species="",
test_data = locals()
test_data.pop("self")
code_data = {}
for key in ["version", "repository", "path"]:
for key in ["version", "repository", "path", "values"]:
code_data[key] = test_data.pop(key)

url = self.url + "/tests/?format=json"
Expand Down Expand Up @@ -808,7 +808,7 @@ def edit_test(self, name="", test_id="", alias=None, version="", author="",

id = test_id # as needed by API
test_data = locals()
for key in ["self", "test_id"]:
for key in ["self", "test_id", "values"]:
test_data.pop(key)

url = self.url + "/tests/?format=json"
Expand Down Expand Up @@ -1543,7 +1543,7 @@ def register_model(self, app_id="", name="", alias=None, author="", organization
>>> model = model_catalog.register_model(app_id="39968", name="Test Model - B2",
alias="Model-B2", author="Shailesh Appukuttan", organization="HBP-SP6",
private="False", cell_type="Granule Cell", model_type="Single Cell",
private=False, cell_type="Granule Cell", model_type="Single Cell",
brain_region="Basal Ganglia", species="Mouse (Mus musculus)",
description="This is a test entry")
Expand Down Expand Up @@ -1584,7 +1584,7 @@ def register_model(self, app_id="", name="", alias=None, author="", organization
private = str(private)

model_data = locals()
for key in ["self", "app_id", "instances", "images"]:
for key in ["self", "app_id", "instances", "images", "values"]:
model_data.pop(key)

url = self.url + "/models/?app_id="+app_id+"&format=json"
Expand All @@ -1601,7 +1601,7 @@ def register_model(self, app_id="", name="", alias=None, author="", organization
else:
raise Exception("Error in adding model. Response = " + str(response.json()))

def edit_model(self, model_id="", app_id="", name="", alias=None, author="", organization="", private="False",
def edit_model(self, model_id="", app_id="", name="", alias=None, author="", organization="", private=False,
cell_type="", model_type="", brain_region="", species="", description=""):
"""Edit an existing model on the model catalog.
Expand Down Expand Up @@ -1681,7 +1681,7 @@ def edit_model(self, model_id="", app_id="", name="", alias=None, author="", org

id = model_id # as needed by API
model_data = locals()
for key in ["self", "app_id", "model_id"]:
for key in ["self", "app_id", "model_id", "values"]:
model_data.pop(key)

url = self.url + "/models/?app_id="+app_id+"&format=json"
Expand Down

0 comments on commit 031cf3b

Please sign in to comment.