From d5deb1579fea8db13b2805983c2c4831cd45cd9d Mon Sep 17 00:00:00 2001 From: Charlotte Weaver Date: Thu, 13 Jun 2019 15:45:43 -0700 Subject: [PATCH] [EASY] fix max-category-items (#813) * fix max-category-items * match default for max category items fe had 1000, be had 100 --- server/app/rest_api/rest.py | 2 +- server/cli/launch.py | 4 ++-- server/test/test_scanpy_engine.py | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/app/rest_api/rest.py b/server/app/rest_api/rest.py index b0a51067..aafe175a 100644 --- a/server/app/rest_api/rest.py +++ b/server/app/rest_api/rest.py @@ -63,7 +63,7 @@ class ConfigAPI(Resource): "dataset": current_app.config["DATASET_TITLE"], }, "parameters": { - "max_category_items": current_app.data.config["max_category_items"] + "max-category-items": current_app.data.config["max_category_items"] }, "library_versions": { "scanpy": pkg_resources.get_distribution("scanpy").version, diff --git a/server/cli/launch.py b/server/cli/launch.py index 8d2cf178..cf606364 100644 --- a/server/cli/launch.py +++ b/server/cli/launch.py @@ -62,10 +62,10 @@ BIG_FILE_SIZE_THRESHOLD = 100 * 2**20 # 100MB @click.option("--host", default="127.0.0.1", help="Host IP address") @click.option( "--max-category-items", - default=100, + default=1000, metavar="", show_default=True, - help="Limits the number of categorical annotation items displayed.", + help="Categories with more distinct values than this will not be displayed.", ) @click.option( "--diffexp-lfc-cutoff", diff --git a/server/test/test_scanpy_engine.py b/server/test/test_scanpy_engine.py index 3f917d4c..d793ff69 100644 --- a/server/test/test_scanpy_engine.py +++ b/server/test/test_scanpy_engine.py @@ -78,8 +78,6 @@ class EngineTest(unittest.TestCase): def test_schema(self): with open(path.join(path.dirname(__file__), "schema.json")) as fh: schema = json.load(fh) - print(schema) - print(self.data.schema) self.assertEqual(self.data.schema, schema) def test_schema_produces_error(self):