|
4 | 4 | import io
|
5 | 5 | import importlib
|
6 | 6 | import inspect
|
7 |
| -<<<<<<< HEAD |
8 |
| -======= |
9 | 7 | import pathlib
|
10 | 8 | import re
|
11 | 9 | import warnings
|
12 |
| ->>>>>>> 9fb0c2e613a1bf059f38eeeae80582d0cfb11f2f |
13 | 10 |
|
14 | 11 | import sciunit.models.backends as su_backends
|
15 | 12 | from sciunit.utils import PLATFORM, PYTHON_MAJOR_VERSION
|
16 | 13 | from .base import Backend
|
| 14 | +available_backends = su_backends.available_backends |
17 | 15 |
|
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', |
50 | 21 | 'izhikevich.JIT_IZHIBackend']
|
51 | 22 | def check_backend(partial_path):
|
52 | 23 | full_path = 'jithub.models.backends.%s' % partial_path
|
@@ -78,14 +49,8 @@ def register_backends(backend_paths):
|
78 | 49 | su_backends.register_backends(provided_backends)
|
79 | 50 |
|
80 | 51 |
|
81 |
| -try: |
82 |
| - register_backends(backend_paths) |
83 |
| ->>>>>>> 9fb0c2e613a1bf059f38eeeae80582d0cfb11f2f |
| 52 | +register_backends(backend_paths) |
84 | 53 |
|
85 |
| -except: |
86 |
| - register_backends(backend_paths) |
87 |
| - |
88 |
| -available_backends = su_backends.available_backends |
89 | 54 | #from .adexp import ADEXPBackend
|
90 | 55 | #from .glif import GLIFBackend
|
91 | 56 | #from .l5pcSciUnit import L5PCBackend
|
1 commit comments
russelljjarvis commentedon Apr 22, 2021
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