From 2fa98b7bdb2fa085a118361760d59781f8b9ea65 Mon Sep 17 00:00:00 2001 From: Steven Green Date: Thu, 16 Jul 2026 15:57:28 -0700 Subject: [PATCH 1/3] Re-enable linting action Also changes install script to exclude dev dependencies. --- .github/workflows/python-lint.yml | 8 -------- scripts/th_cli_install.sh | 2 +- tests/test_run/camera/test_two_way_talk_handler.py | 1 - th_cli/commands/run_tests.py | 12 +++++++++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index c133224..d433042 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -2,11 +2,6 @@ name: Python Linting on: pull_request: - branches: - - develop - push: - branches: - - develop jobs: run-linters: @@ -22,9 +17,6 @@ jobs: with: python-version: "3.10" - - name: Install Python dependencies - run: pip install black flake8 mypy pydantic types-requests - - name: Install Poetry uses: snok/install-poetry@v1 with: diff --git a/scripts/th_cli_install.sh b/scripts/th_cli_install.sh index c8568a7..30d0d0b 100755 --- a/scripts/th_cli_install.sh +++ b/scripts/th_cli_install.sh @@ -70,7 +70,7 @@ if ! command -v poetry &> /dev/null; then exit 1 fi poetry self update -poetry --project="$PROJECT_ROOT" install +poetry --project="$PROJECT_ROOT" install --without dev # Build the package echo "Building package..." diff --git a/tests/test_run/camera/test_two_way_talk_handler.py b/tests/test_run/camera/test_two_way_talk_handler.py index 2b610e5..d7009e3 100644 --- a/tests/test_run/camera/test_two_way_talk_handler.py +++ b/tests/test_run/camera/test_two_way_talk_handler.py @@ -25,7 +25,6 @@ import pytest -import th_cli.test_run.camera.two_way_talk_handler as _module from th_cli.test_run.camera.two_way_talk_handler import TwoWayTalkHandler, TwoWayTalkHTTPHandler # --------------------------------------------------------------------------- diff --git a/th_cli/commands/run_tests.py b/th_cli/commands/run_tests.py index 1ba7405..944c868 100644 --- a/th_cli/commands/run_tests.py +++ b/th_cli/commands/run_tests.py @@ -42,7 +42,14 @@ from th_cli.exceptions import CLIError, handle_api_error from th_cli.test_run.camera.two_way_talk_handler import TwoWayTalkHandler from th_cli.test_run.websocket import TestRunSocket -from th_cli.utils import DEFAULT_CLI_PROJECT_NAME, build_test_selection, convert_nested_to_dict, load_json_config, merge_configs, read_pics_config +from th_cli.utils import ( + DEFAULT_CLI_PROJECT_NAME, + build_test_selection, + convert_nested_to_dict, + load_json_config, + merge_configs, + read_pics_config, +) from th_cli.validation import validate_directory_path, validate_file_path, validate_test_ids # Constants @@ -137,8 +144,7 @@ async def run_tests( config = str(config_path) if pics_config_folder: - pics_path = validate_directory_path(pics_config_folder, must_exist=True) - pics_config_folder = str(pics_path) + pics_config_folder = validate_directory_path(pics_config_folder, must_exist=True) client = None _webrtc_handler = None From c9165952a0f7b79976b65f0c9ca18957351490ac Mon Sep 17 00:00:00 2001 From: Steven Green Date: Thu, 16 Jul 2026 16:01:36 -0700 Subject: [PATCH 2/3] update action versions --- .github/workflows/python-lint.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index d433042..2ef93db 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v6 with: python-version: "3.10" @@ -26,7 +26,7 @@ jobs: - name: Load cached venv id: cached-poetry-dependencies - uses: actions/cache@v2 + uses: actions/cache@v6 with: path: .venv key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} @@ -36,7 +36,7 @@ jobs: run: poetry install --no-interaction --no-root - name: Run linters - uses: wearerequired/lint-action@v1 + uses: wearerequired/lint-action@v2 with: github_token: ${{ secrets.github_token }} # Enable linters From 956b7762dc6423f592e4fdcac1ddc94aca2819c1 Mon Sep 17 00:00:00 2001 From: Steven Green Date: Fri, 17 Jul 2026 09:53:38 -0700 Subject: [PATCH 3/3] remove accidentally included changes --- .github/workflows/python-tests.yml | 3 ++- .github/workflows/upload-test-results.yml | 20 ++++++++++++++++++++ th_cli/commands/run_tests.py | 3 ++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/upload-test-results.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 7c9d550..c68bc82 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -36,7 +36,7 @@ jobs: run: poetry install --no-interaction --no-root - name: Run tests - run: ./scripts/run_pytest.sh + run: ./scripts/run_pytest.sh --junitxml=report.xml - name: Upload coverage report uses: actions/upload-artifact@v4 @@ -45,4 +45,5 @@ jobs: name: coverage-report path: | coverage.xml + report.xml htmlcov/ diff --git a/.github/workflows/upload-test-results.yml b/.github/workflows/upload-test-results.yml new file mode 100644 index 0000000..f9ce2e7 --- /dev/null +++ b/.github/workflows/upload-test-results.yml @@ -0,0 +1,20 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['Python Tests'] + types: + - completed +permissions: + contents: read + actions: read + checks: write +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v3 + with: + artifact: coverage-report + name: Python Tests + path: 'report.xml' + reporter: python-xunit \ No newline at end of file diff --git a/th_cli/commands/run_tests.py b/th_cli/commands/run_tests.py index 944c868..918ac7c 100644 --- a/th_cli/commands/run_tests.py +++ b/th_cli/commands/run_tests.py @@ -144,7 +144,8 @@ async def run_tests( config = str(config_path) if pics_config_folder: - pics_config_folder = validate_directory_path(pics_config_folder, must_exist=True) + pics_path = validate_directory_path(pics_config_folder, must_exist=True) + pics_config_folder = str(pics_path) client = None _webrtc_handler = None