Skip to content

Commit a79ef41

Browse files
authored
Retire ragas.experimental namespace (#2223)
## Summary - Move experimental tests to appropriate locations in main test structure - Update build infrastructure to remove experimental references - Remove obsolete experimental directory and scripts
1 parent 11a138e commit a79ef41

File tree

20 files changed

+193
-321
lines changed

20 files changed

+193
-321
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ jobs:
123123
# Run different test suites based on test type
124124
if [ "${{ matrix.test-type }}" = "full" ]; then
125125
# Full test suite with notebook tests
126-
uv run pytest --nbmake tests/unit tests/experimental "${OPTS[@]}"
126+
uv run pytest --nbmake tests/unit "${OPTS[@]}"
127127
else
128128
# Essential tests only (faster for cross-platform validation)
129-
uv run pytest tests/unit tests/experimental -k "not slow" "${OPTS[@]}"
129+
uv run pytest tests/unit -k "not slow" "${OPTS[@]}"
130130
fi
131131
env:
132132
__RAGAS_DEBUG_TRACKING: true

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ make test-e2e
8888

8989
# Direct pytest commands for more control
9090
uv run pytest tests/unit -k "test_name"
91-
uv run pytest tests/experimental -v
91+
uv run pytest tests/unit -v
9292
```
9393

9494
### Documentation
@@ -161,7 +161,7 @@ The experimental features are now integrated into the main ragas package:
161161
To use experimental features:
162162

163163
```python
164-
from ragas.experimental import Dataset
164+
from ragas import Dataset
165165
from ragas import experiment
166166
from ragas.backends import get_registry
167167
```

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ make run-ci # Run full CI pipeline
194194

195195
# Or use direct commands for specific tasks
196196
uv run pytest tests/unit # Run core unit tests
197-
uv run pytest tests/experimental # Run experimental tests
197+
uv run pytest tests/unit # Run unit tests
198198
uv run pyright src # Type check source code
199199
```
200200

@@ -278,7 +278,7 @@ make install
278278
uv run pytest tests/unit/test_specific.py -v
279279

280280
# Check experimental test dependencies
281-
uv run pytest tests/experimental --collect-only
281+
uv run pytest tests/unit --collect-only
282282
```
283283

284284
#### Formatting Issues

Makefile

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ install: ## Install full dependencies with uv sync (backward compatible - modern
4848
# CODE QUALITY
4949
# =============================================================================
5050

51-
.PHONY: help setup-venv install-minimal install format type check clean test test-e2e benchmarks benchmarks-docker run-ci run-ci-fast run-ci-format-check run-ci-type run-ci-tests build-docs serve-docs process-experimental-notebooks
51+
.PHONY: help setup-venv install-minimal install format type check clean test test-e2e benchmarks benchmarks-docker run-ci run-ci-fast run-ci-format-check run-ci-type run-ci-tests build-docs serve-docs
5252
format: ## Format and lint all code
5353
@echo "Formatting and linting all code..."
5454
@echo "(ruff format) Formatting ragas..."
@@ -84,7 +84,7 @@ benchmarks-docker: ## Run benchmarks in docker
8484

8585
benchmarks-test: ## Run benchmarks for ragas unit tests
8686
@echo "Running ragas unit tests with timing benchmarks..."
87-
$(Q)uv run --active pytest --nbmake tests/unit tests/experimental --durations=0 -v $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
87+
$(Q)uv run --active pytest --nbmake tests/unit --durations=0 -v $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
8888

8989
# =============================================================================
9090
# CI/BUILD
@@ -98,7 +98,7 @@ run-ci: ## Run complete CI pipeline (mirrors GitHub CI exactly)
9898
@echo "Type check..."
9999
$(Q)$(MAKE) type
100100
@echo "Unit tests..."
101-
$(Q)__RAGAS_DEBUG_TRACKING=true RAGAS_DO_NOT_TRACK=true uv run --active pytest --nbmake tests/unit tests/experimental --dist loadfile -n auto
101+
$(Q)__RAGAS_DEBUG_TRACKING=true RAGAS_DO_NOT_TRACK=true uv run --active pytest --nbmake tests/unit --dist loadfile -n auto
102102
@echo "All CI checks passed!"
103103

104104
run-ci-format-check: ## Run format check in dry-run mode (like GitHub CI)
@@ -113,23 +113,23 @@ run-ci-type: ## Run type checking (matches GitHub CI)
113113

114114
run-ci-tests: ## Run all tests with CI options
115115
@echo "Running all tests with CI options..."
116-
$(Q)__RAGAS_DEBUG_TRACKING=true RAGAS_DO_NOT_TRACK=true pytest --nbmake tests/unit tests/experimental --dist loadfile -n auto
116+
$(Q)__RAGAS_DEBUG_TRACKING=true RAGAS_DO_NOT_TRACK=true pytest --nbmake tests/unit --dist loadfile -n auto
117117

118118
run-ci-fast: ## Fast CI check for quick local validation (2-3 minutes)
119119
@echo "Running fast CI check for quick feedback..."
120120
@echo "Format check..."
121121
$(Q)uv run --active ruff format --check src tests docs --config pyproject.toml
122122
$(Q)uv run --active ruff check src docs tests --config pyproject.toml
123123
@echo "Core unit tests (no nbmake for speed)..."
124-
$(Q)uv run --active pytest tests/unit tests/experimental --dist loadfile -n auto -x
124+
$(Q)uv run --active pytest tests/unit --dist loadfile -n auto -x
125125
@echo "Fast CI check completed!"
126126

127127
clean: ## Clean all generated files
128128
@echo "Cleaning all generated files..."
129129
$(Q)find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
130130
$(Q)rm -rf site/ docs/site/ .mypy_cache .pytest_cache .ruff_cache
131-
$(Q)rm -rf dist/ build/ *.egg-info/ src/*.egg-info/ experimental/*.egg-info/
132-
$(Q)rm -rf .coverage htmlcov/ .tox/ .venv/ experimental/.venv/
131+
$(Q)rm -rf dist/ build/ *.egg-info/ src/*.egg-info/
132+
$(Q)rm -rf .coverage htmlcov/ .tox/ .venv/
133133
$(Q)find . -name '*.log' -delete
134134
$(Q)find . -name '.DS_Store' -delete
135135
$(Q)find . -name 'temp*' -type d -exec rm -rf {} + 2>/dev/null || true
@@ -142,11 +142,11 @@ clean: ## Clean all generated files
142142

143143
test: ## Run all unit tests
144144
@echo "Running all unit tests..."
145-
$(Q)uv run --active pytest tests/unit tests/experimental $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
145+
$(Q)uv run --active pytest tests/unit $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
146146

147147
test-all: ## Run all unit tests (including notebooks)
148148
@echo "Running all unit tests (including notebooks)..."
149-
$(Q)uv run --active pytest --nbmake tests/unit tests/experimental $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
149+
$(Q)uv run --active pytest --nbmake tests/unit $(shell if [ -n "$(k)" ]; then echo "-k $(k)"; fi)
150150

151151
test-e2e: ## Run all end-to-end tests
152152
@echo "Running all end-to-end tests..."
@@ -156,11 +156,7 @@ test-e2e: ## Run all end-to-end tests
156156
# DOCUMENTATION
157157
# =============================================================================
158158

159-
process-experimental-notebooks: ## Process experimental notebooks to markdown for MkDocs
160-
@echo "Processing experimental notebooks..."
161-
$(Q)python $(GIT_ROOT)/scripts/process_experimental_notebooks.py
162-
163-
build-docs: process-experimental-notebooks ## Build all documentation
159+
build-docs: ## Build all documentation
164160
@echo "Building all documentation..."
165161
@echo "Converting ipynb notebooks to md files..."
166162
$(Q)python $(GIT_ROOT)/docs/ipynb_to_md.py

examples/agent_evals/evals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from agent import get_default_agent
22

33
from ragas import experiment
4-
from ragas.experimental import Dataset
4+
from ragas import Dataset
55
from ragas.metrics.numeric import numeric_metric
66
from ragas.metrics.result import MetricResult
77

examples/prompt_evals/evals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from prompt import run_prompt
22

33
from ragas import experiment
4-
from ragas.experimental import Dataset
4+
from ragas import Dataset
55
from ragas.metrics.discrete import discrete_metric
66
from ragas.metrics.result import MetricResult
77

examples/rag_eval/evals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from rag import default_rag_client
55

66
from ragas import experiment
7-
from ragas.experimental import Dataset
7+
from ragas import Dataset
88
from ragas.llms import instructor_llm_factory
99
from ragas.metrics import DiscreteMetric
1010

examples/workflow_eval/evals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from workflow import default_workflow_client
55

66
from ragas import experiment
7-
from ragas.experimental import Dataset
7+
from ragas import Dataset
88
from ragas.llms import instructor_llm_factory
99
from ragas.metrics import DiscreteMetric
1010

pyproject.toml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,19 @@ dependencies = [
1212
"nest-asyncio",
1313
"appdirs",
1414
"diskcache>=5.6.3",
15-
16-
# LangChain ecosystem
17-
"langchain",
18-
"langchain-core",
19-
"langchain-community",
20-
"langchain_openai",
21-
22-
# CLI dependencies
2315
"typer",
2416
"rich",
25-
26-
# LLM providers
2717
"openai>=1.0.0",
28-
29-
# Experimental features
3018
"tqdm",
3119
"instructor",
3220
"gitpython",
3321
"pillow>=10.4.0",
22+
23+
# LangChain ecosystem
24+
"langchain",
25+
"langchain-core",
26+
"langchain-community",
27+
"langchain_openai",
3428
]
3529
dynamic = ["version", "readme"]
3630

@@ -117,7 +111,6 @@ preview = false
117111

118112
[tool.pyright]
119113
include = ["src/ragas"]
120-
exclude = ["src/ragas/experimental"]
121114
excludeTypeshedPaths = ["@types/*"]
122115
pythonVersion = "3.9"
123116
pythonPlatform = "All"
@@ -140,10 +133,6 @@ version_file = "src/ragas/_version.py"
140133
addopts = "-n 0"
141134
asyncio_default_fixture_loop_scope = "function"
142135
testpaths = ["tests"]
143-
markers = [
144-
"experimental_ci: Set of tests that will be run as part of Experimental CI",
145-
"e2e: End-to-End tests for Experimental",
146-
]
147136

148137
[dependency-groups]
149138
# Full dev dependencies with all features (used by make install)

scripts/process_experimental_notebooks.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)