From 5166c7666ee67d70cc0e6b1d9946d7fb72b7dc48 Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Tue, 23 Dec 2025 17:53:41 -0800 Subject: [PATCH 1/3] Fix um.dll and update deps --- .gitignore | 2 +- docs/assets/{libum.dll => um.dll} | Bin docs/development/jackhammer_mode.md | 8 ++++---- ephys_link.spec | 5 ++--- pyproject.toml | 14 +++++++------- src/ephys_link/__about__.py | 2 +- 6 files changed, 15 insertions(+), 16 deletions(-) rename docs/assets/{libum.dll => um.dll} (100%) diff --git a/.gitignore b/.gitignore index fcf5bd30..84ae7c90 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ __pycache__/ # C extensions *.so -!libum.so +!um.so # Distribution / packaging .Python diff --git a/docs/assets/libum.dll b/docs/assets/um.dll similarity index 100% rename from docs/assets/libum.dll rename to docs/assets/um.dll diff --git a/docs/development/jackhammer_mode.md b/docs/development/jackhammer_mode.md index 45e7f724..d43efa4b 100644 --- a/docs/development/jackhammer_mode.md +++ b/docs/development/jackhammer_mode.md @@ -16,11 +16,11 @@ pip install . ## 2. Change the Sensapex SDK to support Jackhammer Mode -You need to replace the `libum.dll` file in the Sensapex library folder. This is located at `\Lib\site-packages\sensapex`. If you made a virtual environment named `venv` in the previous step, it would be `.\venv\Lib\site-packages\sensapex`. +You need to replace the `um.dll` file in the Sensapex library folder. This is located at `\Lib\site-packages\sensapex`. If you made a virtual environment named `venv` in the previous step, it would be `.\venv\Lib\site-packages\sensapex`. -1. Download the custom SDK [here](../assets/libum.dll). -2. (Optional) Make a backup of the old `libum.dll` in the Sensapex library folder by renaming it to `libum.dll.bck` or something like that. -3. Copy the downloaded `libum.dll` to the Sensapex library folder. +1. Download the custom SDK [here](../assets/um.dll). +2. (Optional) Make a backup of the old `um.dll` in the Sensapex library folder by renaming it to `libum.dll.bck` or something like that. +3. Copy the downloaded `um.dll` to the Sensapex library folder. 4. Modify `sensapex.py` in the Sensapex library folder to enable using this custom DLL. Set the `max_version` variable at line `398` to `(1, 510)`. You can (optionally) test if everything is still working by [running Ephys Link](../usage/starting_ephys_link.md) and checking to see if it can still see and control Sensapex manipulators. diff --git a/ephys_link.spec b/ephys_link.spec index 78a48d17..977ddc44 100644 --- a/ephys_link.spec +++ b/ephys_link.spec @@ -1,4 +1,3 @@ -# -*- mode: python ; coding: utf-8 -*- from argparse import ArgumentParser from importlib import resources @@ -17,7 +16,7 @@ FILE_NAME = f"EphysLink-v{version}" bindings = [binding for binding in collect_submodules("ephys_link.bindings") if binding != "ephys_link.bindings"] # Collect Sensapex SDK. -ump_sdk_path = str(resources.files('sensapex').joinpath('libum.dll')) +ump_sdk_path = str(resources.files('sensapex').joinpath('um.dll')) # noinspection PyUnresolvedReferences a = Analysis( @@ -25,7 +24,7 @@ a = Analysis( pathex=[], binaries=[(ump_sdk_path, 'sensapex')], datas=[], - hiddenimports=['engineio.async_drivers.aiohttp'] + bindings, + hiddenimports=['engineio.async_drivers.aiohttp', *bindings], hookspath=[], hooksconfig={}, runtime_hooks=[], diff --git a/pyproject.toml b/pyproject.toml index 552e74be..8320d07b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,12 +58,12 @@ exclude = ["/.github", "/.idea", "/docs"] installer = "uv" python = "3.14" dependencies = [ - "pyinstaller==6.16.0", - "basedpyright==1.32.1", - "pytest==8.4.2", + "pyinstaller==6.17.0", + "basedpyright==1.36.2", + "pytest==9.0.2", "pytest-cov==7.0.0", "pytest-mock==3.15.1", - "pytest-asyncio==1.2.0" + "pytest-asyncio==1.3.0" ] [tool.hatch.envs.default.scripts] exe = "pyinstaller.exe ephys_link.spec -y -- -d && pyinstaller.exe ephys_link.spec -y" @@ -78,9 +78,9 @@ installer = "uv" python = "3.14" skip-install = true dependencies = [ - "mkdocs-material==9.6.19", - "mkdocstrings-python==1.18.2", - "mkdocs-gen-files==0.5.0", + "mkdocs-material==9.7.1", + "mkdocstrings-python==2.0.1", + "mkdocs-gen-files==0.6.0", "mkdocs-literate-nav==0.6.2", "mkdocs-section-index==0.3.10" ] diff --git a/src/ephys_link/__about__.py b/src/ephys_link/__about__.py index 8a124bf6..b19ee4b7 100644 --- a/src/ephys_link/__about__.py +++ b/src/ephys_link/__about__.py @@ -1 +1 @@ -__version__ = "2.2.0" +__version__ = "2.2.1" From 83a1a9f27b414d0687cbd5a7288845059419810c Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Tue, 23 Dec 2025 17:59:04 -0800 Subject: [PATCH 2/3] Fix docs build warnings --- docs/development/adding_a_manipulator.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development/adding_a_manipulator.md b/docs/development/adding_a_manipulator.md index 2711d2dd..eaadeee3 100644 --- a/docs/development/adding_a_manipulator.md +++ b/docs/development/adding_a_manipulator.md @@ -28,9 +28,9 @@ As described in the [system overview](../home/how_it_works.md), Ephys Link conve common "unified space" which is the [left-hand cartesian coordinate system](https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/coordinate-systems.html). The two methods [ -`platform_space_to_unified_space`](../../reference/ephys_link/utils/base_binding/#ephys_link.utils.base_binding.BaseBinding.platform_space_to_unified_space) +`platform_space_to_unified_space`](../reference/ephys_link/utils/base_binding.md#ephys_link.utils.base_binding.BaseBinding.platform_space_to_unified_space) and [ -`unified_space_to_platform_space`](../../reference/ephys_link/utils/base_binding/#ephys_link.utils.base_binding.BaseBinding.unified_space_to_platform_space) +`unified_space_to_platform_space`](../reference/ephys_link/utils/base_binding.md#ephys_link.utils.base_binding.BaseBinding.unified_space_to_platform_space) are used to convert between your manipulator's coordinate system and the unified space. !!! tip @@ -44,9 +44,9 @@ are used to convert between your manipulator's coordinate system and the unified ### Binding Names The two naming methods [ -`get_display_name`](../../reference/ephys_link/utils/base_binding/#ephys_link.utils.base_binding.BaseBinding.get_display_name) +`get_display_name`](../reference/ephys_link/utils/base_binding.md#ephys_link.utils.base_binding.BaseBinding.get_display_name) and [ -`get_cli_name`](../../reference/ephys_link/utils/base_binding/#ephys_link.utils.base_binding.BaseBinding.get_cli_name) +`get_cli_name`](../reference/ephys_link/utils/base_binding.md#ephys_link.utils.base_binding.BaseBinding.get_cli_name) are used to identify the binding in the user interface. As described by their documentation, `get_display_name` should return a human-readable name for the binding, while `get_cli_name` should return the name used to launch the binding from the command line (what is passed to the `-t` flag). For example, Sensapex uMp-4 manipulator's `get_cli_name` From 62531fe864592239ced1cf3f19f3a47cc1303804 Mon Sep 17 00:00:00 2001 From: Kenneth Yang <82800265+kjy5@users.noreply.github.com> Date: Tue, 23 Dec 2025 18:02:21 -0800 Subject: [PATCH 3/3] Update docs/development/jackhammer_mode.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/development/jackhammer_mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/jackhammer_mode.md b/docs/development/jackhammer_mode.md index d43efa4b..ff436db2 100644 --- a/docs/development/jackhammer_mode.md +++ b/docs/development/jackhammer_mode.md @@ -19,7 +19,7 @@ pip install . You need to replace the `um.dll` file in the Sensapex library folder. This is located at `\Lib\site-packages\sensapex`. If you made a virtual environment named `venv` in the previous step, it would be `.\venv\Lib\site-packages\sensapex`. 1. Download the custom SDK [here](../assets/um.dll). -2. (Optional) Make a backup of the old `um.dll` in the Sensapex library folder by renaming it to `libum.dll.bck` or something like that. +2. (Optional) Make a backup of the old `um.dll` in the Sensapex library folder by renaming it to `um.dll.bck` or something like that. 3. Copy the downloaded `um.dll` to the Sensapex library folder. 4. Modify `sensapex.py` in the Sensapex library folder to enable using this custom DLL. Set the `max_version` variable at line `398` to `(1, 510)`.