From 04d30a6ee089f87352b7c5d6de5cf0d487c159d2 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Mon, 27 Apr 2026 09:32:42 -0400 Subject: [PATCH 1/4] Corrected CI script triggers. --- .github/workflows/python_tests.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 779f640..5c810c5 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -4,13 +4,19 @@ on: pull_request: paths: - '.github/workflows/python_tests.yml' - - 'tools/logunitas/**' + - 'bin/**' + - 'p1_runner/**' + - 'tests/**' + - 'requirements*.txt' push: branches: - - 'st-develop' + - 'internal' paths: - '.github/workflows/python_tests.yml' - - 'tools/logunitas/**' + - 'bin/**' + - 'p1_runner/**' + - 'tests/**' + - 'requirements*.txt' jobs: test: From fc80af6f28e5902233182b356f1d5b71179e4668 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Mon, 27 Apr 2026 09:37:19 -0400 Subject: [PATCH 2/4] Added Python syntax checks for various tools. --- tests/test_syntax_compat.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test_syntax_compat.py diff --git a/tests/test_syntax_compat.py b/tests/test_syntax_compat.py new file mode 100644 index 0000000..d85f1fc --- /dev/null +++ b/tests/test_syntax_compat.py @@ -0,0 +1,23 @@ +"""! +@brief Verify that user scripts compile cleanly on the current Python interpreter. + +Note that this only checks that the syntax is valid for the supported Python versions (e.g. match statements, X | Y +union types, walrus operator, etc.). It does not test that the code actually functions as intended. +""" + +import glob +import os +import py_compile +import pytest + +_REPO_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) + +_SCRIPTS = sorted( + glob.glob(os.path.join(_REPO_ROOT, 'bin', '*.py')) + + glob.glob(os.path.join(_REPO_ROOT, 'p1_runner', '*.py')) +) + +# Parametrize by repo-relative path for readable test IDs. +@pytest.mark.parametrize('path', _SCRIPTS, ids=[os.path.relpath(p, _REPO_ROOT) for p in _SCRIPTS]) +def test_compiles(path): + py_compile.compile(path, doraise=True) From 7de3a6a084feb2e1b8dd0663d11bdf8665cba6de Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Mon, 27 Apr 2026 09:46:35 -0400 Subject: [PATCH 3/4] Added CI badges. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c7dd639..6cf657a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + + +
Build Status
Python Support
+ # Point One Host Tools Tools for interfacing with Point One FusionEngine devices from a host computer. These tools are compatible with Windows, macOS, and Linux. From 537b832296cc90ed1eaa51e157516906dc469007 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Mon, 27 Apr 2026 13:59:39 -0400 Subject: [PATCH 4/4] Use recursive globs. --- tests/test_syntax_compat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_syntax_compat.py b/tests/test_syntax_compat.py index d85f1fc..e10673a 100644 --- a/tests/test_syntax_compat.py +++ b/tests/test_syntax_compat.py @@ -13,8 +13,11 @@ _REPO_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) _SCRIPTS = sorted( - glob.glob(os.path.join(_REPO_ROOT, 'bin', '*.py')) + - glob.glob(os.path.join(_REPO_ROOT, 'p1_runner', '*.py')) + p for p in ( + glob.glob(os.path.join(_REPO_ROOT, 'bin', '**', '*.py'), recursive=True) + + glob.glob(os.path.join(_REPO_ROOT, 'p1_runner', '**', '*.py'), recursive=True) + ) + if '__pycache__' not in p ) # Parametrize by repo-relative path for readable test IDs.