From 33f3b1cf955fa876abdb24fafb1e20e6b242bb2b Mon Sep 17 00:00:00 2001 From: Vinicius Vaz Date: Mon, 23 Oct 2023 11:17:26 -0300 Subject: [PATCH] add tests dependencies to workflow --- .github/workflows/validate-and-organize.yml | 2 +- config.toml | 2 +- pieces/TextSummarizerPiece/test_text_summarizer_piece.py | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validate-and-organize.yml b/.github/workflows/validate-and-organize.yml index d9f48ec..21c41a0 100644 --- a/.github/workflows/validate-and-organize.yml +++ b/.github/workflows/validate-and-organize.yml @@ -42,7 +42,7 @@ jobs: domino piece organize --build-images --source-url=https://github.com/${{github.repository}} - name: Install Tests Dependencies - run: pip install pytest + run: pip install pytest && pip install tiktoken - name: Run tests over built images env: diff --git a/config.toml b/config.toml index ea80e05..5f09c4d 100644 --- a/config.toml +++ b/config.toml @@ -10,4 +10,4 @@ REPOSITORY_LABEL = "OpenAI Domino Pieces" # The version of this Pieces release # Attention: changing this will create a new release VERSION = "0.4.0" - \ No newline at end of file + \ No newline at end of file diff --git a/pieces/TextSummarizerPiece/test_text_summarizer_piece.py b/pieces/TextSummarizerPiece/test_text_summarizer_piece.py index cdfcd55..6954c8c 100644 --- a/pieces/TextSummarizerPiece/test_text_summarizer_piece.py +++ b/pieces/TextSummarizerPiece/test_text_summarizer_piece.py @@ -68,10 +68,3 @@ def test_piece(): encoding = tiktoken.encoding_for_model(piece_kwargs["openai_model"]) text_tokens = encoding.encode(text=generated_prompt) assert len(text_tokens) <= piece_kwargs["completion_max_tokens"] - - - - - -if __name__ == "__main__": - test_piece()