From 119e3c0876fc1ee95f1316cbf841f85cc98c369f Mon Sep 17 00:00:00 2001 From: Arie Matsliah Date: Wed, 14 Feb 2024 08:24:28 -0500 Subject: [PATCH] Update unit tests --- codex/blueprints/app.py | 8 +++++- codex/data/structured_search_filters.py | 12 ++++----- tests/unit/test_neuron_data.py | 34 ++++++++++++------------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/codex/blueprints/app.py b/codex/blueprints/app.py index e2ffc455..cf9fddb8 100644 --- a/codex/blueprints/app.py +++ b/codex/blueprints/app.py @@ -75,7 +75,13 @@ def stats(): whole_word = request.args.get("whole_word", 0, type=int) logger.info(f"Generating stats {activity_suffix(filter_string, data_version)}") - (filtered_root_id_list, num_items, hint, data_stats, data_charts,) = stats_cached( + ( + filtered_root_id_list, + num_items, + hint, + data_stats, + data_charts, + ) = stats_cached( filter_string=filter_string, data_version=data_version, case_sensitive=case_sensitive, diff --git a/codex/data/structured_search_filters.py b/codex/data/structured_search_filters.py index 09932281..1258c4f5 100644 --- a/codex/data/structured_search_filters.py +++ b/codex/data/structured_search_filters.py @@ -146,9 +146,9 @@ def __init__( "hygrosensory", "ocellar", "LHCENT", - "pars intercerebralis", + "pars_intercerebralis", "thermosensory", - "pars lateralis", + "pars_lateralis", "ALIN", "ALON", "MBIN", @@ -160,15 +160,15 @@ def __init__( name="sub_class", value_range=[ "columnar", - "eye bristle", + "eye_bristle", "tangential", "multiglomerular", "auditory", - "head bristle", + "head_bristle", "uniglomerular", - "ring neuron", + "ring_neuron", "ocellar", - "taste peg", + "taste_peg", "pharyngeal_nerve_sensory_group2", "accessory_pharyngeal_nerve_sensory_group2", "accessory_pharyngeal_nerve_sensory_group1", diff --git a/tests/unit/test_neuron_data.py b/tests/unit/test_neuron_data.py index ebfc2bef..de9e74ef 100644 --- a/tests/unit/test_neuron_data.py +++ b/tests/unit/test_neuron_data.py @@ -75,13 +75,13 @@ def check_num_values_missing(attrib, expected_count): "output_cells": 7000, "output_neuropils": 7000, "output_synapses": 7000, - "nt_type": 13000, - "nt_type_score": 10000, - "ach_avg": 4200, + "nt_type": 15000, + "nt_type_score": 15000, + "ach_avg": 7200, "da_avg": 15500, "gaba_avg": 11000, "glut_avg": 12000, - "oct_avg": 37000, + "oct_avg": 39000, "ser_avg": 68000, "similar_cell_scores": 20000, "similar_connectivity_scores": 20000, @@ -416,8 +416,8 @@ def test_classes(self): "ocellar", "olfactory", "optic_lobes", - "pars intercerebralis", - "pars lateralis", + "pars_intercerebralis", + "pars_lateralis", "thermosensory", "unknown_sensory", "visual", @@ -447,16 +447,16 @@ def test_sub_classes(self): "auditory", "columnar", "descending", - "eye bristle", - "head bristle", + "eye_bristle", + "head_bristle", "multiglomerular", "ocellar", "ocellar_interneuron", "pharyngeal_nerve_sensory_group1", "pharyngeal_nerve_sensory_group2", - "ring neuron", + "ring_neuron", "tangential", - "taste peg", + "taste_peg", "uniglomerular", ] self.assertEqual(expected_list, self.neuron_db.unique_values("sub_class")) @@ -468,7 +468,7 @@ def test_cell_types(self): ) def test_hemibrain_types(self): - expected_list_length = 3231 + expected_list_length = 3229 self.assertEqual( expected_list_length, len(self.neuron_db.unique_values("hemibrain_type")) ) @@ -846,9 +846,9 @@ def test_dynamic_ranges(self): "hygrosensory", "ocellar", "LHCENT", - "pars intercerebralis", + "pars_intercerebralis", "thermosensory", - "pars lateralis", + "pars_lateralis", "ALIN", "ALON", "MBIN", @@ -869,15 +869,15 @@ def test_dynamic_ranges(self): "data_side_range": ["right", "left", "center"], "data_sub_class_range": [ "columnar", - "eye bristle", + "eye_bristle", "tangential", "multiglomerular", "auditory", - "head bristle", + "head_bristle", "uniglomerular", - "ring neuron", + "ring_neuron", "ocellar", - "taste peg", + "taste_peg", "pharyngeal_nerve_sensory_group2", "accessory_pharyngeal_nerve_sensory_group2", "accessory_pharyngeal_nerve_sensory_group1",