diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 616eaea1ffa16177bc8a6961a8846c96276abd13..639071a44740ea2beaa037d0655c12ddc8aaa836 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,6 +36,9 @@ jobs: - name: Install dependencies run: | poetry install + - name: Download nltk data + run: | + python -m nltk.downloader punkt - name: Pytest run: | make test diff --git a/coverage.xml b/coverage.xml index 5a9baac40ad0c645d33ae790e8d5c600a3cf7c01..3c9c2e7c7acc2890d77de9dd322f29415a4d39aa 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,5 +1,5 @@ <?xml version="1.0" ?> -<coverage version="7.3.2" timestamp="1702458696684" lines-valid="311" lines-covered="311" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> +<coverage version="7.3.2" timestamp="1702458856280" lines-valid="311" lines-covered="311" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> <!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.3.2 --> <!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --> <sources> diff --git a/tests/unit/test_layer.py b/tests/unit/test_layer.py index 4a527a41a6f6b13dc0adebbc1279a410dc7b0104..4d919f912ae635269e9f7dca93ac85030f9dd7cd 100644 --- a/tests/unit/test_layer.py +++ b/tests/unit/test_layer.py @@ -1,5 +1,4 @@ import pytest -import nltk from semantic_router.encoders import BaseEncoder, CohereEncoder, OpenAIEncoder from semantic_router.layer import ( @@ -7,11 +6,8 @@ from semantic_router.layer import ( HybridDecisionLayer, ) -# Replace with the actual module name from semantic_router.schema import Decision -nltk.download("punkt") - def mock_encoder_call(utterances): # Define a mapping of utterances to return values