All code should run inside the provided Docker or cluster environment. Avoid creating ad-hoc virtual environments or installing packages directly on your laptop — this breaks reproducibility and makes debugging harder.
Inside Docker, we use uv to manage dependencies. uv is a fast, modern Python package manager and resolver. It installs packages much quicker than pip, supports modern Python packaging standards, and works seamlessly inside containers. It also supports locking dependencies for consistent builds across machines.
pyproject.toml under the [project] section.pandas==2.2.2) to avoid “works on my machine” issues.[project.optional-dependencies] for development tools like linters and test frameworks.Example pyproject.toml:
[project]
name = "my-project"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"pandas==2.2.2",
"numpy==1.26.4",
]
[project.optional-dependencies]
dev = [
"ruff==0.5.5",
"pytest==8.2.0",
]
dependencies list in pyproject.tomluv lock to update the lock filemake build
pip install or uv pip install inside notebooks or ad-hoc environments.uv.lock to your repository for reproducible builds.uv sync --frozen in Docker builds to install from the lock file.uv lock after updating pyproject.toml to regenerate the lock file.environment.yml).pyproject.toml to avoid divergence.uv export --format requirements-txt to generate a requirements.txt for cluster compatibility..env file to manage configuration values and secrets (API keys, tokens, database URLs)..env.example file showing variable names (but not actual values), e.g.:
DB_USER=your_username
DB_PASS=your_password
API_KEY=replace_me
.env in the project README (e.g., with python-dotenv or by passing --env-file to Docker).