File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - name : Run tests inside Docker container
2626 run : |
2727 docker run \
28- -e HARMONY_LITE=no_transformers \
2928 -e PYTHONPATH=/app/src \
3029 harmony-test
Original file line number Diff line number Diff line change 1212 paths-ignore :
1313 - README.md
1414 workflow_dispatch :
15- env :
16- HARMONY_LITE : no_transformers
17-
15+
1816jobs :
1917 build :
2018 runs-on : ubuntu-latest
@@ -23,11 +21,17 @@ jobs:
2321 python : [3.10.11]
2422
2523 steps :
26- - uses : actions/checkout@v2
24+ - uses : actions/checkout@v4
2725 - name : Setup Python
28- uses : actions/setup-python@v2
26+ uses : actions/setup-python@v5
2927 with :
3028 python-version : ${{ matrix.python }}
29+ cache : ' pip'
30+ cache-dependency-path : pyproject.toml
31+ - name : Lint with ruff
32+ run : |
33+ pip install ruff
34+ ruff check src tests
3135 - name : Install Tox
3236 run : pip install tox
3337 - name : Setup Java
Original file line number Diff line number Diff line change 2222__version__ = "1.0.7"
2323# TODO: make these configurable at package level
2424import os
25+ import warnings
2526from .examples import example_instruments
2627from .schemas import *
2728from .util .instrument_helper import create_instrument_from_list , import_instrument_into_harmony_web
@@ -58,4 +59,9 @@ def generate_basic_harmony_report(*args, **kwargs):
5859 try :
5960 from .matching .default_matcher import match_instruments
6061 except ModuleNotFoundError :
61- print ("Warning: transformers not available. To use transformers, run pip install sentence-transformers" )
62+ warnings .warn (
63+ "transformers not available. To use transformers, run "
64+ "pip install sentence-transformers" ,
65+ ImportWarning ,
66+ stacklevel = 2 ,
67+ )
You can’t perform that action at this time.
0 commit comments