Skip to content

Commit

Permalink
Minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Jul 26, 2023
1 parent 200200c commit e03f060
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
2 changes: 2 additions & 0 deletions neuroml/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

try:
import importlib.metadata

__version__ = importlib.metadata.version("libNeuroML")
except ImportError:
import importlib_metadata

__version__ = importlib_metadata.version("libNeuroML")

__version_info__: tuple = tuple(int(i) for i in __version__.split("."))
Expand Down
35 changes: 10 additions & 25 deletions neuroml/test/test_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,12 @@ def test_cell_methods2(self):
self.assertEqual(expected[sg.id], len(path_lengths_to_distal[sg.id]))

def test_adjacency_list(self):
"""test get_segment_adjacency_list method
"""
"""test get_segment_adjacency_list method"""
cells = ["Purk2M9s", "pyr_4_sym.cell"]

cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -214,12 +212,10 @@ def test_adjacency_list(self):
self.assertIn(5, adlist[1])

def test_cell_graph(self):
"""test get_graph method
"""
"""test get_graph method"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -238,14 +234,12 @@ def test_cell_graph(self):
print(graph)

def test_get_distance(self):
"""test distance method
"""
"""test distance method"""
cells = ["Purk2M9s", "pyr_4_sym.cell"]

cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -270,12 +264,10 @@ def test_get_distance(self):
print(all_distances)

def test_get_all_segments_at_distance(self):
"""test distance method
"""
"""test distance method"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -300,12 +292,10 @@ def test_get_all_segments_at_distance(self):
self.assertIn(3, list(adict.keys()))

def test_get_branching_points(self):
"""test get_branching_points
"""
"""test get_branching_points"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -327,12 +317,10 @@ def test_get_branching_points(self):
print(res)

def test_get_extremeties(self):
"""test get_extremeties
"""
"""test get_extremeties"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -356,12 +344,10 @@ def test_get_extremeties(self):
print(res)

def test_locate_segment(self):
"""test locate_segment method
"""
"""test locate_segment method"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand All @@ -377,15 +363,14 @@ def test_locate_segment(self):
self.assertEqual(acell.id, cell_name.split(".")[0])

res = acell.get_segment_location_info(4)
self.assertEqual("apical4", res['in_unbranched_segment_group'])
self.assertEqual(0, res['distance_from_segment_group_root'])
self.assertEqual("apical4", res["in_unbranched_segment_group"])
self.assertEqual(0, res["distance_from_segment_group_root"])

def test_get_morphology_root(self):
"""Test get_morphology_root method """
"""Test get_morphology_root method"""
cells = ["pyr_4_sym"]

for cell_name in cells:

local_path = "../examples/test_files/%s.cell.nml" % cell_name
if os.path.isfile(local_path):
test_file_path = local_path
Expand Down

0 comments on commit e03f060

Please sign in to comment.