yc1838 commited on
Commit
69d72de
·
1 Parent(s): f797178

fix tests

Browse files
.github/workflows/ci.yml CHANGED
@@ -27,8 +27,8 @@ jobs:
27
  - name: Install package and dev deps
28
  run: |
29
  python -m pip install --upgrade pip
30
- pip install -e .
31
- pip install pytest ruff
32
 
33
  - name: Lint
34
  run: ruff check src/ tests/
 
27
  - name: Install package and dev deps
28
  run: |
29
  python -m pip install --upgrade pip
30
+ pip install -e ".[test]"
31
+ pip install ruff
32
 
33
  - name: Lint
34
  run: ruff check src/ tests/
pyproject.toml CHANGED
@@ -16,9 +16,13 @@ dependencies = [
16
  "langchain-ollama>=1.0,<2.0",
17
  "langchain-huggingface>=1.0,<2.0",
18
  "langchain-openai>=1.0.0,<2.0",
 
19
  "tavily-python>=0.5.0,<1.0",
 
 
20
  "trafilatura>=1.12.0,<3.0",
21
  "pypdf>=5.0.0,<7.0",
 
22
  "openpyxl>=3.1.0,<4.0",
23
  "python-docx>=1.1.0,<2.0",
24
  "faster-whisper>=1.0.0,<2.0",
 
16
  "langchain-ollama>=1.0,<2.0",
17
  "langchain-huggingface>=1.0,<2.0",
18
  "langchain-openai>=1.0.0,<2.0",
19
+ "datasets>=2.14.0,<4.0",
20
  "tavily-python>=0.5.0,<1.0",
21
+ "requests>=2.31.0,<3.0",
22
+ "httpx>=0.27.0,<1.0",
23
  "trafilatura>=1.12.0,<3.0",
24
  "pypdf>=5.0.0,<7.0",
25
+ "pandas>=2.2.0,<3.0",
26
  "openpyxl>=3.1.0,<4.0",
27
  "python-docx>=1.1.0,<2.0",
28
  "faster-whisper>=1.0.0,<2.0",
src/lilith_agent.egg-info/PKG-INFO CHANGED
@@ -12,9 +12,13 @@ Requires-Dist: langchain-google-genai<5.0,>=4.2.2
12
  Requires-Dist: langchain-ollama<2.0,>=1.0
13
  Requires-Dist: langchain-huggingface<2.0,>=1.0
14
  Requires-Dist: langchain-openai<2.0,>=1.0.0
 
15
  Requires-Dist: tavily-python<1.0,>=0.5.0
 
 
16
  Requires-Dist: trafilatura<3.0,>=1.12.0
17
  Requires-Dist: pypdf<7.0,>=5.0.0
 
18
  Requires-Dist: openpyxl<4.0,>=3.1.0
19
  Requires-Dist: python-docx<2.0,>=1.1.0
20
  Requires-Dist: faster-whisper<2.0,>=1.0.0
 
12
  Requires-Dist: langchain-ollama<2.0,>=1.0
13
  Requires-Dist: langchain-huggingface<2.0,>=1.0
14
  Requires-Dist: langchain-openai<2.0,>=1.0.0
15
+ Requires-Dist: datasets<4.0,>=2.14.0
16
  Requires-Dist: tavily-python<1.0,>=0.5.0
17
+ Requires-Dist: requests<3.0,>=2.31.0
18
+ Requires-Dist: httpx<1.0,>=0.27.0
19
  Requires-Dist: trafilatura<3.0,>=1.12.0
20
  Requires-Dist: pypdf<7.0,>=5.0.0
21
+ Requires-Dist: pandas<3.0,>=2.2.0
22
  Requires-Dist: openpyxl<4.0,>=3.1.0
23
  Requires-Dist: python-docx<2.0,>=1.1.0
24
  Requires-Dist: faster-whisper<2.0,>=1.0.0
src/lilith_agent.egg-info/requires.txt CHANGED
@@ -7,9 +7,13 @@ langchain-google-genai<5.0,>=4.2.2
7
  langchain-ollama<2.0,>=1.0
8
  langchain-huggingface<2.0,>=1.0
9
  langchain-openai<2.0,>=1.0.0
 
10
  tavily-python<1.0,>=0.5.0
 
 
11
  trafilatura<3.0,>=1.12.0
12
  pypdf<7.0,>=5.0.0
 
13
  openpyxl<4.0,>=3.1.0
14
  python-docx<2.0,>=1.1.0
15
  faster-whisper<2.0,>=1.0.0
 
7
  langchain-ollama<2.0,>=1.0
8
  langchain-huggingface<2.0,>=1.0
9
  langchain-openai<2.0,>=1.0.0
10
+ datasets<4.0,>=2.14.0
11
  tavily-python<1.0,>=0.5.0
12
+ requests<3.0,>=2.31.0
13
+ httpx<1.0,>=0.27.0
14
  trafilatura<3.0,>=1.12.0
15
  pypdf<7.0,>=5.0.0
16
+ pandas<3.0,>=2.2.0
17
  openpyxl<4.0,>=3.1.0
18
  python-docx<2.0,>=1.1.0
19
  faster-whisper<2.0,>=1.0.0
tests/test_ci_packaging.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import tomllib
4
+ from pathlib import Path
5
+
6
+
7
+ ROOT = Path(__file__).resolve().parents[1]
8
+
9
+
10
+ def _project_dependencies() -> set[str]:
11
+ data = tomllib.loads((ROOT / "pyproject.toml").read_text())
12
+ deps = data["project"]["dependencies"]
13
+ return {dep.split("[", 1)[0].split(">", 1)[0].split("<", 1)[0].split("=", 1)[0].strip() for dep in deps}
14
+
15
+
16
+ def test_direct_runtime_imports_are_declared_dependencies():
17
+ deps = _project_dependencies()
18
+
19
+ assert {"datasets", "httpx", "pandas", "requests"}.issubset(deps)
20
+
21
+
22
+ def test_ci_installs_test_extra():
23
+ workflow = (ROOT / ".github" / "workflows" / "ci.yml").read_text()
24
+
25
+ assert 'pip install -e ".[test]"' in workflow
tests/test_vision.py CHANGED
@@ -1,5 +1,6 @@
1
  import os
2
 
 
3
  from dotenv import load_dotenv
4
 
5
  from lilith_agent.config import Config
@@ -8,6 +9,11 @@ from lilith_agent.tools.vision import inspect_visual_content
8
  # Load .env before evaluating test configuration.
9
  load_dotenv(override=True)
10
 
 
 
 
 
 
11
  def test_fal_vision_integration(tmp_path):
12
  """
13
  Test the FAL vision integration using GAIA task 8f80e01c-1296-4371-9486-bb3d68651a60.
 
1
  import os
2
 
3
+ import pytest
4
  from dotenv import load_dotenv
5
 
6
  from lilith_agent.config import Config
 
9
  # Load .env before evaluating test configuration.
10
  load_dotenv(override=True)
11
 
12
+
13
+ @pytest.mark.skipif(
14
+ os.getenv("GAIA_RUN_LIVE_VISION_TESTS") != "1" or not os.getenv("GAIA_FAL_VISION_API_KEY"),
15
+ reason="live FAL vision integration requires GAIA_RUN_LIVE_VISION_TESTS=1 and GAIA_FAL_VISION_API_KEY",
16
+ )
17
  def test_fal_vision_integration(tmp_path):
18
  """
19
  Test the FAL vision integration using GAIA task 8f80e01c-1296-4371-9486-bb3d68651a60.