This file provides guidance to coding agents when working with code in this repository.
uv sync
cp .env.example .envuv add <package> # add a dependency
uv run python src/your_project_name/main.py # run a script
uv run pytest # run tests
uv run pytest tests/test_foo.py::test_bar # run a single testThis is a data analysis boilerplate. Source code lives in src/your_project_name/ (importable as a package); Jupyter notebooks go in notebooks/; plots go in plots/.
Data directory convention:
data/raw/— original source data, never modifieddata/input/— curated inputs for analysisdata/processed/— cleaned/intermediate datasetsdata/output/— final outputs
The src/ layout means scripts must be run via uv run (or with the .venv activated) so the package is on the path. VS Code is configured to use .venv/bin/python and add src to python.analysis.extraPaths.
Environment variables are loaded from .env via python-dotenv.
- Use
uv run pythonto execute scripts, never barepython - Prefer concise, DRY, imperative code
- Avoid wrapping everything in
printstatements - Use
context7MCP tool for up-to-date package/API documentation - use
pathlibfor file paths - think about best practice libraries to use instead of reinventing the wheel