chore: simplify the management of test dependencies (#6559)

* remove audio dep group

* extract dependencies

* beautify

* rm one step
This commit is contained in:
Stefano Fiorucci 2023-12-15 16:40:41 +01:00 committed by GitHub
parent ae1f39a76e
commit cf47abdff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 18 deletions

View File

@ -35,8 +35,8 @@ jobs:
sudo apt-get update
sudo apt install ffmpeg # for local Whisper tests
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Run tests
run: pytest e2e

View File

@ -38,7 +38,10 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf tika 'azure-ai-formrecognizer>=3.2.0b2'
run: pip install .[dev]
- name: Install the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Mypy
if: steps.files.outputs.any_changed == 'true'
@ -67,9 +70,8 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Haystack
run: |
pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf markdown-it-py mdit_plain tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Pylint
if: steps.files.outputs.any_changed == 'true'

View File

@ -97,8 +97,8 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf markdown-it-py mdit_plain tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Run
run: pytest -m "not integration" test
@ -155,8 +155,8 @@ jobs:
sudo apt update
sudo apt install ffmpeg # for local Whisper tests
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf markdown-it-py mdit_plain tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Run
run: pytest --maxfail=5 -m "integration" test
@ -211,8 +211,8 @@ jobs:
brew install docker
colima start
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf markdown-it-py mdit_plain tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Run Tika
run: docker run -d -p 9998:9998 apache/tika:2.9.0.0
@ -262,8 +262,8 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Haystack
run: pip install .[dev,audio] langdetect transformers[torch,sentencepiece]==4.35.2 'sentence-transformers>=2.2.0' pypdf markdown-it-py mdit_plain tika 'azure-ai-formrecognizer>=3.2.0b2'
- name: Install Haystack and the dependencies needed for tests
run: pip install -r test/test_requirements.txt
- name: Run
run: pytest --maxfail=5 -m "integration" test -k 'not tika'

View File

@ -90,10 +90,6 @@ dev = [
"black[jupyter]~=23.0",
]
audio = [
"openai-whisper>=20231106"
]
[project.urls]
"CI: GitHub" = "https://github.com/deepset-ai/haystack/actions"
"Docs: RTD" = "https://haystack.deepset.ai/overview/intro"

View File

@ -0,0 +1,16 @@
.[dev]
# Package Components
transformers[torch,sentencepiece]==4.35.2 # ExtractiveReader, TransformersSimilarityRanker, LocalWhisperTranscriber, HFGenerators...
# Converters
pypdf # PyPDFConverter
markdown-it-py # MarkdownToDocument
mdit_plain # MarkdownToDocument
tika # TikaDocumentConverter
azure-ai-formrecognizer>=3.2.0b2 # AzureOCRDocumentConverter
langdetect # TextLanguageRouter and DocumentLanguageClassifier
sentence-transformers>=2.2.0 # SentenceTransformersTextEmbedder and SentenceTransformersDocumentEmbedder
openai-whisper>=20231106 # LocalWhisperTranscriber