Skip to content

Commit 835235e

Browse files
authoredApr 22, 2021
Fix merge conflicts in models.backends
1 parent 15ab9e5 commit 835235e

File tree

1 file changed

+7
-42
lines changed

1 file changed

+7
-42
lines changed
 

‎neuronunit/models/backends/__init__.py

+7-42
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,20 @@
44
import io
55
import importlib
66
import inspect
7-
<<<<<<< HEAD
8-
=======
97
import pathlib
108
import re
119
import warnings
12-
>>>>>>> 9fb0c2e613a1bf059f38eeeae80582d0cfb11f2f
1310

1411
import sciunit.models.backends as su_backends
1512
from sciunit.utils import PLATFORM, PYTHON_MAJOR_VERSION
1613
from .base import Backend
14+
available_backends = su_backends.available_backends
1715

18-
19-
<<<<<<< HEAD
20-
try:
21-
from .static import StaticBackend
22-
except ImportError:
23-
StaticBackend = None
24-
print('Could not load StaticBackend')
25-
26-
try:
27-
from .geppetto import GeppettoBackend
28-
except ImportError:
29-
GeppettoBackend = None
30-
print('Could not load GeppettoBackend')
31-
32-
try:
33-
from .jNeuroML import jNeuroMLBackend
34-
except ImportError:
35-
jNeuroMLBackend = None
36-
print('Could not load jNeuroMLBackend')
37-
38-
##
39-
# Neuron support depreciated
40-
##
41-
#try:
42-
# from .neuron import NEURONBackend
43-
#except ImportError:
44-
# NEURONBackend = None
45-
# print('Could not load NEURONBackend')
46-
47-
=======
48-
49-
backend_paths = ['adexp.JIT_ADEXPBackend',
16+
backend_paths = ['static.StaticBackend',
17+
'geppetto.GeppettoBackend',
18+
'jNeuroML.jNeuroMLBackend',
19+
#'neuron.NeuronBackend',
20+
'adexp.JIT_ADEXPBackend',
5021
'izhikevich.JIT_IZHIBackend']
5122
def check_backend(partial_path):
5223
full_path = 'jithub.models.backends.%s' % partial_path
@@ -78,14 +49,8 @@ def register_backends(backend_paths):
7849
su_backends.register_backends(provided_backends)
7950

8051

81-
try:
82-
register_backends(backend_paths)
83-
>>>>>>> 9fb0c2e613a1bf059f38eeeae80582d0cfb11f2f
52+
register_backends(backend_paths)
8453

85-
except:
86-
register_backends(backend_paths)
87-
88-
available_backends = su_backends.available_backends
8954
#from .adexp import ADEXPBackend
9055
#from .glif import GLIFBackend
9156
#from .l5pcSciUnit import L5PCBackend

1 commit comments

Comments
 (1)

russelljjarvis commented on Apr 22, 2021

@russelljjarvis
Contributor

Sorry yes, these changes where only supposed to be in the optimization branch. That branch doesn't use the old style of backend. Perhaps the broken file was picked up by the unittest import_all, but there were so many failures that its hard to locate any one particular error. I believe the unmerged code happened not in russelljarvis/optimization -> scidash/optimization but scidash/optimization -> scidash/dev. It looks okay here: https://github.com/russelljjarvis/neuronunit/blob/optimization/neuronunit/models/backends/__init__.py

Please sign in to comment.