From 503b1400b90cc03d67e32271939c5ebb25a11640 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:21:37 +0100 Subject: [PATCH 1/5] Removing unused FindBestOMCSession - OMPython 4.0 no longer provides this function --- testmodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testmodel.py b/testmodel.py index 4d16ba8..847ad3a 100755 --- a/testmodel.py +++ b/testmodel.py @@ -5,7 +5,7 @@ from asyncio.subprocess import STDOUT import simplejson as json from monotonic import monotonic -from OMPython import FindBestOMCSession, OMCSession, OMCSessionZMQ +from OMPython import OMCSession, OMCSessionZMQ import shared, glob parser = argparse.ArgumentParser(description='OpenModelica library testing tool helper (single model)') From c6c28a0e84ca9fdc783961af85ce709406a4ff74 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:26:06 +0100 Subject: [PATCH 2/5] Fixing OMPython version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c48dcc0..306e8e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ juliacall matplotlib monotonic natsort -ompython +OMPython==4.0 psutil simplejson From a70bbdd4a2e8fcda98fe2ebfece05b0045980210 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:53:17 +0100 Subject: [PATCH 3/5] Use OMCProcessDocker - Also remove juliacall in non-BaseModelica.jl CI --- .github/workflows/test.yml | 1 + test.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4733356..235cbce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,6 +53,7 @@ jobs: - name: Install Python dependencies shell: bash run: | + sed -i '/^juliacall/d' requirements.txt # Remove juliacall to check if it works without pip install -r requirements.txt - name: Run library test diff --git a/test.py b/test.py index 5ee14df..98c87e2 100755 --- a/test.py +++ b/test.py @@ -260,7 +260,7 @@ def target(): print("Error: Expected at least one configuration file to start the library test") sys.exit(1) -from OMPython import OMCSession, OMCSessionZMQ +from OMPython import OMCSessionZMQ, OMCProcessDocker # Try to make the processes a bit nicer... os.environ["GC_MARKERS"]="1" @@ -276,7 +276,7 @@ def target(): ompython_omc_version=omc.sendExpression('getVersion()') os.environ["OPENMODELICAHOME"] = omhome else: - omc = OMCSessionZMQ(docker=docker, dockerExtraArgs=dockerExtraArgs) + omc = OMCProcessDocker(docker=docker, dockerExtraArgs=dockerExtraArgs) omhome=omc.sendExpression('getInstallationDirectoryPath()') omc_version=omc.sendExpression('getVersion()') ompython_omc_version=omc_version From b8c155312aa00fab0bc072930133986e99b1711a Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:59:55 +0100 Subject: [PATCH 4/5] Fix OMPython at at version 3.6 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 306e8e7..8cfcab1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ juliacall matplotlib monotonic natsort -OMPython==4.0 +OMPython==3.6 psutil simplejson From 783cfbbbb96f928c8b3cfdc8daa9a6ac91fc3b71 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Mon, 3 Nov 2025 15:02:47 +0100 Subject: [PATCH 5/5] Changed my mind --- requirements.txt | 2 +- test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8cfcab1..306e8e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ juliacall matplotlib monotonic natsort -OMPython==3.6 +OMPython==4.0 psutil simplejson diff --git a/test.py b/test.py index 98c87e2..218da34 100755 --- a/test.py +++ b/test.py @@ -267,7 +267,7 @@ def target(): print("Start OMC version") -if ompython_omhome != "": +if not docker: # Use a different OMC for running OMPython than for running the tests omhome = os.environ["OPENMODELICAHOME"] omc_version = check_output_log(omc_cmd + ["--version"], stderr=subprocess.STDOUT).decode("ascii").strip() @@ -276,7 +276,7 @@ def target(): ompython_omc_version=omc.sendExpression('getVersion()') os.environ["OPENMODELICAHOME"] = omhome else: - omc = OMCProcessDocker(docker=docker, dockerExtraArgs=dockerExtraArgs) + omc = OMCSessionZMQ(docker=docker, dockerExtraArgs=dockerExtraArgs) omhome=omc.sendExpression('getInstallationDirectoryPath()') omc_version=omc.sendExpression('getVersion()') ompython_omc_version=omc_version