Project-MONAI / Project-MONAI/MONAI

discrepancy between local pre-commit and CI's codeformat

Open
#8,683 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CI/CD
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

I’ve noticed that the current CI linting process sometimes diverges from the local pre-commit configuration, leading to inconsistencies in tool versions and ignore patterns (as seen in this recent run).

To ensure better parity between local development and CI, I suggest consolidating the linting steps to rely solely on the repository's pre-commit configuration. By running pre-commit directly in the CI pipeline, we can ensure that the exact same versions and rules are applied everywhere. This would simplify the contributor experience and make the linting results much more predictable.

I am happy to help update the GitHub Action workflows to implement this consolidation if the team is open to the idea!

cc: @KumoLiu @ericspod

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 inspecting the GitHub Actions workflow files and the repository's pre-commit configuration, then compare the linting commands, tool versions, and ignore patterns with the linked CI run. Run the existing pre-commit checks locally and confirm that CI uses the same configuration and produces predictable results.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.