From 33d923c95f56e3ab5d41262d806bd50e9783a0a1 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 13:52:15 +0000 Subject: [PATCH 1/7] run tests on windows --- .github/workflows/Lint-and-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Lint-and-test.yml b/.github/workflows/Lint-and-test.yml index 54c8b335..acf78830 100644 --- a/.github/workflows/Lint-and-test.yml +++ b/.github/workflows/Lint-and-test.yml @@ -7,10 +7,11 @@ jobs: compare-branch: origin/main python-ver: '3.13' tests: - runs-on: ubuntu-latest strategy: matrix: version: ['3.10','3.11', '3.12', '3.13', '3.14'] + os: ["ubuntu-latest", "windows-latest"] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v6 From 102fdc45cee20d7d42df1e1ab07ae4f147b384d2 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 13:57:25 +0000 Subject: [PATCH 2/7] Activate environment in Lint-and-test workflow --- .github/workflows/Lint-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Lint-and-test.yml b/.github/workflows/Lint-and-test.yml index acf78830..099ca954 100644 --- a/.github/workflows/Lint-and-test.yml +++ b/.github/workflows/Lint-and-test.yml @@ -17,6 +17,7 @@ jobs: - uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.version }} + activate-environment: "true" - name: install requirements run: uv sync --extra dev - name: run unit tests From ae962ff5eff6b75f90a90df5ccd37ce2648081f4 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 15:21:39 +0000 Subject: [PATCH 3/7] might not need activate-environment now --- .github/workflows/Lint-and-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Lint-and-test.yml b/.github/workflows/Lint-and-test.yml index 099ca954..acf78830 100644 --- a/.github/workflows/Lint-and-test.yml +++ b/.github/workflows/Lint-and-test.yml @@ -17,7 +17,6 @@ jobs: - uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.version }} - activate-environment: "true" - name: install requirements run: uv sync --extra dev - name: run unit tests From 6fe2967c6ad4630080b32c92fdc55020f9be1f83 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 15:24:07 +0000 Subject: [PATCH 4/7] Update GitHub Actions to use newer versions --- .github/workflows/Lint-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Lint-and-test.yml b/.github/workflows/Lint-and-test.yml index acf78830..e6dbddf1 100644 --- a/.github/workflows/Lint-and-test.yml +++ b/.github/workflows/Lint-and-test.yml @@ -13,8 +13,8 @@ jobs: os: ["ubuntu-latest", "windows-latest"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 + - uses: actions/checkout@v5 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.version }} - name: install requirements From 9972770e2e582484a7d3871170057ee8e1adb8fb Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 15:37:50 +0000 Subject: [PATCH 5/7] remove env passthrough --- system_tests/lewis_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_tests/lewis_tests.py b/system_tests/lewis_tests.py index 84594201..9cd44997 100644 --- a/system_tests/lewis_tests.py +++ b/system_tests/lewis_tests.py @@ -34,7 +34,7 @@ def julabo_simulation(): def run_control_command(mode, command, value): - subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), mode, command, value], env=os.environ).decode() + subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), mode, command, value]).decode() def santise_whitespace(input_str): @@ -43,7 +43,7 @@ def santise_whitespace(input_str): def query_device_status(): return santise_whitespace( - subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), "device"], env=os.environ).decode() + subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), "device"]).decode() ) From 1e06867f5305f1430b1506e77e5e6fe6a65b0109 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 30 Oct 2025 15:39:02 +0000 Subject: [PATCH 6/7] format --- system_tests/lewis_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system_tests/lewis_tests.py b/system_tests/lewis_tests.py index 9cd44997..28eba50d 100644 --- a/system_tests/lewis_tests.py +++ b/system_tests/lewis_tests.py @@ -57,7 +57,9 @@ def test_list_available_devices(self): When: running Lewis without parameters Then: returns a list of possible simulations """ - result = santise_whitespace(subprocess.check_output(["uv", "run", str(LEWIS_PATH)]).decode()) + result = santise_whitespace( + subprocess.check_output(["uv", "run", str(LEWIS_PATH)]).decode() + ) verify(result, self.reporter) From 08284f8f442befbd10948740a6dfb9da2ca32373 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Mon, 3 Nov 2025 09:41:49 +0000 Subject: [PATCH 7/7] use sys.executable rather than hardcode uv --- system_tests/lewis_tests.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/system_tests/lewis_tests.py b/system_tests/lewis_tests.py index 28eba50d..dbaebf41 100644 --- a/system_tests/lewis_tests.py +++ b/system_tests/lewis_tests.py @@ -1,6 +1,7 @@ import contextlib import os import subprocess +import sys import time from pathlib import Path @@ -18,8 +19,7 @@ @contextlib.contextmanager def julabo_simulation(): command = [ - "uv", - "run", + sys.executable, str(LEWIS_PATH), "julabo", "-p", @@ -34,7 +34,9 @@ def julabo_simulation(): def run_control_command(mode, command, value): - subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), mode, command, value]).decode() + subprocess.check_output( + [sys.executable, str(LEWIS_CONTROL_PATH), mode, command, value] + ).decode() def santise_whitespace(input_str): @@ -43,7 +45,7 @@ def santise_whitespace(input_str): def query_device_status(): return santise_whitespace( - subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), "device"]).decode() + subprocess.check_output([sys.executable, str(LEWIS_CONTROL_PATH), "device"]).decode() ) @@ -58,7 +60,7 @@ def test_list_available_devices(self): Then: returns a list of possible simulations """ result = santise_whitespace( - subprocess.check_output(["uv", "run", str(LEWIS_PATH)]).decode() + subprocess.check_output([sys.executable, str(LEWIS_PATH)]).decode() ) verify(result, self.reporter)