Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ on:
paths-ignore:
- README.md
workflow_dispatch:
env:
HARMONY_LITE: no_transformers


jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,11 +21,17 @@ 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 }}
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
Expand Down
8 changes: 7 additions & 1 deletion src/harmony/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Loading