huggingface / huggingface/diffusers

[CI] Trial Sourcery PR reviews

Open
#13,452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

This is a followup to #13343 that continues to consider ways in which PRs can be managed more efficiently.

You may wish to consider trialing Sourcery PR reviews, which are free for open-source repositories. This would facilitate the automation of at least some first-stage PR reviews, while also allowing Diffusers team members to quickly ascertain whether PR authors are actively working on their code in response to feedback.

Sourcery reviews

Sourcery reviews include:

Security scanning is also available as a paid product, but that feature falls outside the scope of what I am proposing here.

I have collated a few recent examples that show what Sourcery produces versus Copilot and Gemini when reviewing PRs:

These examples suggest that Sourcery reviews generate more useful data than either Copilot or Gemini, which are both paid products.

Staged Implementation

As a starting point, you could enable the AI and rule based reviews, which are mostly set-and-forget one time setup tasks. If the basic setup goes well and proves useful, additional developer time could be used to develop custom quality rules that reflect Diffusers' coding standards. This might be informed by an analysis of recent third-party PRs to identify common problems with incoming code that could be identified using rule-based checks.

Versus Claude

I have seen that Claude is being used selectively to review PRs. An alternative may be to trigger Claude reviews automatically rather than adopting another tool. However, Claude reviews have some cost to them and it may therefore still be worth considering a free addition to PR workflows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the repository's pull-request workflow configuration and Sourcery's linked documentation for AI and rule-based reviews. Enable the proposed staged trial, then verify that reviews run on pull requests and assess whether the generated feedback is useful before considering custom rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, devops, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.