Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arie-matsliah committed Feb 14, 2024
1 parent 3dbcb93 commit 119e3c0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
8 changes: 7 additions & 1 deletion codex/blueprints/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions codex/data/structured_search_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def __init__(
"hygrosensory",
"ocellar",
"LHCENT",
"pars intercerebralis",
"pars_intercerebralis",
"thermosensory",
"pars lateralis",
"pars_lateralis",
"ALIN",
"ALON",
"MBIN",
Expand All @@ -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",
Expand Down
34 changes: 17 additions & 17 deletions tests/unit/test_neuron_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -416,8 +416,8 @@ def test_classes(self):
"ocellar",
"olfactory",
"optic_lobes",
"pars intercerebralis",
"pars lateralis",
"pars_intercerebralis",
"pars_lateralis",
"thermosensory",
"unknown_sensory",
"visual",
Expand Down Expand Up @@ -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"))
Expand All @@ -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"))
)
Expand Down Expand Up @@ -846,9 +846,9 @@ def test_dynamic_ranges(self):
"hygrosensory",
"ocellar",
"LHCENT",
"pars intercerebralis",
"pars_intercerebralis",
"thermosensory",
"pars lateralis",
"pars_lateralis",
"ALIN",
"ALON",
"MBIN",
Expand All @@ -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",
Expand Down

0 comments on commit 119e3c0

Please sign in to comment.