deepl-haystack 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. deepl_haystack-0.3.1/.github/CODEOWNERS +15 -0
  2. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/dependabot.yml +2 -2
  3. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/workflows/bump.yml +5 -5
  4. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/workflows/lint.yml +2 -2
  5. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/workflows/publish.yml +2 -2
  6. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/workflows/release.yml +3 -3
  7. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.github/workflows/test.yml +5 -5
  8. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.pre-commit-config.yaml +7 -3
  9. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/PKG-INFO +1 -3
  10. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/pyproject.toml +5 -6
  11. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/tests/test_deepl_document_translator.py +2 -2
  12. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/tests/test_deepl_text_translator.py +7 -7
  13. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/uv.lock +280 -221
  14. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/.gitignore +0 -0
  15. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/LICENSE +0 -0
  16. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/Makefile +0 -0
  17. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/README.md +0 -0
  18. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/deepl_haystack/__init__.py +0 -0
  19. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/deepl_haystack/components.py +0 -0
  20. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/tests/__init__.py +0 -0
  21. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/tests/conftest.py +0 -0
  22. {deepl_haystack-0.3.0 → deepl_haystack-0.3.1}/tests/test_deepl_haystack_init.py +0 -0
@@ -0,0 +1,15 @@
1
+ # Lines starting with '#' are comments.
2
+ # Each line is a file pattern followed by one or more owners.
3
+
4
+ # More details are here: https://help.github.com/articles/about-codeowners/
5
+
6
+ # The '*' pattern is global owners.
7
+
8
+ # Order is important. The last matching pattern has the most precedence.
9
+ # The folders are ordered as follows:
10
+
11
+ # In each subsection folders are ordered first by depth, then alphabetically.
12
+ # This should make it easy to add new rules without breaking existing ones.
13
+
14
+ # Global rule:
15
+ * @dribia/libraries-admin
@@ -16,7 +16,7 @@ updates:
16
16
  commit-message:
17
17
  prefix: ":arrow_up:"
18
18
 
19
- - package-ecosystem: "pip"
19
+ - package-ecosystem: "uv"
20
20
  target-branch: "main"
21
21
  directory: "/" # Location of package manifests
22
22
  schedule:
@@ -34,7 +34,7 @@ updates:
34
34
  prefix: ":arrow_up:"
35
35
  versioning-strategy: "lockfile-only"
36
36
 
37
- - package-ecosystem: "pip"
37
+ - package-ecosystem: "uv"
38
38
  directory: "/" # Location of package manifests
39
39
  schedule:
40
40
  interval: "weekly"
@@ -20,9 +20,9 @@ jobs:
20
20
  contents: 'write'
21
21
  id-token: 'write'
22
22
  steps:
23
- - uses: actions/checkout@v5
23
+ - uses: actions/checkout@v6
24
24
  - name: Install uv
25
- uses: astral-sh/setup-uv@v6
25
+ uses: astral-sh/setup-uv@v7
26
26
  with:
27
27
  enable-cache: true
28
28
  - name: Bump version
@@ -64,7 +64,7 @@ jobs:
64
64
  ENCRYPTED_SECRET=${{ needs.create-release-branch.outputs.encrypted-version }};
65
65
  VERSION=$(echo -n "$ENCRYPTED_SECRET" | base64 --decode | openssl enc -d -a -k "password");
66
66
  echo "version=$VERSION" >> $GITHUB_OUTPUT
67
- - uses: actions/checkout@v4
67
+ - uses: actions/checkout@v6
68
68
  with:
69
69
  ref: main
70
70
  - name: Reset release branch
@@ -79,7 +79,7 @@ jobs:
79
79
  private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}
80
80
  - name: Create Pull Request
81
81
  id: cpr
82
- uses: peter-evans/create-pull-request@v7
82
+ uses: peter-evans/create-pull-request@v8
83
83
  with:
84
84
  token: ${{ steps.generate-token.outputs.token }}
85
85
  commit-message: ":label: Version bump to ${{ steps.decrypt-tag.outputs.version }}"
@@ -105,7 +105,7 @@ jobs:
105
105
  ENCRYPTED_SECRET=${{ needs.create-release-branch.outputs.encrypted-version }};
106
106
  VERSION=$(echo -n "$ENCRYPTED_SECRET" | base64 --decode | openssl enc -d -a -k "password");
107
107
  echo "version=$VERSION" >> $GITHUB_OUTPUT
108
- - uses: actions/checkout@v4
108
+ - uses: actions/checkout@v6
109
109
  with:
110
110
  fetch-depth: 0
111
111
  - name: Delete release branch
@@ -13,9 +13,9 @@ jobs:
13
13
  lint:
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v4
16
+ - uses: actions/checkout@v6
17
17
  - name: Install uv
18
- uses: astral-sh/setup-uv@v6
18
+ uses: astral-sh/setup-uv@v7
19
19
  with:
20
20
  python-version: '3.12'
21
21
  enable-cache: true
@@ -9,9 +9,9 @@ jobs:
9
9
  publish:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v4
12
+ - uses: actions/checkout@v6
13
13
  - name: Install uv
14
- uses: astral-sh/setup-uv@v6
14
+ uses: astral-sh/setup-uv@v7
15
15
  with:
16
16
  enable-cache: true
17
17
  - name: Build
@@ -7,17 +7,17 @@ on:
7
7
 
8
8
  jobs:
9
9
  create-release:
10
- if: contains(github.event.head_commit.message, 'dribia/release/v') && contains(github.event.head_commit.message, '-merge')
10
+ if: contains(github.event.head_commit.message, 'Bumping version from')
11
11
  runs-on: ubuntu-latest
12
12
  permissions:
13
13
  contents: 'write'
14
14
  steps:
15
15
  - name: Checkout
16
- uses: actions/checkout@v4
16
+ uses: actions/checkout@v6
17
17
  - name: Get release tag
18
18
  id: get-tag
19
19
  run: |
20
- TAG=$(echo "${{ github.event.head_commit.message }}" | head -n1 | cut -d"/" -f3 | cut -d"-" -f1);
20
+ TAG=$(echo "${{ github.event.head_commit.message }}" | head -n1 | cut -d" " -f7);
21
21
  echo "tag=$TAG" >> $GITHUB_OUTPUT
22
22
  - name: Release
23
23
  uses: softprops/action-gh-release@v2
@@ -19,9 +19,9 @@ jobs:
19
19
  fail-fast: false
20
20
  runs-on: ${{ matrix.os }}
21
21
  steps:
22
- - uses: actions/checkout@v4
22
+ - uses: actions/checkout@v6
23
23
  - name: Install uv
24
- uses: astral-sh/setup-uv@v6
24
+ uses: astral-sh/setup-uv@v7
25
25
  with:
26
26
  python-version: ${{ matrix.python-version }}
27
27
  enable-cache: true
@@ -29,7 +29,7 @@ jobs:
29
29
  run: uv sync --no-default-groups --group ci --group test
30
30
  - name: Test
31
31
  run: make test-unit
32
- - uses: codecov/codecov-action@v4
32
+ - uses: codecov/codecov-action@v5
33
33
  with:
34
34
  fail_ci_if_error: true
35
35
  token: ${{ secrets.CODECOV_TOKEN }}
@@ -45,9 +45,9 @@ jobs:
45
45
  env:
46
46
  DEEPL_API_KEY: ${{ secrets.DEEPL_API_KEY }}
47
47
  steps:
48
- - uses: actions/checkout@v4
48
+ - uses: actions/checkout@v6
49
49
  - name: Install uv
50
- uses: astral-sh/setup-uv@v6
50
+ uses: astral-sh/setup-uv@v7
51
51
  with:
52
52
  python-version: ${{ matrix.python-version }}
53
53
  enable-cache: true
@@ -16,7 +16,7 @@ repos:
16
16
  - id: end-of-file-fixer
17
17
  - id: trailing-whitespace
18
18
  - repo: https://github.com/astral-sh/uv-pre-commit
19
- rev: 0.8.14
19
+ rev: 0.8.17
20
20
  hooks:
21
21
  - id: uv-lock
22
22
  - id: uv-sync
@@ -34,7 +34,7 @@ repos:
34
34
  hooks:
35
35
  - id: checkmake
36
36
  - repo: https://github.com/astral-sh/ruff-pre-commit
37
- rev: v0.12.11
37
+ rev: v0.13.0
38
38
  hooks:
39
39
  - id: ruff-check
40
40
  types_or: [ python, pyi ]
@@ -43,6 +43,10 @@ repos:
43
43
  - id: ruff-format
44
44
  types_or: [ python, pyi ]
45
45
  - repo: https://github.com/pre-commit/mirrors-mypy
46
- rev: v1.17.1
46
+ rev: v1.18.1
47
47
  hooks:
48
48
  - id: mypy
49
+
50
+ ci:
51
+ autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
52
+ autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepl-haystack
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Haystack integration with DeepL translation services provider.
5
5
  Project-URL: Homepage, https://github.com/dribia/deepl-haystack
6
6
  Project-URL: Repository, https://github.com/dribia/deepl-haystack
@@ -24,8 +24,6 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
24
  Requires-Python: <3.14,>=3.9
25
25
  Requires-Dist: deepl<2,>=1.19.1
26
26
  Requires-Dist: haystack-ai<3,>=2.0.0
27
- Requires-Dist: pytest-dotenv<0.6,>=0.5.2
28
- Requires-Dist: pytest<9,>=8.4.1
29
27
  Description-Content-Type: text/markdown
30
28
 
31
29
  DeepL Haystack Integration
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deepl-haystack"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "Haystack integration with DeepL translation services provider."
5
5
  authors = [{ name = "Albert Iribarne", email = "iribarne@dribia.com" }]
6
6
  requires-python = ">=3.9,<3.14"
@@ -31,8 +31,6 @@ classifiers = [
31
31
  dependencies = [
32
32
  "deepl>=1.19.1,<2",
33
33
  "haystack-ai>=2.0.0,<3",
34
- "pytest-dotenv>=0.5.2,<0.6",
35
- "pytest>=8.4.1,<9",
36
34
  ]
37
35
 
38
36
  [project.urls]
@@ -48,11 +46,12 @@ ci = [
48
46
  test = [
49
47
  "pytest>=8.3.5,<9",
50
48
  "pytest-mock>=3.14.1,<4",
51
- "pytest-cov>=6.2.1,<7",
49
+ "pytest-cov>=7.0.0,<8",
50
+ "pytest-dotenv>=0.5.2,<0.6",
52
51
  ]
53
52
  lint = [
54
- "ruff==0.12.11",
55
- "mypy==1.17.1",
53
+ "ruff==0.14.10",
54
+ "mypy==1.19.1",
56
55
  ]
57
56
 
58
57
  [tool.uv]
@@ -44,7 +44,7 @@ class TestDeepLDocumentTranslator:
44
44
  def test_init_fail_wo_api_key(self, monkeypatch):
45
45
  monkeypatch.delenv("DEEPL_API_KEY", raising=False)
46
46
  with pytest.raises(
47
- ValueError, match="None of the .* environment variables are set"
47
+ ValueError, match=r"None of the .* environment variables are set"
48
48
  ):
49
49
  DeepLDocumentTranslator()
50
50
 
@@ -214,7 +214,7 @@ class TestDeepLDocumentTranslator:
214
214
  },
215
215
  }
216
216
  with pytest.raises(
217
- ValueError, match="None of the .* environment variables are set"
217
+ ValueError, match=r"None of the .* environment variables are set"
218
218
  ):
219
219
  DeepLDocumentTranslator.from_dict(data)
220
220
 
@@ -43,7 +43,7 @@ class TestDeepLTextTranslator:
43
43
  def test_init_fail_wo_api_key(self, monkeypatch):
44
44
  monkeypatch.delenv("DEEPL_API_KEY", raising=False)
45
45
  with pytest.raises(
46
- ValueError, match="None of the .* environment variables are set"
46
+ ValueError, match=r"None of the .* environment variables are set"
47
47
  ):
48
48
  DeepLTextTranslator()
49
49
 
@@ -51,7 +51,7 @@ class TestDeepLTextTranslator:
51
51
  monkeypatch.setenv("DEEPL_API_KEY", "test-api-key")
52
52
  with pytest.raises(
53
53
  ValueError,
54
- match="`target_lang` must be a string representing a language code.",
54
+ match=r"`target_lang` must be a string representing a language code.",
55
55
  ):
56
56
  DeepLTextTranslator(target_lang=None)
57
57
 
@@ -207,7 +207,7 @@ class TestDeepLTextTranslator:
207
207
  },
208
208
  }
209
209
  with pytest.raises(
210
- ValueError, match="None of the .* environment variables are set"
210
+ ValueError, match=r"None of the .* environment variables are set"
211
211
  ):
212
212
  DeepLTextTranslator.from_dict(data)
213
213
 
@@ -254,7 +254,7 @@ class TestDeepLTextTranslator:
254
254
  source_lang=DEFAULT_SOURCE_LANG,
255
255
  target_lang="ES",
256
256
  )
257
- with pytest.raises(ValueError, match="Empty text provided."):
257
+ with pytest.raises(ValueError, match=r"Empty text provided."):
258
258
  component.run("")
259
259
 
260
260
  mock_translation.assert_not_called()
@@ -271,7 +271,7 @@ class TestDeepLTextTranslator:
271
271
  source_lang=DEFAULT_SOURCE_LANG,
272
272
  target_lang="ES",
273
273
  )
274
- with pytest.raises(DeepLException, match="Error translating"):
274
+ with pytest.raises(DeepLException, match=r"Error translating"):
275
275
  component.run("Error translating")
276
276
 
277
277
  def test_run_with_source_lang(self, monkeypatch, mock_translation):
@@ -326,9 +326,9 @@ class TestDeepLTextTranslator:
326
326
  with pytest.raises(
327
327
  TypeError,
328
328
  match=(
329
- "DeepLTextTranslator expects a string as an input. "
329
+ r"DeepLTextTranslator expects a string as an input. "
330
330
  "In case you want to translate a list of Documents, "
331
- "please use the DeepLDocumentTranslator."
331
+ r"please use the DeepLDocumentTranslator."
332
332
  ),
333
333
  ):
334
334
  component.run(wrong_input)