mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-04 12:18:12 +08:00
Improve hosted cellxgene (#1234)
* Improve hosted cellxgene - option to turn off the test index page, or supply a page for redirect. For EB, The default is to return 404. For cli launch, the default is the test page. - option to select which matrix types are allowed for multi dataset servers. For EB, The default is CXG only. For cli launch, the default is any matrix type. - Return early with an error response if diffexp is requested when not configured - Verified that reembedings and user annotations also return with an error response if used when not enabled. TODO: The new options cannot currently be set by the user. I plan to add a configuration file where these and all other settings can be set. Fixes #1210 Fixes #1228 Fixes #1229
This commit is contained in:
@@ -35,6 +35,15 @@ class AppConfig(object):
|
||||
self.enable_reembedding = False
|
||||
self.anndata_backed = False
|
||||
|
||||
# The index page when in multi-dataset mode:
|
||||
# False or None: this returns a 404 code
|
||||
# True: loads a test index page, which links to the datasets that are available in the dataroot
|
||||
# string/URL: redirect to this URL: flask.redirect(config.multi_dataset_index)
|
||||
self.multi_dataset_index = False
|
||||
|
||||
# A list of allowed matrix types. If an empty list, then all matrix types are allowed
|
||||
self.multi_dataset_allowed_matrix_type = []
|
||||
|
||||
# TODO these options may not apply to all datasets in the multi dataset.
|
||||
# may need to invent a way to associate these config parameters with
|
||||
# specific datasets.
|
||||
@@ -58,12 +67,13 @@ class AppConfig(object):
|
||||
"anndata_backed",
|
||||
"disable_diffexp",
|
||||
"enable_reembedding",
|
||||
"multi_dataset_index",
|
||||
"multi_dataset_allowed_matrix_type",
|
||||
]
|
||||
|
||||
self.update(inputs, kw)
|
||||
|
||||
def update(self, inputs, kw):
|
||||
|
||||
for k, v in kw.items():
|
||||
if k in inputs:
|
||||
setattr(self, k, v)
|
||||
|
||||
Reference in New Issue
Block a user