11# Contributing to GeneLab
22
3+ ## Development setup
4+
5+ GeneLab uses [ uv] ( https://github.com/astral-sh/uv ) and requires Python ` >=3.12 ` . Pick exactly one ` torch-* ` extra — they are mutually exclusive:
6+
7+ ``` bash
8+ uv sync --extra torch-cpu # or: torch-cu126 / torch-cu128 / torch-cu130
9+ uv run genelab --help # smoke-test the CLI
10+ uv run genelab cache # create project-local .cache dirs for Genesis / Matplotlib
11+ ```
12+
13+ The example extension under ` examples/genelab_examples/ ` is on ` pytest ` 's ` pythonpath ` , so the test suite can import from it without installation.
14+
315## Python 3.12+ style
416
517GeneLab targets Python ` >=3.12 ` . Write modern code only; do not add compatibility shims for older interpreters.
@@ -14,9 +26,24 @@ GeneLab targets Python `>=3.12`. Write modern code only; do not add compatibilit
1426## Checks before opening a PR
1527
1628``` bash
17- uv run ruff check # lint
18- uv run pyright # strict type-check on src/genelab
19- uv run pytest # full test suite
29+ uv run ruff check # lint
30+ uv run ruff format --check # formatting (run `uv run ruff format` to fix)
31+ uv run pyright # strict type-check on src/genelab
32+ uv run pytest # full test suite
2033```
2134
22- All three must pass.
35+ All four must pass — CI enforces the same set as required status checks on every PR.
36+
37+ ## Branch and PR workflow
38+
39+ ` main ` is protected: direct pushes are rejected and the required CI checks (` lint ` , ` typecheck ` , ` test ` ) must be green before a PR can merge.
40+
41+ 1 . Branch off ` main ` with a descriptive prefix: ` fix/... ` , ` feat/... ` , ` ci/... ` , ` chore/... ` , ` docs/... ` .
42+ 2 . Run the checks above locally.
43+ 3 . Push and open a PR — CI runs automatically on every push.
44+ 4 . If ` main ` advances during review, merge it into your branch (or rebase) so the PR stays current.
45+
46+ ## Commit messages
47+
48+ - Imperative mood, capitalized first word: "Bump…", "Fix…", "Add…". No prefix, no emoji.
49+ - Keep the subject under ~ 72 chars. Use the body to explain * why* — the diff already shows * what* .
0 commit comments