Skip to content

Commit fa186c3

Browse files
authored
Socket.IO API docs (#423)
* Grammarly and shorted README * Start API * Get position * up to set depth * Socket.io API * Grammarly
1 parent 5c1512c commit fa186c3

File tree

11 files changed

+459
-110
lines changed

11 files changed

+459
-110
lines changed

README.md

Lines changed: 5 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,13 @@
1212
The [Electrophysiology Manipulator Link](https://github.com/VirtualBrainLab/ephys-link)
1313
(or Ephys Link for short) is a Python [Socket.IO](https://socket.io/docs/v4/#what-socketio-is) server that allows any
1414
Socket.IO-compliant application (such
15-
as [Pinpoint](https://github.com/VirtualBrainLab/Pinpoint))
15+
as [Pinpoint][Pinpoint])
1616
to communicate with manipulators used in electrophysiology experiments.
1717

1818
<img width="100%" src="https://github.com/VirtualBrainLab/ephys-link/assets/82800265/0c7c60b1-0926-4697-a461-221554f82de1" alt="Manipulator and probe in pinpoint moving in sync">
1919

20-
**Supported Manipulators:**
21-
22-
| Manufacturer | Model |
23-
|--------------|---------------------------------------------------------|
24-
| Sensapex | <ul> <li>uMp-4</li> <li>uMp-3 (Coming Soon!)</li> </ul> |
25-
| New Scale | <ul> <li>Pathfinder MPM Control v2.8+</li> </ul> |
26-
| Scientifica | <ul> <li>InVivoStar (Coming Soon!)</li> </ul> |
27-
| LabMaker | <ul> <li>(Coming Soon!)</li> </ul> |
28-
29-
Ephys Link is an open and extensible platform. It is designed to easily support integration with other manipulators.
30-
31-
For more information regarding the server's implementation and how the code is organized, see
32-
the [package's development documentation](https://virtualbrainlab.org/ephys_link/development.html).
33-
34-
For detailed descriptions of the server's API, see
35-
the [API reference](https://virtualbrainlab.org/api_reference_ephys_link.html).
36-
3720
# Installation
3821

39-
## Prerequisites
40-
41-
1. An **x86 Windows PC is required** to run the server.
42-
2. For Sensapex devices, the controller unit must be connected via an ethernet
43-
cable and powered. A USB-to-ethernet adapter is acceptable. For New Scale manipulators,
44-
the controller unit must be connected via USB and be powered by a 6V power
45-
supply.
46-
3. To use the emergency stop feature, ensure an Arduino with
47-
the [StopSignal](https://github.com/VirtualBrainLab/StopSignal) sketch is
48-
connected to the computer. Follow the instructions on that repo for how to
49-
set up the Arduino.
50-
5122
## Launch from Pinpoint (Recommended)
5223

5324
Pinpoint comes bundled with the correct version of Ephys Link. If you are using Pinpoint on the same computer your
@@ -56,52 +27,9 @@ the [Pinpoint documentation](https://virtualbrainlab.org/pinpoint/tutorials/tuto
5627

5728
## Install as Standalone Executable
5829

59-
1. Download the latest executable from
30+
1. Download the latest standalone executable or zip from
6031
the [releases page](https://github.com/VirtualBrainLab/ephys-link/releases/latest).
61-
2. Double-click the executable file to launch the configuration window.
62-
1. Take note of the IP address and port. **Copy this information into Pinpoint to connect**.
63-
3. Select the desired configuration and click "Launch Server".
64-
65-
The configuration window will close and the server will launch. Your configurations will be saved for future use.
66-
67-
To connect to the server from Pinpoint, provide the IP address and port. For example, if the server is running on the
68-
same computer that Pinpoint is, use
69-
70-
- Server: `localhost`
71-
- Port: `8081`
72-
73-
If the server is running on a different (local) computer, use the IP address of that computer as shown in the startup
74-
window instead of `localhost`.
75-
76-
## Install as a Python package
77-
78-
```bash
79-
pip install ephys-link
80-
```
81-
82-
Import main and run (this will launch the setup GUI).
83-
84-
```python
85-
from ephys_link.__main__ import main
86-
87-
main()
88-
```
89-
90-
## Install for Development
91-
92-
1. Clone the repository.
93-
2. Install [Hatch](https://hatch.pypa.io/latest/install/)
94-
3. In a terminal, navigate to the repository's root directory and run
95-
96-
```bash
97-
hatch shell
98-
```
99-
100-
This will create a virtual environment, install Python 12 (if not found), and install the package in editable mode.
101-
102-
If you encounter any dependency issues (particularly with `aiohttp`), try installing the latest Microsoft Visual C++
103-
(MSVC v143+ x86/64) and the Windows SDK (10/11)
104-
via [Visual Studio Build Tools Installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
32+
2. Double-click the executable file to start.
10533

10634
# Documentation and More Information
10735

@@ -111,7 +39,7 @@ found on the [Virtual Brain Lab Documentation page][docs] for Ephys Link.
11139
# Citing
11240

11341
If this project is used as part of a research project you should cite
114-
the [Pinpoint repository][Pinpoint]. Please email
42+
the [Pinpoint repository](https://github.com/VirtualBrainLab/Pinpoint). Please email
11543
Dan ([[email protected]](mailto:[email protected])) if you have questions.
11644

11745
Please reach out to Kenneth ([[email protected]](mailto:[email protected])) for questions
@@ -120,6 +48,4 @@ through the issues tab.
12048

12149
[Pinpoint]: https://github.com/VirtualBrainLab/Pinpoint
12250

123-
[StopSignal]: https://github.com/VirtualBrainLab/StopSignal
124-
125-
[docs]: https://virtualbrainlab.org/ephys_link/installation_and_use.html
51+
[docs]: https://virtualbrainlab.github.io/ephys-link/

docs/development/adding_a_manipulator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ are used to convert between your manipulator's coordinate system and the unified
3636
the [Sensapex uMp-4](https://github.com/VirtualBrainLab/ephys-link/blob/main/src/ephys_link/bindings/ump_4_bindings.py)
3737
binding for an example where the platform has a Python API (Sensapex's SDK) and
3838
the [New Scale Pathfinder MPM](https://github.com/VirtualBrainLab/ephys-link/blob/main/src/ephys_link/bindings/mpm_bindings.py)
39-
binding for an example where the platform uses a REST API to an external provider.
39+
binding, for example, where the platform uses a REST API for an external provider.
4040

4141
### Binding Names
4242

@@ -52,11 +52,11 @@ returns `ump-4` because the CLI launch command is `ephys_link.exe -b -t ump-4`.
5252
### Custom Additional Arguments
5353

5454
Sometimes you may want to pass extra data to your binding on initialization. For example, New Scale Pathfinder MPM
55-
bindings needs to know what the HTTP server port is. To add custom arguments, define them as arguments on the `__init__`
55+
bindings need to know what the HTTP server port is. To add custom arguments, define them as arguments on the `__init__`
5656
method of your binding then pass in the appropriate data when the binding is instantiated in the [
5757
`_get_binding_instance`](https://github.com/VirtualBrainLab/ephys-link/blob/f79c1ec68ec1805e1a4e231e1934127893f7bd20/src/ephys_link/back_end/platform_handler.py#L58)
5858
method of the [`PlatformHandler`][ephys_link.back_end.platform_handler].
59-
Use [New Scale Pathfinder MPM's binding][ephys_link.bindings.mpm_binding] as an example for how to do this.
59+
Use [New Scale Pathfinder MPM's binding][ephys_link.bindings.mpm_binding] as an example of how to do this.
6060

6161
## Test Your Binding
6262

@@ -71,7 +71,7 @@ information.
7171

7272
## Submit Your Changes
7373

74-
When you're satisfied with your changes, submit a pull request to the main repository. We will review your changes and
74+
When satisfied with your changes, submit a pull request to the main repository. We will review your changes and
7575
merge them if they meet our standards!
7676

7777
Feel free to [reach out](../home/contact.md) to us if you have any questions or need help with your binding!

docs/development/code_organization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sequence.
1919
## Control Flow
2020

2121
As described in ["How It Works"](../home/how_it_works.md), Ephys Link is primarily a server that responds to events. The
22-
server exposes the events and pass them to the chosen manipulator binding. Everything is asynchronous and uses callbacks
22+
server exposes the events and passes them to the chosen manipulator binding. Everything is asynchronous and uses callbacks
2323
to return responses to the clients when ready.
2424

2525
[`PlatformHandler`][ephys_link.back_end.platform_handler] is responsible for converting between the server API and the
@@ -28,12 +28,12 @@ writing a manipulator binding.
2828

2929
## Static Analysis
3030

31-
The project is strictly type checked using [`hatch fmt` (ruff)](https://hatch.pypa.io/1.9/config/static-analysis/)
31+
The project is strictly type-checked using [`hatch fmt` (ruff)](https://hatch.pypa.io/1.9/config/static-analysis/)
3232
and [basedpyright](https://docs.basedpyright.com/latest/). All PRs are checked against these tools.
3333

34-
While they are very helpful in enforcing good code, they can be annoying when working with libraries that inherently
35-
return `Any` (like HTTP requests) or are not strictly statically typed. In those situations we have added inline
36-
comments to ignore specific checks. We try to only use this in scenarios where missing typing information came from
34+
While they are invaluable in enforcing good code, they can be annoying when working with libraries that inherently
35+
return `Any` (like HTTP requests) or are not strictly statically typed. In those situations, we have added inline
36+
comments to ignore specific checks. We try to only use this in scenarios where missing typing information comes from
3737
external sources, and it is not possible to make local type hints. Do not use file-wide ignores under any circumstances.
3838
We also do not make stubs since they would be challenging to maintain.
3939

docs/development/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This section describes:
88
- [The Socket.IO server's API](socketio_api.md) and how to communicate with Ephys Link from a client application
99
- How to [add a new manipulator](adding_a_manipulator.md) to Ephys Link
1010
- General [code organization](code_organization.md) for Ephys Link
11-
- Auto generated [source code reference](../reference/SUMMARY.md) intended for developers who are maintaining Ephys Link
11+
- Auto-generated [source code reference](../reference/SUMMARY.md) intended for developers who are maintaining Ephys Link
1212

1313
## Installing for Development
1414

@@ -24,4 +24,4 @@ This will create a virtual environment, install Python 13 (if not found), and in
2424

2525
If you encounter any dependency issues (particularly with `aiohttp`), try installing the latest Microsoft Visual C++
2626
(MSVC v143+ x86/64) and the Windows SDK (10/11)
27-
via [Visual Studio Build Tools Installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
27+
via [Visual Studio Build Tools Installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/).

0 commit comments

Comments
 (0)