From 904f1aa43df79d0c3df834a4f619663105d19ba0 Mon Sep 17 00:00:00 2001 From: sainekk Date: Thu, 28 May 2026 00:56:46 +0300 Subject: [PATCH 1/5] drop dead HARMONY_LITE env var from CI --- .github/workflows/docker.yml | 1 - .github/workflows/test.yml | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 059479a..a183387 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,6 +25,5 @@ jobs: - name: Run tests inside Docker container run: | docker run \ - -e HARMONY_LITE=no_transformers \ -e PYTHONPATH=/app/src \ harmony-test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a492a7..a87d396 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,7 @@ on: paths-ignore: - README.md workflow_dispatch: -env: - HARMONY_LITE: no_transformers - + jobs: build: runs-on: ubuntu-latest From 5c39e1638d14d4db4c851234c42cd548100dcf97 Mon Sep 17 00:00:00 2001 From: sainekk Date: Thu, 28 May 2026 01:04:05 +0300 Subject: [PATCH 2/5] bump checkout and setup-python actions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a87d396..5352bd2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,9 +21,9 @@ jobs: python: [3.10.11] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: Install Tox From 0ccc7ca9a8a8c5e96c3d773fbf5953e1f314ba83 Mon Sep 17 00:00:00 2001 From: sainekk Date: Thu, 28 May 2026 01:42:15 +0300 Subject: [PATCH 3/5] cache pip wheels in CI --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5352bd2..0f616e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + cache: 'pip' + cache-dependency-path: pyproject.toml - name: Install Tox run: pip install tox - name: Setup Java From 8ed16bb76593c241691fa20c20631ffcf9cf3709 Mon Sep 17 00:00:00 2001 From: sainekk Date: Thu, 28 May 2026 12:21:56 +0300 Subject: [PATCH 4/5] enforce ruff lint in CI --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f616e2..0cbbcfd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,10 @@ jobs: python-version: ${{ matrix.python }} cache: 'pip' cache-dependency-path: pyproject.toml + - name: Lint with ruff + run: | + pip install ruff + ruff check src tests - name: Install Tox run: pip install tox - name: Setup Java From f108132054524e432c0944e28d6971d567bbbf8d Mon Sep 17 00:00:00 2001 From: sainekk Date: Thu, 28 May 2026 13:39:55 +0300 Subject: [PATCH 5/5] use warnings.warn instead of print for missing transformers --- src/harmony/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/harmony/__init__.py b/src/harmony/__init__.py index 6623ba6..31e8a39 100644 --- a/src/harmony/__init__.py +++ b/src/harmony/__init__.py @@ -22,6 +22,7 @@ __version__ = "1.0.7" # TODO: make these configurable at package level import os +import warnings from .examples import example_instruments from .schemas import * from .util.instrument_helper import create_instrument_from_list, import_instrument_into_harmony_web @@ -58,4 +59,9 @@ def generate_basic_harmony_report(*args, **kwargs): try: from .matching.default_matcher import match_instruments except ModuleNotFoundError: - print("Warning: transformers not available. To use transformers, run pip install sentence-transformers") + warnings.warn( + "transformers not available. To use transformers, run " + "pip install sentence-transformers", + ImportWarning, + stacklevel=2, + )