Guide for coding agents working in this repo. Read this before touching code.
- Never commit to
main. Alwaysgit checkout -b <feature-branch>before editing. Land via PR. - Every PR bumps the version. Even doc-only PRs — at minimum a patch bump.
deploy.sh <version>handles the bump + commit + push. - "Done" means merged AND deployed to PyPI — never stop at merge. After a PR merges, run
./deploy.shfrom a clean main. Skipping deploy = task not done. - File problems as issues, don't silently work around them. If you hit a bug here or in a sibling openvax/pirl-unc repo, open a GitHub issue on the correct repo and link it from the PR.
- After a PR ships, look for the next block of work. Read open issues across the relevant openvax repos, group by dependency + urgency. Prefer foundational changes that unblock multiple downstream improvements; otherwise chain the smallest independent improvements.
Before telling the user a change is "complete":
./lint.sh— must pass./test.sh— must pass- For a PR: CI must be green on GitHub, then merge, then
./deploy.sh.
deploy.sh gates on lint + test, refuses to run off main/master, and refuses a dirty tree — don't work around these. If deploy fails, fix the root cause.
./develop.sh— editable install (dev mode)./lint.sh— ruff check./test.sh— pytest (with coverage where configured)./deploy.sh [version]— lint → test → optional version bump → build → twine upload → tag → push
- Python 3.9+
- Lint: ruff (config in
pyproject.toml) - Docstrings: numpy style
- Bugfixes include a regression test where feasible
- varcode sits under vaxrank/isovar/topiary — API changes are breaking. Keep backwards-compat where reasonable; coordinate a minor/major bump when not.
- For any non-trivial task (3+ steps or architectural): write a short spec first. If something goes sideways, STOP and re-plan — don't keep pushing.
- Never claim complete without proof: tests green, CI green, PyPI version live.
- Given a bug report: just fix it. Point at logs/errors/failing tests and resolve them without hand-holding.
- For non-trivial changes pause and ask "is there a more elegant way?" — skip for trivial fixes.
- Treat workarounds as bugs, not new abstractions. Rip out legacy paths decisively rather than accumulating special cases.
- Close superseded/outdated issues as you notice them.
- New problems mid-task → file as issues (on the right repo, even if it's not this one), don't bury.
- Simplicity first. Minimal diffs, minimal abstractions.
- No laziness. Find root causes; no temporary fixes, no empty-category fudges.
- Minimal blast radius. Touch only what the task requires.
- If a change touches immunology/genomics semantics, check primary sources (papers, UniProt, GenBank) before edits.
- If the code expresses a scientific model at odds with your understanding, flag it — don't silently "fix" it into something wrong.