Abid Ali Awan commited on
Commit
b4b8231
·
1 Parent(s): 8c1d338

feat: Enhance data analysis tool with new visualization features, improve model training metrics, and update deployment examples for better clarity.

Browse files
Files changed (1) hide show
  1. AGENTS.md +31 -0
AGENTS.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+ - `app.py`: Gradio 6 MCP server exposing analyze/train/deploy/auto-deploy tools.
5
+ - `modal_backend.py`: Modal functions for data analysis, training, and deployment; keep remote-heavy logic isolated here.
6
+ - `requirements.txt`: runtime/tooling pins. Create a local `.venv/` for installs. Place tests in `tests/` mirroring modules (e.g., `tests/test_app.py`).
7
+
8
+ ## Build, Test, and Development Commands
9
+ - Create env: `uv venv` and activate `.venv\Scripts\activate`.
10
+ - Install deps with uv (faster resolver inside the venv): `uv pip install -r requirements.txt --python .venv\Scripts\python.exe`.
11
+ - Run MCP server locally: `python app.py` (starts Gradio Blocks with `mcp_server=True`).
12
+ - Deploy Modal backend: `modal deploy modal_backend.py` (publishes functions/volume).
13
+
14
+ ## Coding Style & Naming Conventions
15
+ - Python 3.10+; 4-space indents, type hints, and short docstrings for agent-facing tools.
16
+ - Keep Modal calls wrapped in small helpers; pass explicit JSON-safe payloads.
17
+ - Name new tools with `_tool` suffix; snake_case for functions/variables; prefer descriptive model/task identifiers in logs and outputs.
18
+
19
+ ## Testing Guidelines
20
+ - Add unit tests for request/response handling and error branches; mock Modal functions to keep runs local.
21
+ - Gate any integration tests hitting Modal behind env flags to avoid accidental remote calls.
22
+ - Command once tests exist: `python -m pytest`; ensure coverage of missing-column errors and invalid `model_id` paths.
23
+
24
+ ## Commit & Pull Request Guidelines
25
+ - Commit subject in imperative mood (e.g., "Add auto deploy tool"), ~50 chars; add a short body when explaining decisions/rollouts.
26
+ - PRs should state what changed, why, and how to verify (commands or sample outputs). Link issues; attach screenshots/log snippets when tool responses or UI surfaces change.
27
+
28
+ ## Security & Configuration
29
+ - Run `modal setup` locally; keep Modal tokens and API keys out of git. Use `.env` or Modal secrets instead of hardcoding.
30
+ - Do not commit user CSVs/PII; use sanitized fixtures for examples/tests and keep temporary data outside the repo.
31
+ - Keep docs and sample endpoints aligned with the currently deployed Modal app URL.