testcontainers / testcontainers/testcontainers-python

Feature: Use pre-commit.ci

Open
#959 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

🚀 enhancement
Dominant language
Python
Stars
2.3k
Forks
386
Avg merge
4h 40m
Merged PRs (30d)
1

Description

Currently we use the following in our ci workflow

      - name: Execute pre-commit handler
        continue-on-error: true
        run: |
          poetry run pre-commit run check-toml
          poetry run pre-commit run trailing-whitespace
          poetry run pre-commit run end-of-file-fixer
          poetry run pre-commit run ruff
          poetry run pre-commit run ruff-format
      - name: Execute mypy
        run: |
          make mypy-core-report
          make mypy-core

So we run all hooks but the mypy hool and then run mypy.

I suggest we use https://pre-commit.ci/

This service run the pre-commit hooks and offers a skip option for ci, so we have one file where to define which hooks should run in ci and locally.

It also has speed advantages and can commit changes of ruff back to MR.
It also updates the pre-commit file automatically, creating a PR.

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 current CI workflow and the repository's pre-commit configuration, focusing on the listed hooks and the separate mypy commands. Confirm how pre-commit.ci's CI skip option fits the existing workflow; done means the hooks are defined consistently for local and CI use while mypy still runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd
Issue type
Feature
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.