genesets route for local server (#2079)

* first cut at GET /genesets route

* update existing tests to match code changes

* more GET /genesets and initial tests

* add missing test fixture

* geneset validation accepts OTA format

* genesets route: better error handling, more tests

* lint
This commit is contained in:
Bruce Martin
2021-02-26 17:53:07 -08:00
committed by GitHub
parent 09466a5c32
commit f3a3820ffa
18 changed files with 813 additions and 82 deletions
+12
View File
@@ -144,6 +144,17 @@ class LayoutObsAPI(Resource):
return common_rest.layout_obs_put(request, data_adaptor)
class GenesetsAPI(Resource):
@rest_get_data_adaptor
def get(self, data_adaptor):
return common_rest.genesets_get(request, data_adaptor)
@requires_authentication
@rest_get_data_adaptor
def put(self, data_adaptor):
return common_rest.genesets_put(request, data_adaptor)
def get_api_base_resources(bp_base):
"""Add resources that are accessed from the api url"""
api = Api(bp_base)
@@ -169,6 +180,7 @@ def get_api_dataroot_resources(bp_dataroot):
add_resource(AnnotationsObsAPI, "/annotations/obs")
add_resource(AnnotationsVarAPI, "/annotations/var")
add_resource(DataVarAPI, "/data/var")
add_resource(GenesetsAPI, "/genesets")
# Display routes
add_resource(ColorsAPI, "/colors")
# Computation routes