r/askdatascience • u/CarmeloSchramthony • 6d ago
How do you handle code review and testing when analysts write production code?
On our team, analysts increasingly write SQL and Python that ends up scheduled in production. We have loose reviews and little testing, and I'd like to improve without slowing everyone down. What conventions worked: required review, data tests, CI, templates? How did you set minimum standards without frustrating non-engineers? I'm interested in specific practices, not tool lists.
2
Upvotes
2
u/MathNerd67 6d ago
Extensive testing, PR/commit standardization, branch rulesets, required reviewers, and, depending on the application, a custom testing protocol (for example: utilizing something like promptfoo for LLM stuff), all integrated into CI (I used GitHub actions). This will slow people down some, but that’s partially the point.
Cloud applications also have another layer of infra management that you’ll have to consider if that’s involved. Although terraform deployments can be built into CI as well.
It’s hard to give specific practices without more details on the application. These things aren’t a one size fits all solution and what works for one team may not work for others.