Skip to content

Latest commit

 

History

History
115 lines (78 loc) · 2.17 KB

agents.md

File metadata and controls

115 lines (78 loc) · 2.17 KB

Agent Instructions

Guidelines for AI agents working on this codebase.


Backend

Running the Backend

cd backend
source .venv/bin/activate
uv run run.py

Running Unit Tests

Always activate the virtual environment and use uv to run tests:

cd backend
source .venv/bin/activate
uv run pytest

With verbose output:

cd backend
source .venv/bin/activate
uv run pytest -v

Run a specific test file:

cd backend
source .venv/bin/activate
uv run pytest tests/synthetic/test_sqlite_profiler.py -v

Installing Dependencies

cd backend
uv sync                     # core dependencies only
uv sync --extra connectors  # includes Snowflake, pandas, numpy, pyarrow

Do not use pip install or python -m pytest directly. Always use uv run.


Frontend

cd frontend
npm install
npm run dev

E2E Browser Tests (Playwright)

Test specs live in frontend/e2e/. Playwright is configured in frontend/playwright.config.ts and auto-starts both the backend and frontend dev servers.

Running E2E Tests

make test:e2e

Or from the frontend directory:

cd frontend
npx playwright test

Run in headed mode for debugging:

cd frontend
npx playwright test --headed

Installing Playwright Browsers

If Chromium is not yet installed locally:

cd frontend
npx playwright install chromium

Test Structure

  • frontend/e2e/helpers.ts — shared utilities (createDataset, openContextMenu, waitForToast)
  • frontend/e2e/canvas.spec.ts — core canvas interactions (create dataset, search, auto layout)
  • frontend/e2e/context-menu.spec.ts — context menu actions (view details, edit metadata, delete)

Cursor Background Agent

The browser-tester agent (.cursor/agents/browser-tester.md) runs make test:e2e and iteratively fixes failures, following the same pattern as builder and linter.


Key Conventions

  • Backend virtual environment lives at backend/.venv
  • Python version: >= 3.12
  • Test framework: pytest (configured in backend/pyproject.toml)
  • pythonpath is set to "." in pytest config, so imports use app.* and tests.*