# python-conventions > Work on Python experiments in packages/python_viterbo. Use for layout conventions, stage entrypoints, lint/test commands, and asset/plot handling. - Author: Jörn Stöhler - Repository: JoernStoehler/msc-viterbo - Version: 20260121152006 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/JoernStoehler/msc-viterbo - Web: https://mule.run/skillshub/@@JoernStoehler/msc-viterbo~python-conventions:20260121152006 --- --- name: python-conventions description: Work on Python experiments in packages/python_viterbo. Use for layout conventions, stage entrypoints, lint/test commands, and asset/plot handling. --- # Python Conventions (python_viterbo) ## Purpose and layout - Experiments live in `src/viterbo/experiments//`. - Stage entrypoints: `stage_.py`. - Shared helpers: `src/viterbo/common/` (avoid premature abstraction). - Configs: `configs/experiments//.json`. - Data artifacts: `data/experiments///` (Git LFS). ## Commands - Lint: `scripts/lint.sh` (`ruff format`, `ruff check --fix`, `pyright`). - Smoke tests: `scripts/smoke-test.sh` (`pytest tests/smoke`). - Targeted tests: `uv run pytest `. ## Stage invocation - `uv run python -m viterbo.experiments..stage_ --config configs/experiments//.json` ## Conventions - Follow best practices for ML/data‑science code. - Docstrings include inputs/outputs, side effects, shapes/dtypes, and contract. - Prefer pure functions where practical. - Comments explain the why behind non‑obvious decisions. ## Plots and assets - LaTeX only includes assets; Python generates layout/style. - Store outputs under `packages/latex_viterbo/assets//...`.