Skip to content

Commit 1295bc3

Browse files
authored
Cleaner, simpler pyproject.toml (#2173)
Organization: - [project.optional-dependencies]: all, examples, tracing, gdrive, ai-frameworks - user features - [dependency-groups]: dev, docs - development/maintenance tasks Usage: - Users: `pip install ragas[all,tracing]` - Developers: `uv sync --group dev --group docs`
1 parent bcf870d commit 1295bc3

File tree

3 files changed

+48
-61
lines changed

3 files changed

+48
-61
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
- name: Install dependencies
112112
run: |
113113
# Use UV with system installation for CI (simpler and more reliable)
114-
uv pip install --system -e "./ragas[dev]" --cache-dir ~/.cache/uv
114+
cd ragas && uv pip install --system -e "." --group dev --cache-dir ~/.cache/uv
115115
116116
- name: Run unit tests
117117
run: |
@@ -173,7 +173,7 @@ jobs:
173173
- name: Install dependencies
174174
run: |
175175
# Use UV with system installation for CI (simpler and more reliable)
176-
uv pip install --system -e "./ragas[dev]" --cache-dir ~/.cache/uv
176+
cd ragas && uv pip install --system -e "." --group dev --cache-dir ~/.cache/uv
177177
178178
- name: Format check (dry run)
179179
run: |

.readthedocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ build:
88
tools:
99
python: "3.12"
1010
commands:
11-
- pip install -e "./ragas[docs]"
11+
- pip install uv
12+
- cd ragas && uv pip install --system -e "." --group docs
1213
- if [ -n "$GH_TOKEN" ]; then pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git; fi
1314
- mkdocs build --site-dir $READTHEDOCS_OUTPUT/html

ragas/pyproject.toml

Lines changed: 44 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
22
name = "ragas"
33
requires-python = ">=3.9"
44
dependencies = [
5+
# Core dependencies
56
"numpy",
67
"datasets",
78
"tiktoken",
9+
"pydantic>=2.0.0",
10+
"nest-asyncio",
11+
"appdirs",
12+
"diskcache>=5.6.3",
13+
14+
# LangChain ecosystem
815
"langchain",
916
"langchain-core",
1017
"langchain-community",
1118
"langchain_openai",
12-
"nest-asyncio",
13-
"appdirs",
14-
"pydantic>=2",
15-
"openai>1",
16-
"diskcache>=5.6.3",
17-
# Experimental dependencies
19+
20+
# LLM providers
21+
"openai>=1.0.0",
22+
23+
# CLI and experimental features
1824
"tqdm",
1925
"instructor",
2026
"gitpython",
2127
"typer",
2228
"rich",
2329
"pillow>=10.4.0",
24-
"pyright>=1.1.403",
25-
"google-api-python-client>=2.178.0",
26-
"google-auth>=2.40.3",
27-
"google-auth-oauthlib>=1.2.2",
28-
"langfuse>=3.2.4",
29-
"mlflow>=3.1.4",
3030
]
3131
dynamic = ["version", "readme"]
3232

3333
[project.optional-dependencies]
34+
# Core optional features
3435
all = [
3536
"sentence-transformers",
3637
"transformers",
@@ -39,60 +40,21 @@ all = [
3940
"rapidfuzz",
4041
"pandas",
4142
"datacompy",
43+
"sacrebleu",
4244
"llama_index",
4345
"r2r"
4446
]
47+
48+
# Specific integrations
4549
examples = ["openai>=1.0.0"]
46-
tracing = ["langfuse", "mlflow"]
50+
tracing = ["langfuse>=3.2.4", "mlflow>=3.1.4"]
4751
gdrive = [
48-
"google-api-python-client>=2.0.0",
49-
"google-auth>=2.0.0",
50-
"google-auth-oauthlib>=1.0.0"
51-
]
52-
docs = [
53-
"mkdocs>=1.6.1",
54-
"mkdocs-material",
55-
"mkdocs-material[imaging]",
56-
"mkdocstrings[python]",
57-
"mkdocs-glightbox",
58-
"mkdocs-autorefs",
59-
"mkdocs-gen-files",
60-
"mkdocs-literate-nav",
61-
"mkdocs-section-index",
62-
"mkdocs-git-committers-plugin-2",
63-
"mkdocs-git-revision-date-localized-plugin",
64-
]
65-
dev = [
66-
"rich",
67-
"ruff",
68-
"black[jupyter]",
69-
"pyright",
70-
"llama_index",
71-
"notebook",
72-
"sphinx-autobuild",
73-
"sentence-transformers",
74-
"transformers",
75-
"fastembed",
76-
"graphene",
77-
"rouge_score",
78-
"nltk",
79-
"rapidfuzz",
80-
"pandas",
81-
"datacompy",
82-
"haystack-ai",
83-
"sacrebleu",
84-
"r2r",
85-
"pytest",
86-
"pytest-xdist[psutil]",
87-
"pytest-asyncio",
88-
"nbmake",
89-
"pre-commit>=4.3.0",
9052
"google-api-python-client>=2.178.0",
9153
"google-auth>=2.40.3",
92-
"google-auth-oauthlib>=1.2.2",
93-
"langfuse>=3.2.4",
94-
"mlflow>=3.1.4",
54+
"google-auth-oauthlib>=1.2.2"
9555
]
56+
ai-frameworks = ["haystack-ai"]
57+
9658
test = []
9759
[project.entry-points."ragas.backends"]
9860
"local/csv" = "ragas.experimental.backends.local_csv:LocalCSVBackend"
@@ -133,6 +95,30 @@ markers = [
13395

13496
[dependency-groups]
13597
dev = [
98+
"ruff",
99+
"black[jupyter]",
100+
"pyright>=1.1.403",
101+
"pre-commit>=4.3.0",
102+
"pytest",
103+
"pytest-xdist[psutil]",
104+
"pytest-asyncio",
105+
"nbmake",
106+
"notebook",
136107
"arize-phoenix>=6.1.0",
137108
"openinference-instrumentation-langchain>=0.1.29",
109+
"ragas[all,tracing,gdrive,ai-frameworks]",
110+
]
111+
112+
docs = [
113+
"mkdocs>=1.6.1",
114+
"mkdocs-material",
115+
"mkdocs-material[imaging]",
116+
"mkdocstrings[python]",
117+
"mkdocs-glightbox",
118+
"mkdocs-autorefs",
119+
"mkdocs-gen-files",
120+
"mkdocs-literate-nav",
121+
"mkdocs-section-index",
122+
"mkdocs-git-committers-plugin-2",
123+
"mkdocs-git-revision-date-localized-plugin",
138124
]

0 commit comments

Comments
 (0)