Skip to content

Commit 0a9e5be

Browse files
long tail cicd issues (#18629)
1 parent 9925bf8 commit 0a9e5be

File tree

22 files changed

+47
-35
lines changed

22 files changed

+47
-35
lines changed

llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ name = "llama-index-embeddings-huggingface-optimum"
2929
version = "0.3.0"
3030
description = "llama-index embeddings huggingface optimum integration"
3131
authors = [{name = "Your Name", email = "[email protected]"}]
32-
requires-python = ">=3.9,<4.0"
32+
requires-python = ">=3.10,<4.0"
3333
readme = "README.md"
3434
license = "MIT"
3535
dependencies = [

llama-index-integrations/embeddings/llama-index-embeddings-ibm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-embeddings-ibm"
2828
version = "0.3.1"
2929
description = "llama-index embeddings IBM watsonx.ai integration"
3030
authors = [{name = "IBM"}]
31-
requires-python = ">=3.9,<4.0"
31+
requires-python = ">=3.10,<4.0"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-embeddings-ipex-llm"
2828
version = "0.3.0"
2929
description = "llama-index embeddings ipex-llm integration"
3030
authors = [{name = "Your Name", email = "[email protected]"}]
31-
requires-python = ">=3.9,<4.0"
31+
requires-python = ">=3.10,<4.0"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/embeddings/llama-index-embeddings-vllm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-embeddings-vllm"
2828
version = "0.0.1"
2929
description = "llama-index embeddings vllm integration"
3030
authors = [{name = "Yuri", email = "[email protected]"}]
31-
requires-python = ">=3.9,<4.0"
31+
requires-python = ">=3.10,<4.0"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = ["llama-index-core>=0.12.0,<0.13", "vllm"]

llama-index-integrations/extractors/llama-index-extractors-relik/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-extractors-relik"
2828
version = "0.3.1"
2929
description = "llama-index extractors relik integration"
3030
authors = [{name = "Your Name", email = "[email protected]"}]
31-
requires-python = ">=3.9,<4"
31+
requires-python = ">=3.10,<4"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/llms/llama-index-llms-ibm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-llms-ibm"
2828
version = "0.3.5"
2929
description = "llama-index llms IBM watsonx.ai integration"
3030
authors = [{name = "IBM"}]
31-
requires-python = ">=3.9,<3.13"
31+
requires-python = ">=3.10,<3.13"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/llms/llama-index-llms-ipex-llm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-llms-ipex-llm"
2828
version = "0.3.1"
2929
description = "llama-index llms ipex-llm integration"
3030
authors = [{name = "Your Name", email = "[email protected]"}]
31-
requires-python = ">=3.9,<3.12"
31+
requires-python = ">=3.10,<3.12"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-huggingface/pyproject.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dev = [
1515
"pytest-asyncio==0.21.0",
1616
"pytest-mock==3.11.1",
1717
"ruff==0.0.292",
18-
"torchvision==0.19.1",
1918
"types-Deprecated>=0.1.0",
2019
"types-PyYAML>=6.0.12.12,<7",
2120
"types-protobuf>=4.24.0.4,<5",
@@ -29,15 +28,15 @@ name = "llama-index-multi-modal-llms-huggingface"
2928
version = "0.4.2"
3029
description = "llama-index multi_modal_llms HuggingFace integration by [Cihan Yalçın](https://www.linkedin.com/in/chanyalcin/)"
3130
authors = [{name = "M.Cihan Yalçın", email = "[email protected]"}]
32-
requires-python = ">=3.9,<4.0"
31+
requires-python = ">=3.10,<4.0"
3332
readme = "README.md"
3433
license = "MIT"
3534
dependencies = [
3635
"llama-index-core>=0.12.0,<0.13",
37-
"transformers[torch]~=4.45",
36+
"transformers[torch]>=4.45",
3837
"qwen-vl-utils>=0.0.8",
39-
"torchvision>=0.19.1,<0.20",
40-
"Pillow>=10.0.0,<11",
38+
"torchvision>=0.19.1",
39+
"Pillow>=10.0.0",
4140
]
4241

4342
[tool.codespell]

llama-index-integrations/postprocessor/llama-index-postprocessor-ibm/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ name = "llama-index-postprocessor-ibm"
2828
version = "0.1.0"
2929
description = "llama-index postprocessor IBM watsonx.ai integration"
3030
authors = [{name = "IBM"}]
31-
requires-python = ">=3.9,<3.13"
31+
requires-python = ">=3.10,<3.13"
3232
readme = "README.md"
3333
license = "MIT"
3434
dependencies = [

llama-index-integrations/postprocessor/llama-index-postprocessor-rankllm-rerank/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ name = "llama-index-postprocessor-rankllm-rerank"
2727
version = "0.4.0"
2828
description = "llama-index postprocessor rankllm-rerank integration"
2929
authors = [{name = "Ryan Nguyen", email = "[email protected]"}]
30-
requires-python = ">=3.9,<4.0"
30+
requires-python = ">=3.10,<4.0"
3131
readme = "README.md"
3232
license = "MIT"
3333
dependencies = [

llama-index-integrations/readers/llama-index-readers-chroma/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ name = "llama-index-readers-chroma"
2929
version = "0.3.0"
3030
description = "llama-index readers chroma integration"
3131
authors = [{name = "Your Name", email = "[email protected]"}]
32-
requires-python = ">=3.9,<4.0"
32+
requires-python = ">=3.10,<4.0"
3333
readme = "README.md"
3434
license = "MIT"
3535
maintainers = [{name = "atroyn"}]

llama-index-integrations/readers/llama-index-readers-google/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ name = "llama-index-readers-google"
2727
version = "0.6.1"
2828
description = "llama-index readers google integration"
2929
authors = [{name = "Your Name", email = "[email protected]"}]
30-
requires-python = ">=3.9,<4.0"
30+
requires-python = ">=3.10,<4.0"
3131
readme = "README.md"
3232
license = "MIT"
3333
maintainers = [

llama-index-integrations/readers/llama-index-readers-oxylabs/llama_index/readers/oxylabs/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import abc
22
from platform import architecture, python_version
3-
from typing import Any
3+
from typing import Any, Optional
44
from importlib.metadata import version
55

66
from llama_index.core.readers.base import BasePydanticReader
@@ -18,7 +18,7 @@ class OxylabsBaseReader(BasePydanticReader, abc.ABC):
1818
https://developers.oxylabs.io/scraper-apis/web-scraper-api
1919
"""
2020

21-
top_level_header: str | None = None
21+
top_level_header: Optional[str] = None
2222

2323
timeout_s: int = 100
2424
oxylabs_scraper_url: str = "https://realtime.oxyserps-dev.fun/v1/queries"

llama-index-integrations/readers/llama-index-readers-oxylabs/llama_index/readers/oxylabs/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from typing import Any
1+
from typing import Any, Optional
22

33

4-
def json_to_markdown(data: Any, level: int = 0, header: str | None = None) -> str:
4+
def json_to_markdown(data: Any, level: int = 0, header: Optional[str] = None) -> str:
55
"""
66
Recursively converts a Python object (from JSON) into a Markdown string.
77

llama-index-integrations/readers/llama-index-readers-oxylabs/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name = "llama-index-readers-oxylabs"
1717
version = "0.1.2"
1818
description = "llama-index readers oxylabs integration"
1919
readme = "README.md"
20-
requires-python = ">=3.9, <4.0"
20+
requires-python = ">=3.10,<4.0"
2121
license = "MIT"
2222
authors = [
2323
{name = "Rostyslav Borovyk", email = "[email protected]"},

llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/oxylabs_web/base.py

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
"""Oxylabs Web Reader."""
22

33
import asyncio
4-
from typing import Any, List
4+
from typing import Any, Dict, List, Optional, TYPE_CHECKING
55
from platform import architecture, python_version
66
from importlib.metadata import version
77

8+
from llama_index.core.bridge.pydantic import Field
89
from llama_index.core.readers.base import BasePydanticReader
910
from llama_index.core.schema import Document
1011
from markdownify import markdownify
1112

1213
from llama_index.readers.web.oxylabs_web.utils import strip_html, json_to_markdown
13-
from oxylabs.utils.utils import prepare_config
1414

15-
from oxylabs.internal.api import AsyncAPI, APICredentials, RealtimeAPI
15+
if TYPE_CHECKING:
16+
from oxylabs.internal.api import AsyncAPI, RealtimeAPI
17+
18+
19+
def get_default_config() -> dict[str, Any]:
20+
from oxylabs.utils.utils import prepare_config
21+
22+
return prepare_config(async_integration=True)
1623

1724

1825
class OxylabsWebReader(BasePydanticReader):
@@ -50,11 +57,13 @@ class OxylabsWebReader(BasePydanticReader):
5057

5158
timeout_s: int = 100
5259
oxylabs_scraper_url: str = "https://realtime.oxylabs.io/v1/queries"
53-
api: RealtimeAPI
54-
async_api: AsyncAPI
55-
default_config: dict[str, Any] = prepare_config(async_integration=True)
60+
api: "RealtimeAPI"
61+
async_api: "AsyncAPI"
62+
default_config: dict[str, Any] = Field(default_factory=get_default_config)
5663

5764
def __init__(self, username: str, password: str, **kwargs) -> None:
65+
from oxylabs.internal.api import AsyncAPI, APICredentials, RealtimeAPI
66+
5867
credentials = APICredentials(username=username, password=password)
5968

6069
bits, _ = architecture()
@@ -90,7 +99,7 @@ def _get_document_from_response(self, response: dict[str, Any]) -> Document:
9099
async def aload_data(
91100
self,
92101
urls: list[str],
93-
additional_params: dict[str, Any] | None = None,
102+
additional_params: Optional[Dict[str, Any]] = None,
94103
) -> List[Document]:
95104
"""
96105
Asynchronously load data from urls.
@@ -124,7 +133,7 @@ async def aload_data(
124133
def load_data(
125134
self,
126135
urls: list[str],
127-
additional_params: dict[str, Any] | None = None,
136+
additional_params: Optional[Dict[str, Any]] = None,
128137
) -> List[Document]:
129138
"""
130139
Load data from urls.

llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/oxylabs_web/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from typing import Any
2+
from typing import Any, Optional
33

44
from lxml.html import defs, fromstring, tostring
55
from lxml.html.clean import Cleaner
@@ -74,7 +74,7 @@ def strip_html(html: str) -> str:
7474
return re.sub(r"\n{2,}", "", stripped_html)
7575

7676

77-
def json_to_markdown(data: Any, level: int = 0, header: str | None = None) -> str:
77+
def json_to_markdown(data: Any, level: int = 0, header: Optional[str] = None) -> str:
7878
"""
7979
Recursively converts a Python object (from JSON) into a Markdown string.
8080

llama-index-integrations/readers/llama-index-readers-web/tests/test_readers_oxylabs.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from unittest.mock import MagicMock, AsyncMock
22

33
import pytest
4+
import sys
45

56
from llama_index.readers.web.oxylabs_web.base import OxylabsWebReader
67

@@ -21,7 +22,9 @@
2122
id="response_success",
2223
)
2324

25+
skip_if_py39_or_lower = sys.version_info < (3, 10)
2426

27+
@pytest.mark.skipif(skip_if_py39_or_lower, reason="Pytest does not support Python 3.9")
2528
@pytest.mark.parametrize(
2629
("urls", "additional_params", "return_value", "expected_output"),
2730
[READER_TEST_PARAM],
@@ -47,6 +50,7 @@ def test_sync_oxylabs_reader(
4750
assert doc.text == expected_output
4851

4952

53+
@pytest.mark.skipif(skip_if_py39_or_lower, reason="Pytest does not support Python 3.9")
5054
@pytest.mark.parametrize(
5155
("urls", "additional_params", "return_value", "expected_output"),
5256
[READER_TEST_PARAM],

llama-index-integrations/vector_stores/llama-index-vector-stores-ApertureDB/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ name = "llama-index-vector-stores-ApertureDB"
3131
version = "0.0.2"
3232
description = "llama-index vector_stores ApertureDB integration"
3333
authors = [{name = "ApertureData", email = "[email protected]"}]
34-
requires-python = ">=3.9,<3.13"
34+
requires-python = ">=3.10,<3.13"
3535
readme = "README.md"
3636
license = "MIT"
3737
dependencies = [

llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ name = "llama-index-vector-stores-chroma"
3030
version = "0.4.1"
3131
description = "llama-index vector_stores chroma integration"
3232
authors = [{name = "Your Name", email = "[email protected]"}]
33-
requires-python = ">=3.9,<4.0"
33+
requires-python = ">=3.10,<4.0"
3434
readme = "README.md"
3535
license = "MIT"
3636
dependencies = [

llama-index-packs/llama-index-packs-chroma-autoretrieval/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ name = "llama-index-packs-chroma-autoretrieval"
2929
version = "0.3.0"
3030
description = "llama-index packs chroma_autoretrieval integration"
3131
authors = [{name = "Your Name", email = "[email protected]"}]
32-
requires-python = ">=3.9,<4.0"
32+
requires-python = ">=3.10,<4.0"
3333
readme = "README.md"
3434
license = "MIT"
3535
maintainers = [{name = "logan-markewich"}]

llama-index-packs/llama-index-packs-rag-cli-local/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ name = "llama-index-packs-rag-cli-local"
2929
version = "0.4.0"
3030
description = "llama-index packs rag cli local integration"
3131
authors = [{name = "Your Name", email = "[email protected]"}]
32-
requires-python = ">=3.9,<4.0"
32+
requires-python = ">=3.10,<4.0"
3333
readme = "README.md"
3434
license = "MIT"
3535
maintainers = [{name = "jerryjliu"}]

0 commit comments

Comments
 (0)