mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 07:58:11 +08:00
GUI app (experimental) (#730)
* add default config * first pass * flake8 * cleanup * first pass at using qthreads * cleanup * WIP * better error handling * improved UI * bugfix * fix merge bugs * import order * cleanup * make gui requirements optional * pr review requested changes * Update server/gui/main.py Co-Authored-By: csweaver <charlottesweaver@gmail.com> * pr review request * qt child class methods -> camelCase * whitespace
This commit is contained in:
@@ -10,6 +10,7 @@ import click
|
||||
from server.app.app import Server
|
||||
from server.app.util.errors import ScanpyFileError
|
||||
from server.app.util.utils import custom_format_warning
|
||||
from server.utils.constants import MODES
|
||||
|
||||
|
||||
@click.command()
|
||||
@@ -17,7 +18,7 @@ from server.app.util.utils import custom_format_warning
|
||||
@click.option(
|
||||
"--layout",
|
||||
"-l",
|
||||
type=click.Choice(["umap", "tsne", "draw_graph_fa", "draw_graph_fr", "diffmap", "phate"]),
|
||||
type=click.Choice(MODES),
|
||||
default="umap",
|
||||
show_default=True,
|
||||
help="Method for layout."
|
||||
@@ -140,9 +141,8 @@ security risk by including the --scripts flag. Make sure you trust the scripts t
|
||||
# Import Flask app
|
||||
server = Server()
|
||||
|
||||
app = server.create_app()
|
||||
app.config.update(DATASET_TITLE=title)
|
||||
app.config.update(SCRIPTS=scripts)
|
||||
server.create_app()
|
||||
server.app.config.update(SCRIPTS=scripts)
|
||||
|
||||
if not verbose:
|
||||
log = logging.getLogger("werkzeug")
|
||||
@@ -167,7 +167,7 @@ security risk by including the --scripts flag. Make sure you trust the scripts t
|
||||
}
|
||||
|
||||
try:
|
||||
app.data = ScanpyEngine(data, args)
|
||||
server.attach_data(ScanpyEngine(data, args), title=title)
|
||||
except ScanpyFileError as e:
|
||||
raise click.ClickException(f"{e}")
|
||||
|
||||
@@ -183,4 +183,4 @@ security risk by including the --scripts flag. Make sure you trust the scripts t
|
||||
f = open(devnull, "w")
|
||||
sys.stdout = f
|
||||
|
||||
app.run(host=host, debug=debug, port=port, threaded=True)
|
||||
server.app.run(host=host, debug=debug, port=port, threaded=True)
|
||||
|
||||
Reference in New Issue
Block a user