Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Ephys Link options #38

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ exclude = ["/models"]
python="3.12"
dependencies = [
"coverage[toml]>=6.5",
"mypy>=1.0.0",
"pytest",
]

Expand All @@ -60,13 +61,7 @@ cov = [
"test-cov",
"cov-report",
]

[tool.hatch.envs.types]
dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/vbl_aquarium tests}"
check = "mypy --strict --install-types --non-interactive {args:src/vbl_aquarium}"

[tool.coverage.run]
source_pkgs = ["vbl_aquarium", "tests"]
Expand Down
34 changes: 34 additions & 0 deletions src/vbl_aquarium/models/ephys_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@
from vbl_aquarium.utils.vbl_base_model import VBLBaseModel


class EphysLinkOptions(VBLBaseModel):
"""Options for running Ephys Link.

:param background: Whether to skip the GUI and run using CLI arguments.
:type background: bool
:param ignore_updates: Whether to ignore updates.
:type ignore_updates: bool
:param type: Type of manipulator platform to use.
:type type: str
:param debug: Whether to print debug messages.
:type debug: bool
:param use_proxy: Whether to use VBL proxy service.
:type use_proxy: bool
:param proxy_address: Address of the proxy service.
:type proxy_address: str
:param port: HTTP port to serve on or connect to (if using the proxy).
:type port: int
:param mpm_port: Port for New Scale MPM HTTP server.
:type mpm_port: int
:param serial: Serial port for emergency stop.
:type serial: str
"""

background: bool = False
ignore_updates: bool = False
type: str = "ump-4"
debug: bool = False
use_proxy: bool = False
proxy_address: str = "proxy2.virtualbrainlab.org"
port: int = Field(default=8081, ge=1024, le=49151)
mpm_port: int = 8080
serial: str = "no-e-stop"


class GotoPositionRequest(VBLBaseModel):
"""Request format for moving a manipulator to a position.

Expand Down