* add menu

* Added library versions to config

and tests

* add template version number
This commit is contained in:
Colin Megill
2019-03-06 11:56:46 -05:00
committed by GitHub
parent 68dfbcc2eb
commit a0f54b4871
3 changed files with 69 additions and 4 deletions
+5
View File
@@ -65,6 +65,11 @@ class ConfigAPI(Resource):
"parameters": {
"max_category_items": current_app.data.max_category_items
},
"library_versions": {
"scanpy": pkg_resources.get_distribution("scanpy").version,
"cellxgene": pkg_resources.get_distribution("cellxgene").version,
"anndata": pkg_resources.get_distribution("cellxgene").version
}
}
}
return make_response(jsonify(config), HTTPStatus.OK)
+1
View File
@@ -54,6 +54,7 @@ class EndPoints(unittest.TestCase):
self.assertEqual(result.status_code, HTTPStatus.OK)
self.assertEqual(result.headers["Content-Type"], "application/json")
result_data = result.json()
self.assertIn("library_versions", result_data["config"])
self.assertEqual(result_data["config"]["displayNames"]["dataset"], "pbmc3k")
self.assertEqual(len(result_data["config"]["features"]), 4)