ephys-link 2.0.0b5__py3-none-any.whl → 2.0.0b9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ephys_link/__about__.py +1 -1
- ephys_link/__main__.py +51 -43
- ephys_link/back_end/platform_handler.py +315 -305
- ephys_link/back_end/server.py +274 -202
- ephys_link/bindings/{fake_bindings.py → fake_binding.py} +84 -59
- ephys_link/bindings/{mpm_bindings.py → mpm_binding.py} +315 -278
- ephys_link/bindings/{ump_4_bindings.py → ump_4_binding.py} +157 -131
- ephys_link/front_end/cli.py +104 -98
- ephys_link/front_end/gui.py +204 -215
- ephys_link/{util/base_bindings.py → utils/base_binding.py} +176 -148
- ephys_link/{util → utils}/console.py +127 -130
- ephys_link/utils/constants.py +23 -0
- ephys_link/utils/converters.py +86 -0
- ephys_link/utils/startup.py +65 -0
- ephys_link-2.0.0b9.dist-info/METADATA +91 -0
- ephys_link-2.0.0b9.dist-info/RECORD +25 -0
- {ephys_link-2.0.0b5.dist-info → ephys_link-2.0.0b9.dist-info}/WHEEL +1 -1
- {ephys_link-2.0.0b5.dist-info → ephys_link-2.0.0b9.dist-info}/licenses/LICENSE +674 -674
- ephys_link/resources/CP210xManufacturing.dll +0 -0
- ephys_link/resources/NstMotorCtrl.dll +0 -0
- ephys_link/resources/SiUSBXp.dll +0 -0
- ephys_link/util/common.py +0 -120
- ephys_link-2.0.0b5.dist-info/METADATA +0 -166
- ephys_link-2.0.0b5.dist-info/RECORD +0 -26
- /ephys_link/{util → utils}/__init__.py +0 -0
- {ephys_link-2.0.0b5.dist-info → ephys_link-2.0.0b9.dist-info}/entry_points.txt +0 -0
ephys_link/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.0.
|
|
1
|
+
__version__ = "2.0.0b9"
|
ephys_link/__main__.py
CHANGED
|
@@ -1,43 +1,51 @@
|
|
|
1
|
-
"""Ephys Link entry point.
|
|
2
|
-
|
|
3
|
-
Responsible for gathering launch options, instantiating the appropriate interface, and starting the application.
|
|
4
|
-
|
|
5
|
-
Usage:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
|
|
14
|
-
from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
"""Ephys Link entry point.
|
|
2
|
+
|
|
3
|
+
Responsible for gathering launch options, instantiating the appropriate interface, and starting the application.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
```python
|
|
7
|
+
main()
|
|
8
|
+
```
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from asyncio import run
|
|
12
|
+
from sys import argv
|
|
13
|
+
|
|
14
|
+
from keyboard import add_hotkey
|
|
15
|
+
|
|
16
|
+
from ephys_link.back_end.platform_handler import PlatformHandler
|
|
17
|
+
from ephys_link.back_end.server import Server
|
|
18
|
+
from ephys_link.front_end.cli import CLI
|
|
19
|
+
from ephys_link.front_end.gui import GUI
|
|
20
|
+
from ephys_link.utils.console import Console
|
|
21
|
+
from ephys_link.utils.startup import check_for_updates, preamble
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main() -> None:
|
|
25
|
+
"""Ephys Link entry point."""
|
|
26
|
+
|
|
27
|
+
# 0. Print the startup preamble.
|
|
28
|
+
preamble()
|
|
29
|
+
|
|
30
|
+
# 1. Get options via CLI or GUI (if no CLI options are provided).
|
|
31
|
+
options = CLI().parse_args() if len(argv) > 1 else GUI().get_options()
|
|
32
|
+
|
|
33
|
+
# 2. Instantiate the Console and make it globally accessible.
|
|
34
|
+
console = Console(enable_debug=options.debug)
|
|
35
|
+
|
|
36
|
+
# 3. Check for updates if not disabled.
|
|
37
|
+
if not options.ignore_updates:
|
|
38
|
+
check_for_updates(console)
|
|
39
|
+
|
|
40
|
+
# 4. Instantiate the Platform Handler with the appropriate platform bindings.
|
|
41
|
+
platform_handler = PlatformHandler(options, console)
|
|
42
|
+
|
|
43
|
+
# 5. Add hotkeys for emergency stop.
|
|
44
|
+
_ = add_hotkey("ctrl+alt+shift+q", lambda: run(platform_handler.emergency_stop()))
|
|
45
|
+
|
|
46
|
+
# 6. Start the server.
|
|
47
|
+
Server(options, platform_handler, console).launch()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if __name__ == "__main__":
|
|
51
|
+
main()
|