From d2e60a852dced4ea1f43443c339707eb8f647eb4 Mon Sep 17 00:00:00 2001 From: George Vigelette Date: Wed, 3 Sep 2025 21:40:33 -0400 Subject: [PATCH 1/3] update sdk interface to include get version --- src/openlifu/io/LIFUInterface.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/openlifu/io/LIFUInterface.py b/src/openlifu/io/LIFUInterface.py index 2d08ea5f..b125a391 100644 --- a/src/openlifu/io/LIFUInterface.py +++ b/src/openlifu/io/LIFUInterface.py @@ -2,12 +2,14 @@ import asyncio import logging +import re from enum import Enum from typing import Dict, List import numpy as np import pandas as pd +import openlifu as m from openlifu.io.LIFUHVController import HVController from openlifu.io.LIFUSignal import LIFUSignal from openlifu.io.LIFUTXDevice import TriggerModeOpts, TxDevice @@ -422,3 +424,10 @@ def __exit__(self, exc_type, exc_value, traceback): self.txdevice.close() if self.hvcontroller: self.hvcontroller.close() + + @staticmethod + def get_sdk_version() -> str: + version = m.__version__ + # Match the version pattern X.Y.Z + match = re.match(r'\d+\.\d+\.\d+', version) + return match.group(0) if match else version From a9e8c3e25090e980c175b8a15a3b95725bfee46d Mon Sep 17 00:00:00 2001 From: George Vigelette Date: Wed, 15 Oct 2025 12:26:52 -0400 Subject: [PATCH 2/3] updated to not use an alias --- src/openlifu/io/LIFUInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openlifu/io/LIFUInterface.py b/src/openlifu/io/LIFUInterface.py index b125a391..cf8ea9d7 100644 --- a/src/openlifu/io/LIFUInterface.py +++ b/src/openlifu/io/LIFUInterface.py @@ -9,7 +9,7 @@ import numpy as np import pandas as pd -import openlifu as m +import openlifu from openlifu.io.LIFUHVController import HVController from openlifu.io.LIFUSignal import LIFUSignal from openlifu.io.LIFUTXDevice import TriggerModeOpts, TxDevice @@ -427,7 +427,7 @@ def __exit__(self, exc_type, exc_value, traceback): @staticmethod def get_sdk_version() -> str: - version = m.__version__ + version = openlifu.__version__ # Match the version pattern X.Y.Z match = re.match(r'\d+\.\d+\.\d+', version) return match.group(0) if match else version From 1b0b437c15ba75d9415db61f2a0db45279bee556 Mon Sep 17 00:00:00 2001 From: George Vigelette Date: Wed, 15 Oct 2025 13:10:19 -0400 Subject: [PATCH 3/3] display dev versions when not released --- src/openlifu/io/LIFUInterface.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/openlifu/io/LIFUInterface.py b/src/openlifu/io/LIFUInterface.py index cf8ea9d7..703e6e10 100644 --- a/src/openlifu/io/LIFUInterface.py +++ b/src/openlifu/io/LIFUInterface.py @@ -2,7 +2,6 @@ import asyncio import logging -import re from enum import Enum from typing import Dict, List @@ -427,7 +426,4 @@ def __exit__(self, exc_type, exc_value, traceback): @staticmethod def get_sdk_version() -> str: - version = openlifu.__version__ - # Match the version pattern X.Y.Z - match = re.match(r'\d+\.\d+\.\d+', version) - return match.group(0) if match else version + return openlifu.__version__