From e8e2d08e4add10fd642191fbb9029626697fc26d Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 16 Jan 2024 16:54:11 +0100 Subject: [PATCH] some other changes, including the workflow --- ...ructured_fileconverter.yml => unstructured.yml} | 14 ++++++++------ integrations/unstructured/pyproject.toml | 2 +- integrations/unstructured/tests/test_converter.py | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) rename .github/workflows/{unstructured_fileconverter.yml => unstructured.yml} (80%) diff --git a/.github/workflows/unstructured_fileconverter.yml b/.github/workflows/unstructured.yml similarity index 80% rename from .github/workflows/unstructured_fileconverter.yml rename to .github/workflows/unstructured.yml index ee70510e9..a160eb597 100644 --- a/.github/workflows/unstructured_fileconverter.yml +++ b/.github/workflows/unstructured.yml @@ -1,17 +1,21 @@ # This workflow comes from https://github.com/ofek/hatch-mypyc # https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml -name: Test / unstructured / fileconverter +name: Test / unstructured on: schedule: - cron: "0 0 * * *" pull_request: paths: - - "integrations/unstructured/fileconverter/**" - - ".github/workflows/unstructured_fileconverter.yml" + - "integrations/unstructured/**" + - ".github/workflows/unstructured.yml" + +defaults: + run: + working-directory: integrations/unstructured concurrency: - group: unstructured_fileconverter-${{ github.head_ref }} + group: unstructured_-${{ github.head_ref }} cancel-in-progress: true env: @@ -50,10 +54,8 @@ jobs: run: pip install --upgrade hatch - name: Lint - working-directory: integrations/unstructured/fileconverter if: matrix.python-version == '3.9' run: hatch run lint:all - name: Run tests - working-directory: integrations/unstructured/fileconverter run: hatch run cov diff --git a/integrations/unstructured/pyproject.toml b/integrations/unstructured/pyproject.toml index bdd40f4aa..e199b3c3e 100644 --- a/integrations/unstructured/pyproject.toml +++ b/integrations/unstructured/pyproject.toml @@ -41,7 +41,7 @@ source = "vcs" tag-pattern = 'integrations\/unstructured-v(?P.*)' [tool.hatch.version.raw-options] -root = "../../.." +root = "../.." git_describe_command = 'git describe --tags --match="integrations/unstructured-v[0-9]*"' [tool.hatch.envs.default] diff --git a/integrations/unstructured/tests/test_converter.py b/integrations/unstructured/tests/test_converter.py index 2ffc442d2..5646bb565 100644 --- a/integrations/unstructured/tests/test_converter.py +++ b/integrations/unstructured/tests/test_converter.py @@ -43,7 +43,7 @@ def test_to_dict(self): converter_dict = converter.to_dict() assert converter_dict == { - "type": "unstructured_fileconverter_haystack.fileconverter.UnstructuredFileConverter", + "type": "haystack_integrations.components.converters.unstructured.converter.UnstructuredFileConverter", "init_parameters": { "api_url": "https://api.unstructured.io/general/v0/general", "document_creation_mode": "one-doc-per-file",