From 6f82d05b70e560d66940839d584957fc60318e34 Mon Sep 17 00:00:00 2001 From: Mario Schlicht <196292603+mschlicht-tt@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:51:16 +0200 Subject: [PATCH] Add CLAUDE.md with virtual environment guidance Instructs Claude Code to always work in the project's .venv instead of the global Python, how to create it, and to call the venv's executables directly since shell activation doesn't persist between commands. Co-Authored-By: Claude --- CLAUDE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6875847 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,16 @@ +# CLAUDE.md + +## Python environment + +- Always use the project's virtual environment in `.venv/` — never install packages into the global Python. +- If `.venv/` doesn't exist yet, create it and install the project with dev dependencies: + ```bash + python -m venv .venv + .venv/Scripts/python -m pip install -e ".[dev]" # Windows; on Linux/macOS: .venv/bin/python + ``` +- Shell state doesn't persist between commands, so call the venv's executables directly instead of relying on `activate`: + ```bash + .venv/Scripts/python -m pytest -q + .venv/Scripts/python -m flake8 . + .venv/Scripts/python -m streamlit run app.py + ```