Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 73772ea

Browse files
committed
Integrating Anil's review including large extension of the create_acc testsuite and refactoring ACC/JSON exporter, rename output_acc to write_acc and make it a method of cell models
1 parent 4148974 commit 73772ea

33 files changed

+39393
-485
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ We are providing support using a chat channel on `Gitter <https://gitter.im/Blue
107107

108108
News
109109
====
110+
- 2022/10/31: BluePyOpt now supports Arbor simulator.
110111
- 2021/08/30: BluePyOpt dropped Python 2.7 support.
111112
- 2017/01/04: BluePyOpt is now considered compatible with Python 3.6+.
112113
- 2016/11/10: BluePyOpt now supports NEURON point processes. This means we can fit parameters of Adex/GIF/Izhikevich models, and also synapse models.
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'''Dependencies of Arbor simulator backend'''
2+
13
try:
24
import arbor
35
except ImportError as e:
@@ -13,15 +15,17 @@ def __getattribute__(self, _):
1315
class ArbLabel:
1416
"""Arbor label"""
1517

16-
def __init__(self, type, name, defn):
18+
def __init__(self, type, name, s_expr):
19+
if type not in ['locset', 'region', 'iexpr']:
20+
raise ValueError('Invalid Arbor label type %s' % type)
1721
self._type = type
1822
self._name = name
19-
self._defn = defn
23+
self._s_expr = s_expr
2024

2125
@property
2226
def defn(self):
2327
"""Label definition for label-dict"""
24-
return '(%s-def "%s" %s)' % (self._type, self._name, self._defn)
28+
return '(%s-def "%s" %s)' % (self._type, self._name, self._s_expr)
2529

2630
@property
2731
def ref(self):
@@ -35,11 +39,19 @@ def name(self):
3539

3640
@property
3741
def loc(self):
38-
"""Expression defining the location of the label"""
39-
return self._defn
42+
"""S-expression defining the location of the label"""
43+
return self._s_expr
4044

4145
def __eq__(self, other):
42-
return self.defn == other.defn
46+
if other is None:
47+
return False
48+
elif not isinstance(other, ArbLabel):
49+
raise TypeError('%s is not an ArbLabel' % str(other))
50+
else:
51+
return self._s_expr == other._s_expr
4352

4453
def __hash__(self):
45-
return hash(self.defn)
54+
return hash(self._s_expr)
55+
56+
def __repr__(self):
57+
return self.defn

0 commit comments

Comments
 (0)