Guidelines for changing ProSeqGO safely: setup, workflow, standards, and what to update with each change type.
Contributions welcome for:
- Bug fixes in pipelines, APIs, and infrastructure
- Tests for critical logic (validation, config, schemas)
- Documentation improvements
- Monitoring dashboards and alert tuning
- CI and Docker improvements
Requires design discussion before implementation:
- New public API endpoints or breaking request/response contracts
- Changes to model input/output schema or registry alias strategy
- New external dependencies (especially GPU/torch-related)
- Database schema changes for
proseqgo_jobs - Security model changes (auth tiers, TLS, exposed ports)
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
make lint
make testUnit tests do not require Docker, GPU, or network access.
make ci-env
make gateway-auth
make up
make monitoring-up # optional
make smoke # after stack is healthySee deployment.md for profiles and secrets.
- Branch from
mainwith a descriptive name (e.g.fix/embedding-validation,docs/monitoring-runbook) - Keep PRs focused; prefer small reviewable diffs
- Ensure CI passes: lint, unit tests, image builds on PR
- Include a test plan in the PR description (commands run, screenshots for UI)
- Request review from a maintainer familiar with the affected area (ML, API, infra)
Merge policy: squash or merge commit per team convention; main publishes images to GHCR.
- Target Python 3.10+
- Style: Ruff (
make lint→ruff check src services scripts) - Line length: 100 (see
pyproject.toml) - Type hints where they clarify non-obvious contracts
- Match existing patterns in the module you edit
| Path | Purpose |
|---|---|
src/ |
Core ML, preprocessing, training, inference |
services/ |
FastAPI/Streamlit service code |
scripts/ |
CLI entrypoints |
configs/ |
YAML configuration |
tests/unit/ |
Fast pytest (CI) |
tests/smoke/ |
Compose acceptance scripts (manual/CI Phase 3) |
- Use
src/config.py/load_config()for pipeline config - No hardcoded secrets, paths, or machine-specific settings
- Use
setup_logger()fromsrc/utils.pyfor CLI scripts
Prefer self-explanatory code. Comment only non-obvious business logic, protocol quirks, or operational constraints.
Located in tests/unit/. Current coverage areas:
- Sequence normalization
- Config loading
- API schema bounds (Pydantic)
- Embedding vector validation
- UI input validation
Required before merge: make lint and make test pass.
make ci-up && make smoke && make ci-downScripts in tests/smoke/ — not part of unit test suite. Run when touching embedding API, workers, or compose wiring.
- Full training or retrain jobs
- GPU workloads
- Training API profile (see
.github/CI.md)
Do not rely on CI to catch training regressions; document manual validation in PR test plan.
| Change type | Update |
|---|---|
| New/changed API endpoint | Service README, request schemas, unit tests, troubleshooting.md if user-facing |
| Config key added | configs/config.yaml, src/config.py, training.md or data.md |
| Model pipeline change | training.md, reproducibility notes in PR |
| Compose / env var | .env.example, deployment.md, Makefile if new target |
| New metric or alert | monitoring/alerts.yml, dashboard JSON, monitoring.md |
| NGINX route change | nginx/nginx.conf, nginx/README.md, architecture.md |
| Dataset path or checksum | data.md only (do not commit raw data) |
Do not modify README.md unless the PR explicitly scopes documentation at the top level — deep docs live under docs/.
Commit messages: concise, imperative mood, explain why when not obvious.
Examples:
fix embedding-api route label cardinality for Prometheusdocs: add deployment rollback proceduregate champion promotion on holdout_f1_micro threshold
PR description should include:
- Summary of change (1–3 bullets)
- Test plan (commands executed)
- Rollout notes if deploy or model promotion is affected
- Screenshots for Streamlit/Grafana changes
- Image releases: merging to
maintriggers GHCR publish (sha-<commit>andmaintags) - Model promotion: only after holdout evaluation passes threshold; document
train_run_idandeval_run_idin change log or MLflow - Production config: gateway passwords, Postgres, and MinIO credentials must be rotated via ops process — never in git
Restrict who can:
- Set
championalias in production MLflow - Change production
.envand NGINX configuration - Modify alert thresholds that page on-call
- Never commit
.env,kaggle.json, htpasswd files with real passwords, or raw datasets - Use
.env.examplefor variable names only - Run
make gateway-authlocally; use throwaway passwords in CI - Report security issues privately to maintainers (do not open public issues for active vulnerabilities)
- Pin breaking changes (e.g.
mlflow==2.13.0inpyproject.toml) - Torch: local
make build-imagesuses CUDA index; CI uses CPU wheels — test both paths when upgrading torch - Avoid new dependencies unless necessary; prefer stdlib and existing stack
- Architecture questions → architecture.md
- Operational issues → troubleshooting.md
- CI behavior →
.github/CI.md - Service-specific behavior →
services/*/README.md
By contributing, you agree that your contributions are licensed under the project MIT license.